[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/middleware/general/TVT_callback.h b/mcu/interface/middleware/general/TVT_callback.h
new file mode 100644
index 0000000..006acca
--- /dev/null
+++ b/mcu/interface/middleware/general/TVT_callback.h
@@ -0,0 +1,19 @@
+#ifndef _TVT_CALLBACK_H
+#define _TVT_CALLBACK_H
+
+//extern vt_csr_Q_struct VT_CSR_output_queue;
+extern void vt_csr_get_uplink_data_ind(
+        kal_uint16 req_len,
+        kal_uint8 **pdu_ptr,
+        kal_uint16 *pdu_len,
+        kal_uint16 *frame_index,
+        kal_uint8 tick_count,
+        kal_uint8 sim_index
+    );
+
+extern void vt_csr_put_downlink_data_ind(kal_uint8 *pdu_ptr, kal_uint16 pdu_len, kal_uint8 sim_index);
+
+extern void vt_csr_consume_uplink_data_ind(kal_uint16 req_len);
+
+#endif /* _TVT_CALLBACK_H */ 
+
diff --git a/mcu/interface/middleware/general/codec_def.h b/mcu/interface/middleware/general/codec_def.h
new file mode 100644
index 0000000..0219fd9
--- /dev/null
+++ b/mcu/interface/middleware/general/codec_def.h
@@ -0,0 +1,77 @@
+#ifndef __IMS_SDP_CODEC_DEF_H__
+#define __IMS_SDP_CODEC_DEF_H__
+
+
+typedef enum 
+{
+    VOIP_CODEC_NONE     = 0,
+    VOIP_CODEC_AMR,
+    VOIP_CODEC_AMR_WB,
+    VOIP_CODEC_H264,
+    VOIP_TELEPHONE_EVENT,
+    VOIP_CODEC_G729,
+    VOIP_CODEC_PCMA,
+    VOIP_CODEC_PCMU,
+    VOIP_CODEC_G7231,
+    VOIP_CODEC_G726_16,
+    VOIP_CODEC_G726_24,
+    VOIP_CODEC_G726_32,
+    VOIP_CODEC_G726_40,
+    VOIP_CODEC_T140,
+    VOIP_CODEC_RED,
+    VOIP_CODEC_CN,
+    VOIP_CODEC_H265,
+    VOIP_CODEC_EVS,
+#if 0 // not support iLBC    
+/* under construction !*/
+#endif // not support iLBC
+} voip_codec_enum;
+
+
+typedef enum e_vcodec_pt_type
+{
+    PT_CODEC_PCMU = 0,
+    PT_CODEC_PCMA = 8,
+    PT_CODEC_CN = 13,
+    PT_CODEC_G729 = 18,
+    PT_CODEC_G7231 = 4,
+    PT_TELEPHONE_EVENT = 101,
+#if 0 // not support iLBC    
+/* under construction !*/
+#endif // not support iLBC    
+    PT_CODEC_G726_16 = 105, /* R1 definition this is 96*/
+    PT_CODEC_G726_24 = 106,
+    PT_CODEC_G726_32 = 107,
+    PT_CODEC_G726_40 = 108,
+
+} voip_codec_pt_type;
+
+
+/**
+ * @brief Define the type in SC_ACCT_MEDIA_G723_RATE
+ */
+typedef enum voip_conf_g723_1_rate{
+    codec_g723_1_5_3k=0,
+    codec_g723_1_6_3k,
+}e_voip_conf_g723_1_rate;
+
+
+/**
+ * @brief Define the type in SC_ACCT_MEDIA_ILBC_RATE
+ */
+typedef enum voip_conf_ilbc_rate{
+    codec_ilbc_20ms=0,
+    codec_ilbc_30ms,
+}e_voip_conf_ilbc_rate;
+
+
+/**
+ * @brief Define the type in SC_ACCT_ADV_DTMF_TYPE
+ */
+typedef enum voip_conf_dtmf{
+    dtmf_rfc2833=0,
+    dtmf_inband=1,
+}e_voip_conf_dtmf;
+
+                
+#endif /* __IMS_SDP_CODEC_DEF_H__ */
diff --git a/mcu/interface/middleware/general/l4c2ppp_struct.h b/mcu/interface/middleware/general/l4c2ppp_struct.h
new file mode 100644
index 0000000..690d082
--- /dev/null
+++ b/mcu/interface/middleware/general/l4c2ppp_struct.h
@@ -0,0 +1,187 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ * L4C2PPP_STRUCT.H
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   This file describes the common struct of TCM and PPP.
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+
+/********************************************************************************
+*  Copyright Statement:
+*  --------------------
+*
+*  This product has been developed using a protocol stack
+*  developed by Sasken Communication Technologies Limited.
+*
+********************************************************************************/
+
+#ifndef _L4C2PPP_STRUCT_H
+#define _L4C2PPP_STRUCT_H
+
+#include "kal_general_types.h"
+//#include "kal_non_specific_general_types.h"
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 src_id;
+    kal_uint8 context_id;
+    kal_uint8 auth_type;
+    kal_uint8 pdp_type;
+    kal_uint8 port;
+} l4cppp_activate_req_struct;
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 context_id; 
+    kal_uint8 src_id;
+    kal_uint8 port;
+    #ifdef __LOCAL_DEACTIVATE_PDP_SUPPORT__
+    kal_bool local_deactivate_pdp; /* __LOCAL_DEACTIVATE_PDP_SUPPORT__ */
+    #endif // ~ __LOCAL_DEACTIVATE_PDP_SUPPORT__
+} l4cppp_deactivate_req_struct;
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 username[32];
+    kal_uint8 password[32];
+    kal_uint8 csd_mod_id;
+    kal_uint8 default_pri_dns_addr[4]; /* __PPP_DEFAULT_DNS_SUPPORTED__  */
+    kal_uint8 default_sec_dns_addr[4]; /* __PPP_DEFAULT_DNS_SUPPORTED__  */
+} l4cppp_csd_activate_req_struct;
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;    
+    kal_uint8 deact_cause;
+} l4cppp_csd_deactivate_req_struct;
+
+//mtk01616_080912
+/* __GPRS_DIALUP_ESCAPE_ATO_SUPPORT__ */
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;    
+    kal_uint8 port;
+} l4cppp_resume_req_struct;
+/* ~ __GPRS_DIALUP_ESCAPE_ATO_SUPPORT__ */
+
+// PPP Type PDP Dialup Feature
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;    
+    kal_uint8 src_id;
+    kal_uint8 context_id;
+    kal_uint8 port;
+} l4cppp_ppptypepdp_uart_transfer_ind_struct;
+
+//__IPV4V6__
+typedef struct {
+    kal_uint8  ref_count;
+    kal_uint16 msg_len;    
+    //MUST be valid all the time --
+    kal_uint8  activate_port;     //mtk02285, MAUI_03127025, IPV4V6 fallback: cid2 vs. ps_dialup_port[]    
+    kal_bool   activate_next_pdp;
+    //-- MUST be valid all the time
+
+    //ONLY valid when activate_next_pdp==KAL_TRUE --
+    kal_uint8  activate_pdp_cid;
+    kal_uint8  activate_pdp_type;
+    //-- ONLY valid when activate_next_pdp==KAL_TRUE    
+} l4cppp_ipv4v6_fallback_rsp_struct;
+#endif 
+
+
diff --git a/mcu/interface/middleware/general/mmi_common_enum.h b/mcu/interface/middleware/general/mmi_common_enum.h
new file mode 100644
index 0000000..0f28ae5
--- /dev/null
+++ b/mcu/interface/middleware/general/mmi_common_enum.h
@@ -0,0 +1,282 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+ /*******************************************************************************
+ *  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) 2001
+ *
+ *******************************************************************************/
+
+ /*******************************************************************************
+ * Filename:
+ * ---------
+ *   mmi_common_enum.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   mmi common enum
+ *
+ * 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!
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef _MMI_COMMON_ENUM_H
+#define _MMI_COMMON_ENUM_H
+
+typedef enum
+{
+   CBS0_GERMAN = 0,
+   CBS0_ENGLISH,
+   CBS0_ITALIAN,
+   CBS0_FRENCH,
+   CBS0_SPANISH,
+   CBS0_DUTCH,
+   CBS0_SWEDISH,
+   CBS0_DANISH,
+   CBS0_PORTUGUESE,
+   CBS0_FINNISH,
+   CBS0_NORWEGIAN,
+   CBS0_GREEK,
+   CBS0_TURKISH,
+   CBS0_HUNGARIAN,
+   CBS0_POLISH,
+   CBS0_LANG_UNSPECIFIED,
+
+   CBS1_CZECH = 16,
+   CBS1_HEBREW,
+   CBS1_ARABIC,
+   CBS1_RUSSIAN,
+
+
+   CBS2_AA, // AFAR, 20
+   CBS2_AB, // ABKHAZIAN
+   CBS2_AF, // AFRIKAANS
+   CBS2_AM, // AMHARIC
+   //CBS2_AR, // ARABIC
+   CBS2_AS, // ASSAMESE
+   CBS2_AY, // AYMARA
+   CBS2_AZ, // AZERBAIJANI
+
+   CBS2_BA, // BASHKIR
+   CBS2_BE, // BYELORUSSIAN
+   CBS2_BG, // BULGARIAN, 30
+   CBS2_BH, // BIHARI
+   CBS2_BI, // BISLAMA
+   CBS2_BN, // BENGALI; BANGLA
+   CBS2_BO, // TIBETAN
+   CBS2_BR, // BRETON
+
+   CBS2_CA, // CATALAN
+   CBS2_CO, // CORSICAN
+   //CBS2_CS, // CZECH
+   CBS2_CY, // WELSH
+
+   //CBS2_DA, // DANISH, 40
+   //CBS2_DE, // GERMAN
+   CBS2_DZ, // BHUTANI
+
+   //CBS2_EL, // GREEK
+   //CBS2_EN, // ENGLISH
+   CBS2_EO, // ESPERANTO
+   //CBS2_ES, // SPANISH
+   CBS2_ET, // ESTONIAN
+   CBS2_EU, // BASQUE
+
+   CBS2_FA, // PERSIAN
+   //CBS2_FI, // FINNISH, 50
+   CBS2_FJ, // FIJI
+   CBS2_FO, // FAROESE
+   //CBS2_FR, // FRENCH
+   CBS2_FY, // FRISIAN
+
+   CBS2_GA, // IRISH
+   CBS2_GD, // SCOTS GAELIC
+   CBS2_GL, // GALICIAN
+   CBS2_GN, // GUARANI
+   CBS2_GU, // GUJARATI
+
+   CBS2_HA, // HAUSA, 60
+   //CBS2_HE, // HEBREW (FORMERLY IW)
+   CBS2_HI, // HINDI
+   CBS2_HR, // CROATIAN
+   //CBS2_HU, // HUNGARIAN
+   CBS2_HY, // ARMENIAN
+
+   CBS2_IA, // INTERLINGUA
+   CBS2_ID, // INDONESIAN (FORMERLY IN)
+   CBS2_IE, // INTERLINGUE
+   CBS2_IK, // INUPIAK
+   CBS2_IS, // ICELANDIC, 70
+   //CBS2_IT, // ITALIAN
+   CBS2_IU, // INUKTITUT
+
+   CBS2_JA, // JAPANESE
+   CBS2_JW, // JAVANESE
+
+   CBS2_KA, // GEORGIAN
+   CBS2_KK, // KAZAKH
+   CBS2_KL, // GREENLANDIC
+   CBS2_KM, // CAMBODIAN
+   CBS2_KN, // KANNADA
+   CBS2_KO, // KOREAN, 80
+   CBS2_KS, // KASHMIRI
+   CBS2_KU, // KURDISH
+   CBS2_KY, // KIRGHIZ
+
+   CBS2_LA, // LATIN
+   CBS2_LN, // LINGALA
+   CBS2_LO, // LAOTHIAN
+   CBS2_LT, // LITHUANIAN
+   CBS2_LV, // LATVIAN, LETTISH
+
+   CBS2_MG, // MALAGASY
+   CBS2_MI, // MAORI, 90
+   CBS2_MK, // MACEDONIAN
+   CBS2_ML, // MALAYALAM
+   CBS2_MN, // MONGOLIAN
+   CBS2_MO, // MOLDAVIAN
+   CBS2_MR, // MARATHI
+   CBS2_MS, // MALAY
+   CBS2_MT, // MALTESE
+   CBS2_MY, // BURMESE
+
+   CBS2_NA, // NAURU
+   CBS2_NE, // NEPALI, 100
+   //CBS2_NL, // DUTCH
+   //CBS2_NO, // NORWEGIAN
+
+   CBS2_OC, // OCCITAN
+   CBS2_OM, // (AFAN) OROMO
+   CBS2_OR, // ORIYA
+
+   CBS2_PA, // PUNJABI
+   //CBS2_PL, // POLISH
+   CBS2_PS, // PASHTO, PUSHTO
+   //CBS2_PT, // PORTUGUESE
+
+   CBS2_QU, // QUECHUA, 110
+
+   CBS2_RM, // RHAETO-ROMANCE
+   CBS2_RN, // KIRUNDI
+   CBS2_RO, // ROMANIAN
+   //CBS2_RU, // RUSSIAN
+   CBS2_RW, // KINYARWANDA
+
+   CBS2_SA, // SANSKRIT
+   CBS2_SD, // SINDHI
+   CBS2_SG, // SANGHO
+   CBS2_SH, // SERBO-CROATIAN
+   CBS2_SI, // SINHALESE, 120
+   CBS2_SK, // SLOVAK
+   CBS2_SL, // SLOVENIAN
+   CBS2_SM, // SAMOAN
+   CBS2_SN, // SHONA
+   CBS2_SO, // SOMALI
+   CBS2_SQ, // ALBANIAN
+   CBS2_SR, // SERBIAN
+   CBS2_SS, // SISWATI
+   CBS2_ST, // SESOTHO
+   CBS2_SU, // SUNDANESE, 130
+   //CBS2_SV, // SWEDISH
+   CBS2_SW, // SWAHILI
+
+   CBS2_TA, // TAMIL
+   CBS2_TE, // TELUGU
+   CBS2_TG, // TAJIK
+   CBS2_TH, // THAI
+   CBS2_TI, // TIGRINYA
+   CBS2_TK, // TURKMEN
+   CBS2_TL, // TAGALOG
+   CBS2_TN, // SETSWANA, 140
+   CBS2_TO, // TONGA
+   //CBS2_TR, // TURKISH
+   CBS2_TS, // TSONGA
+   CBS2_TT, // TATAR
+   CBS2_TW, // TWI
+
+   CBS2_UG, // UIGHUR
+   CBS2_UK, // UKRAINIAN
+   CBS2_UR, // URDU
+   CBS2_UZ, // UZBEK
+
+   CBS2_VI, // VIETNAMESE, 150
+   CBS2_VO, // VOLAPUK
+
+   CBS2_WO, // WOLOF
+
+   CBS2_XH, // XHOSA
+
+   CBS2_YI, // YIDDISH (FORMERLY JI)
+   CBS2_YO, // YORUBA
+
+   CBS2_ZA, // ZHUANG
+   CBS2_ZH, // CHINESE
+   CBS2_ZU, // ZULU, 158
+   CBS_INVALID = 255
+} mmi_phnset_language_enum;
+
+#endif /* _MMI_COMMON_ENUM_H */
+
diff --git a/mcu/interface/middleware/general/n3sam_wt_struct.h b/mcu/interface/middleware/general/n3sam_wt_struct.h
new file mode 100644
index 0000000..7333c80
--- /dev/null
+++ b/mcu/interface/middleware/general/n3sam_wt_struct.h
@@ -0,0 +1,62 @@
+#ifndef __INC_N3SAM_STRUCT_H
+#define __INC_N3SAM_STRUCT_H
+
+#include "network_dev_info_struct.h"
+
+#define N3SAM_WT_BEARER_LIST_SIZE 16
+
+// MSG_ID_N3SAM_WT_WIFI_FILTER_ADD_REQ & MSG_ID_N3SAM_WT_WIFI_FILTER_DELETE_REQ,
+typedef struct _n3sam_wt_wifi_filter_update_struct {
+    LOCAL_PARA_HDR
+
+    kal_uint8 path;     // WTUNNEL_DATA_OVER_WIFI, WTUNNEL_DATA_OVER_CELLULER
+    kal_uint8 ip_type;  // WTUNNEL_ADDR_FAMILY_IPV4, WTUNNEL_ADDR_FAMILY_IPV6
+    kal_uint8 padding[2];
+    kal_uint32 main_filter_id;
+    kal_uint32 ip_addr[4];
+} n3sam_wt_wifi_filter_update_struct;
+
+// MSG_ID_N3SAM_WT_SA_ADD_REQ & MSG_ID_N3SAM_WT_SA_MODIFY_REQ
+typedef struct _n3sam_wt_wifi_sa_add_struct {
+    LOCAL_PARA_HDR
+
+    kal_bool dir_ul;
+    kal_uint32 sa_id;
+    nw_device_id_enum dev_id;   // NW_DEV_WLAN , NW_DEV_DATA_1,2,3,4
+    kal_uint8 ps_id;
+    kal_uint8 bear_id_num;
+    kal_uint8 path;     // WTUNNEL_DATA_OVER_WIFI, WTUNNEL_DATA_OVER_CELLULER
+    kal_uint8 ip_type;  // WTUNNEL_ADDR_FAMILY_IPV4, WTUNNEL_ADDR_FAMILY_IPV6
+    kal_uint8 bearer_id[16];
+} n3sam_wt_wifi_sa_add_struct;
+
+// MSG_ID_N3SAM_WT_SA_DELETE_REQ
+typedef struct _n3sam_wt_wifi_sa_delete_struct {
+    LOCAL_PARA_HDR
+
+    kal_bool dir_ul;
+    kal_uint32 sa_id;
+    kal_uint8 path;     // WTUNNEL_DATA_OVER_WIFI, WTUNNEL_DATA_OVER_CELLULER
+    kal_uint8 ip_type;  // WTUNNEL_ADDR_FAMILY_IPV4, WTUNNEL_ADDR_FAMILY_IPV6
+    kal_uint8 padding[2];
+} n3sam_wt_wifi_sa_delete_struct;
+
+// MSG_ID_N3SAM_WT_SA_ADD_CNF, MSG_ID_N3SAM_WT_SA_MODIFY_CNF, & MSG_ID_N3SAM_WT_SA_DELETE_CNF
+typedef struct _n3sam_wt_wifi_sa_rsp_struct {
+    LOCAL_PARA_HDR
+
+    kal_uint32 sa_id;
+    kal_bool result;
+} n3sam_wt_wifi_sa_rsp_struct;
+
+/* For DHL logging struct */
+typedef n3sam_wt_wifi_filter_update_struct n3sam_wt_wifi_filter_add_req_struct;
+typedef n3sam_wt_wifi_filter_update_struct n3sam_wt_wifi_filter_delete_req_struct;
+typedef n3sam_wt_wifi_sa_add_struct n3sam_wt_sa_add_req_struct;
+typedef n3sam_wt_wifi_sa_add_struct n3sam_wt_sa_modify_req_struct;
+typedef n3sam_wt_wifi_sa_delete_struct n3asm_wt_sa_delete_req_struct;
+typedef n3sam_wt_wifi_sa_rsp_struct n3sam_wt_sa_add_cnf_struct;
+typedef n3sam_wt_wifi_sa_rsp_struct n3sam_wt_sa_modify_cnf_struct;
+typedef n3sam_wt_wifi_sa_rsp_struct n3sam_wt_sa_delete_cnf_struct;
+
+#endif  // __INC_N3SAM_STRUCT_H
diff --git a/mcu/interface/middleware/general/tcm2ppp_struct.h b/mcu/interface/middleware/general/tcm2ppp_struct.h
new file mode 100644
index 0000000..11019f6
--- /dev/null
+++ b/mcu/interface/middleware/general/tcm2ppp_struct.h
@@ -0,0 +1,244 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ * TCM2PPP_STRUCT.H
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   This file describes the common struct of TCM and PPP.
+ *
+ * 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!!
+ *============================================================================
+ ****************************************************************************/
+
+/********************************************************************************
+*  Copyright Statement:
+*  --------------------
+*
+*  This product has been developed using a protocol stack
+*  developed by Sasken Communication Technologies Limited.
+*
+********************************************************************************/
+
+#ifndef _TCM2PPP_STRUCT_H
+#define _TCM2PPP_STRUCT_H
+
+#include "kal_general_types.h"
+//#include "kal_non_specific_general_types.h"    
+//#include "mmi_sm_enums.h"    
+//#include "tcm2sm_struct.h"
+#include "ps_public_enum.h"
+#include "ps_public_struct.h"
+
+//#include "mmi_l3_enums.h"
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 context_id;
+    pdp_addr_type_enum pdp_addr_type; /* pdp_addr_type_enum */
+    kal_uint8 pdp_addr_len; /* pdp address length*/
+    kal_uint8 pdp_addr[MAXIMUM_POSSIBLE_ADDR_LEN]; // Array size is 20; If IPv4v6 address is assigned, 
+                                         // pdp_addr[0]~[3] is IPv4 address, pdp_addr[4]~[19] is IPv6
+    kal_uint8 config_protocol;
+    kal_uint8 config_option_len; /* config option length*/
+    config_option_struct config_option[MAX_NUM_CONFIG_OPTION_PACKETS];
+    kal_uint8 dns[4];
+    kal_uint8 src_id;
+    kal_bool pdp_act_cause_2_present ; // if network has cause_2 value in ACTIVATE_PDP_CONTEXT_ACCEPT
+    ps_cause_enum pdp_act_cause_2 ; // just relay the PDP accept cause_2 value, 
+                                 // meaningful possible values are: PDP_TYPE_IPV4_ONLY_ALLOWED, 
+                                 //                                 PDP_TYPE_IPV6_ONLY_ALLOWED, 
+                                 //                                 SINGLE_ADDR_BEARERS_ONLY_ALLOWED
+} mmi_ext_pdp_activate_ack_rsp_struct;
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 context_id;
+    kal_uint8 config_protocol;
+    kal_uint8 config_option_len; /* config option length*/
+    config_option_struct config_option[MAX_NUM_CONFIG_OPTION_PACKETS];
+    kal_uint8 src_id;
+    kal_bool is_rejected_by_nw; // if this PDP is rejected by NW using SM peer msg, KAL_TRUE, else, KAL_FALSE
+    kal_bool pdp_act_cause_present ; // if network has cause_2 value in previous ACTIVATE_PDP_CONTEXT_ACCEPT
+    ps_cause_enum pdp_act_cause ; // the previous PDP accept cause_2 value, ex: PDP_TYPE_IPV4_ONLY_ALLOWED, 
+                                 // PDP_TYPE_IPV6_ONLY_ALLOWED, SINGLE_ADDR_BEARERS_ONLY_ALLOWED
+    ps_cause_enum cause; // (ps_cause_enum), this is used by RAT_TCM when value == RAT_TCM_RETRY_NEEDED_AFTER_IRAT
+} mmi_ext_pdp_activate_rej_rsp_struct;
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 context_id;
+    kal_uint8 src_id;
+    l4c_result_enum result; // deactivate success or fail
+    ps_cause_enum cause; // (ps_cause_enum), this is used by RAT_TCM when value == RAT_TCM_RETRY_NEEDED_AFTER_IRAT
+} mmi_ext_pdp_deactivate_ack_rsp_struct;
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 context_id;
+} mmi_ext_pdp_deactivate_req_struct;
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 context_id;
+    kal_uint8 dl_pool_id;
+} mmi_ext_data_req_struct;
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 context_id;
+    pdp_addr_type_enum pdp_addr_type;
+    kal_uint8 pdp_addr_len;
+    kal_uint8 pdp_addr[16];
+} mmi_ext_update_pdp_addr_req_struct;
+
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 context_id; /* for __APP_SECONDARY_PDP_SUPPORT__ */
+    kal_uint8 profile_id;
+} mmi_data_req_struct;
+
+// PPP Type PDP Dialup Feature
+typedef struct {
+    kal_uint8 ref_count;
+    kal_uint16 msg_len;
+    kal_uint8 serial_number; // for matching request and confirm
+} mmi_ext_pdp_set_ip_and_dns_info_cnf_struct;
+
+//mtk04121
+/* PPP Dial-up */
+typedef struct {
+	kal_uint8 ref_count;
+	kal_uint16 msg_len;
+	kal_uint8 src_id;
+	kal_uint8 context_id;
+	kal_uint8 result;
+	ps_cause_enum error_cause;
+} ppptcm_enter_data_mode_cnf_struct;
+
+typedef mmi_ext_pdp_activate_ack_rsp_struct taf_ext_pdp_activate_ack_rsp_struct;
+typedef mmi_ext_pdp_activate_rej_rsp_struct taf_ext_pdp_activate_rej_rsp_struct;
+typedef mmi_ext_pdp_deactivate_ack_rsp_struct taf_ext_pdp_deactivate_ack_rsp_struct;
+typedef mmi_ext_pdp_deactivate_req_struct taf_ext_pdp_deactivate_req_struct;
+typedef mmi_ext_data_req_struct taf_data_req_struct;
+typedef mmi_data_req_struct tcpip_tcm_data_ind_struct;
+typedef mmi_ext_update_pdp_addr_req_struct taf_ext_update_pdp_addr_req_struct;
+typedef mmi_ext_pdp_set_ip_and_dns_info_cnf_struct taf_ext_pdp_set_ip_and_dns_info_cnf_struct;
+
+//mtk04121
+/* PPP Dial-up */
+typedef ppptcm_enter_data_mode_cnf_struct taf_ext_enter_data_mode_cnf_struct;
+
+#endif 
+
+
diff --git a/mcu/interface/middleware/general/uart_sim_struct.h b/mcu/interface/middleware/general/uart_sim_struct.h
new file mode 100644
index 0000000..e75857b
--- /dev/null
+++ b/mcu/interface/middleware/general/uart_sim_struct.h
@@ -0,0 +1,107 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+ /*******************************************************************************
+ *  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) 2001
+ *
+ *******************************************************************************/
+
+ /*******************************************************************************
+ * Filename:
+ * ---------
+ *   uart_sim_struct.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   UART simulation for unittest SAP structure
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *============================================================================
+ *             HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+#ifndef _UART_SIM_STRUCT_H
+#define _UART_SIM_STRUCT_H
+
+typedef struct 
+{
+LOCAL_PARA_HDR
+ UART_PORT port;
+ module_type owner;
+}uart_putbytes_req_struct;
+
+typedef struct 
+{
+    LOCAL_PARA_HDR
+    UART_PORT port;
+    kal_bool  sendReadyToRead;
+}uart_data_ind_struct;
+
+typedef struct 
+{
+    LOCAL_PARA_HDR
+     UART_PORT port;
+     module_type owner;
+     kal_bool      is_WriteSuspend;
+     kal_uint16   maxWriteLength;
+}uart_set_config_ind_struct;
+
+#endif
diff --git a/mcu/interface/middleware/general/ups_struct.h b/mcu/interface/middleware/general/ups_struct.h
new file mode 100644
index 0000000..484008e
--- /dev/null
+++ b/mcu/interface/middleware/general/ups_struct.h
@@ -0,0 +1,177 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   ups_struct.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *
+ *
+ * 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!
+ *
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef UPS_STRUCT_H
+#define UPS_STRUCT_H
+/******************************************************************************/
+
+#include "kal_general_types.h"
+#include "kal_public_defs.h"
+
+#include "ps_public_ups_enum.h"
+
+/******************************************************************************/
+
+//MSG_ID_UPS_BUSY_MODE_IND
+
+//MSG_ID_UPS_UT_UART_DATA_IND
+typedef struct {
+    LOCAL_PARA_HDR
+	kal_uint8 index;
+	kal_uint8 string[128];
+} ups_ut_uart_data_ind_struct;
+
+//MSG_ID_UPS_UT_UART_DATA_REQ
+typedef struct {
+    LOCAL_PARA_HDR
+	kal_uint16 port;
+} ups_ut_uart_data_req_struct;
+
+// MSG_ID_UPS_FLC_DATA_RESUME_IND
+typedef struct {
+    LOCAL_PARA_HDR
+    kal_uint8 pool_id;
+} ups_flc_data_resume_ind_struct;
+
+// MSG_ID_UPS_FLC_DATA_SUSPEND_IND
+typedef struct {
+    LOCAL_PARA_HDR
+    kal_uint8 pool_id;
+} ups_flc_data_suspend_ind_struct;
+
+typedef struct {
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_uint8 port;
+    kal_uint8 context_id;
+} l4cups_port_activate_req_struct;
+
+typedef struct {
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_uint8 port;
+    kal_uint8 context_id;
+    kal_bool result;
+} l4cups_port_activate_cnf_struct;
+
+typedef struct {
+    LOCAL_PARA_HDR
+    kal_uint8 port;
+    kal_uint8 context_id;
+} l4cups_port_deactivate_ind_struct;
+
+typedef struct {
+    LOCAL_PARA_HDR
+    mbim_terminate_enum type;
+    kal_uint32 tid;
+} mbim_close_req_struct;
+
+typedef struct {
+    LOCAL_PARA_HDR
+    mbim_terminate_enum type;
+    kal_uint32 tid;
+} mbim_close_cnf_struct;
+
+/******************************************************************************/
+#endif
diff --git a/mcu/interface/middleware/general/vuart_struct.h b/mcu/interface/middleware/general/vuart_struct.h
new file mode 100644
index 0000000..b150180
--- /dev/null
+++ b/mcu/interface/middleware/general/vuart_struct.h
@@ -0,0 +1,23 @@
+typedef struct 
+{
+LOCAL_PARA_HDR
+ UART_PORT port;
+ module_type owner;
+}uart_putbytes_req_struct;
+
+typedef struct 
+{
+    LOCAL_PARA_HDR
+    UART_PORT port;
+    kal_bool  sendReadyToRead;
+}uart_getbytes_ind_struct;
+
+typedef struct 
+{
+    LOCAL_PARA_HDR
+     UART_PORT port;
+     module_type owner;
+     kal_bool      is_WriteSuspend;
+     kal_uint16   maxWriteLength;
+}uart_set_config_ind_struct;
+
diff --git a/mcu/interface/middleware/general/wtunnel_api.h b/mcu/interface/middleware/general/wtunnel_api.h
new file mode 100644
index 0000000..0046e6e
--- /dev/null
+++ b/mcu/interface/middleware/general/wtunnel_api.h
@@ -0,0 +1,21 @@
+#ifndef _WTUNNEL_API_H
+#define _WTUNNEL_API_H
+
+#include "upcm_did.h"
+#include "qmu_bm.h"
+#include "qmu_bm_util.h"
+
+typedef enum {
+    WTUNNEL_ADDR_FAMILY_IPV4    =   0,
+    WTUNNEL_ADDR_FAMILY_IPV6    =   1
+} wtunnel_addr_family_e;
+
+typedef enum {
+    WTUNNEL_DATA_OVER_WIFI          =   0,
+    WTUNNEL_DATA_OVER_CELLULER      =   1
+} wtunnel_data_over_rat_e;
+
+kal_bool wtunnel_upp_dl_reg_cbk(void (*dl_callback)(kal_uint8, upcm_did*, upcm_did*, kal_uint8));
+kal_bool wtunnel_upp_ul_send(kal_uint8 bearer_id, qbm_gpd* p_head, qbm_gpd* p_tail, kal_uint8 protocol_idx);
+
+#endif // _WTUNNEL_API_H
diff --git a/mcu/interface/middleware/hif/aomgr_enums.h b/mcu/interface/middleware/hif/aomgr_enums.h
new file mode 100644
index 0000000..7824d0c
--- /dev/null
+++ b/mcu/interface/middleware/hif/aomgr_enums.h
@@ -0,0 +1,75 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   aomgr_enums.h
+ *
+ * Project:
+ * --------
+ *   TATAKA
+ *
+ * Description:
+ * ------------
+ *   AOMGR public enumeration definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_AOMGR_ENUMS_H
+#define __INC_AOMGR_ENUMS_H
+
+/*------------------------------------------------------------------------------
+ * Data structure defintion.
+ *----------------------------------------------------------------------------*/
+
+#define APMOD_DHCP              0x0402  /* AP side, DHCP module ID */
+#define IPC_NETIF_ID_CCMNI_2    1       /* CCMNI network interface ID */
+
+
+
+#endif /* __INC_AOMGR_ENUMS_H */
diff --git a/mcu/interface/middleware/hif/aomgr_struct.h b/mcu/interface/middleware/hif/aomgr_struct.h
new file mode 100644
index 0000000..719e9b6
--- /dev/null
+++ b/mcu/interface/middleware/hif/aomgr_struct.h
@@ -0,0 +1,83 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   aomgr_struct.h
+ *
+ * Project:
+ * --------
+ *   TATAKA
+ *
+ * Description:
+ * ------------
+ *   AOMGR ILM structure and interface definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_AOMGR_STRUCT_H
+#define __INC_AOMGR_STRUCT_H
+
+#include "hif_ior.h"
+#include "hif_mw_msgid.h"
+#include "ipc_struct.h"
+
+/*
+ * Local parameter structure for MSG_ID_AOMGR_LINK_DOWN_IND
+ */
+typedef struct _aomgr_ipc_ntfy_t {
+    LOCAL_PARA_HDR
+    ipc_ntfy_param_t ipc_ntfy_para;
+} aomgr_ipc_ntfy_t;
+
+/*------------------------------------------------------------------------------
+ * DHL logging structure
+ *----------------------------------------------------------------------------*/
+typedef aomgr_ipc_ntfy_t aomgr_link_down_ind_struct;    /* MSG_ID_AOMGR_LINK_DOWN_IND */
+
+#endif /* __INC_AOMGR_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/ccci_tty_if.h b/mcu/interface/middleware/hif/ccci_tty_if.h
new file mode 100644
index 0000000..97797f0
--- /dev/null
+++ b/mcu/interface/middleware/hif/ccci_tty_if.h
@@ -0,0 +1,198 @@
+/*****************************************************************************
+*  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) 2012
+*
+*  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:
+ * ---------
+ *   ccci_tty_if.h
+ *
+ * Project:
+ * --------
+ *   UMOLYA
+ *
+ * Description:
+ * ------------
+ *   Move enum/struct to interface folder
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ * ==========================================================================
+ * $Log$
+ *
+ * 01 25 2021 adel.liao
+ * [MOLY00607924] [Nokia][ODU][Module Startup blocking] mipc_init spend 30s
+ * 	
+ * 	add mipc 10-14 interface.
+ *
+ * 12 14 2020 adel.liao
+ * [MOLY00605776] support MBIM_CID_DSS_CONNECT
+ * 	
+ * 	add DSS channels.
+ *
+ * 09 18 2020 li-cheng.tsai
+ * [MOLY00569647] [MP7.PRECHECKIN.DEV][Code sync] sync code from T700
+ * [R3.MP][OA][CCCI]code sync from T700
+ *
+ * 09 15 2020 li-cheng.tsai
+ * [MOLY00569647] [MP7.PRECHECKIN.DEV][Code sync] sync code from T700
+ * [MP7.PRECHECKIN.DEV][OA][CCCI]code sync from T700
+ *
+ * 08 04 2020 actory.ou
+ * [MOLY00554534] [Colgin][Code sync] sync code from MT6880.MP
+ * [T700][OA] add epdg ports
+ *
+ * 08 04 2020 actory.ou
+ * [MOLY00554534] [Colgin][Code sync] sync code from MT6880.MP
+ * [T700][OA][CCCI] sync from MT6880
+ *
+ * 07 07 2020 actory.ou
+ * [MOLY00543186] [Colgin] code sync to NR15.R3.MT6880.MP
+ * [R3.MT6880.MP][OA][CCCI] sync from COLGIN.SB.SMT.DEV
+ *
+ * 05 19 2020 actory.ou
+ * [MOLY00525599] code sync for Colgin
+ * [NR15.R3.COLGIN.SB.SMT.DEV][OA][CCCI] code sync from 19NOV
+ *
+ * 04 14 2020 actory.ou
+ * [MOLY00510681] [Colgin] add MD meta port
+ * [19NOV][OA] add meta eap port
+ *
+ * 03 23 2020 actory.ou
+ * [MOLY00502858] [Gen97][Gen98] merge ccci channel id/runtime data id
+ * [19NOV][OA][NCCCIDEV] sync TTY/NCCMNI port table
+ *
+ * 02 26 2020 actory.ou
+ * [MOLY00502106] [CCCI] add mbim port
+ * [19NOV.DEV][OA] add MBIM port
+ *
+ * 12 18 2019 actory.ou
+ * [MOLY00465742] [Gen97] add L5 channels and change CCIF SHM layout
+ * [19NOV.DEV][OA] add L5 channels
+ *
+ * 12 03 2019 actory.ou
+ * [MOLY00457575] ¥Ó?patch¡G§âALPS04415220¤¤ªº?ªG²¾´Ó¨ìMT6885¥­¥x¤W
+ * [VMOLY][OA] add mipi port & sysmsg
+ *
+ * 11 12 2019 actory.ou
+ * [MOLY00457575] ¥Ó?patch¡G§âALPS04415220¤¤ªº?ªG²¾´Ó¨ìMT6885¥­¥x¤W
+ * [1001.DEV][OA] add mipi port & SYSMSG
+ *
+ * 07 25 2019 actory.ou
+ * [MOLY00422649] [Gen97][EMAC][Patch back from Gen95] change uart/ccci name for network latency optimization
+ * [VMOLY][OA] sync channel
+ *
+ * 06 25 2019 actory.ou
+ * [MOLY00415834] ¡iBingo¡jSCPºÝ?¨ú³q???
+ * [VMOLY][OA] add  new SCP channel for CC state
+ *
+ * 05 07 2019 actory.ou
+ * [MOLY00404239] [VMOLY] sync latest channel setting from UMOLYE
+ * [VMOLY][OA] sync tty channel from UMOLYE
+ *
+ * 07 24 2018 actory.ou
+ * [MOLY00341790] [MT6295] UDC feature patch back
+ * add UDC feature ID and tty channel / replace ccci spinlock with HWITC
+ *
+ ****************************************************************************/
+#ifndef _CCCI_TTY_IF_H
+#define _CCCI_TTY_IF_H
+
+/*!
+ *  @brief CCCI_TTY_DEV_CNT defines the total number of CCCI_TTY devices
+ */
+typedef enum _cccitty_device_id {
+    CCCI_TTY_DEV_MIN           = 0,
+    CCCI_TTY_DEV_DHL           = 0,  //4 <ccci ch> CCCI_DHL_CHANNEL
+    CCCI_TTY_DEV_TST           = 1,  //4 <ccci ch> CCCI_TST_CHANNEL
+    CCCI_TTY_DEV_AT            = 2,  //4 <ccci ch> CCCI_AT_CHANNEL_TX
+    CCCI_TTY_DEV_GPD           = 3,  //4 <ccci ch> CCCI_GPS_CHANNEL_TX
+    CCCI_TTY_DEV_SIM           = 4,  //4 <ccci ch> CCCI_SIM_CHANNEL_TX
+    CCCI_TTY_DEV_DHL2          = 5,  //4 <ccci ch> CCCI_DHL2_CHANNEL
+    CCCI_TTY_DEV_ATCP          = 6,
+    CCCI_TTY_DEV_C2K_PPP       = 7,
+    CCCI_TTY_DEV_C2K_AGPS      = 8,
+    CCCI_TTY_DEV_CELLINFO      = 9,  //  <ccci ch> CCCI_CELLINFO_CHANNEL
+    CCCI_TTY_DEV_IMSM          = 10,  //  <ccci ch> CCCI_IMSM_CHANNEL
+    CCCI_TTY_DEV_WOA           = 11,  //  <ccci ch> CCCI_WOA_CHANNEL
+    CCCI_TTY_DEV_XUI           = 12,  //  <ccci ch> CCCI_XUI_CHANNEL
+    CCCI_TTY_DEV_BIP           = 13,  //  <ccci ch> CCCI_BIP_CHANNEL
+    CCCI_TTY_DEV_UDC           = 14,  //  <ccci ch> CCCI_UDC_CHANNEL
+    CCCI_TTY_DEV_NLOPT         = 15, // <ccci ch> CCCI_NLOPT_CHANNEL
+    CCCI_TTY_DEV_NLOPP         = 16, // <ccci ch> CCCI_NLOPP_CHANNEL
+    CCCI_TTY_DEV_SAR           = 17,  //  <ccci ch> CCCI_SAR_CHANNEL
+    CCCI_TTY_DEV_CIQ           = 18,  //  <ccci ch> CCCI_CIQ_CHANNEL
+    CCCI_TTY_DEV_IKERAW        = 19,  //  <ccci ch> CCCI_IKERAW_CHANNEL
+    CCCI_TTY_DEV_RIL_IPC0      = 20,  //  <ccci ch> CCCI_RIL_IPC0_CHANNEL
+    CCCI_TTY_DEV_RIL_IPC1      = 21,  //  <ccci ch> CCCI_RIL_IPC1_CHANNEL
+    CCCI_TTY_DEV_3G_VT         = 22,  //  <ccci ch> CCCI_3G_VT_CHANNEL
+    CCCI_TTY_DEV_CC_STATE      = 23,  //  <ccci ch> CCCI_CC_STATE_CHANNEL
+    CCCI_TTY_DEV_MIPI          = 24,  //  <ccci ch> CCCI_MIPI_CHANNEL
+    CCCI_TTY_DEV_MIPC_AP0      = 25, //  <ccci ch> CCCI_MIPC_AP0_CHANNEL
+    CCCI_TTY_DEV_MIPC_AP1      = 26, //  <ccci ch> CCCI_MIPC_AP1_CHANNEL
+    CCCI_TTY_DEV_MIPC_AP2      = 27, //  <ccci ch> CCCI_MIPC_AP2_CHANNEL
+    CCCI_TTY_DEV_MIPC_AP3      = 28, //  <ccci ch> CCCI_MIPC_AP3_CHANNEL
+    CCCI_TTY_DEV_MIPC_AP4      = 29, //  <ccci ch> CCCI_MIPC_AP4_CHANNEL
+    CCCI_TTY_DEV_MIPC_AP5      = 30, //  <ccci ch> CCCI_MIPC_AP5_CHANNEL
+    CCCI_TTY_DEV_MIPC_AP6      = 31, //  <ccci ch> CCCI_MIPC_AP6_CHANNEL
+    CCCI_TTY_DEV_MIPC_AP7      = 32, //  <ccci ch> CCCI_MIPC_AP7_CHANNEL
+    CCCI_TTY_DEV_MIPC_AP8      = 33, //  <ccci ch> CCCI_MIPC_AP8_CHANNEL
+    CCCI_TTY_DEV_MIPC_AP9      = 34, //  <ccci ch> CCCI_MIPC_AP9_CHANNEL
+    CCCI_TTY_DEV_MIPC_EAP0     = 35, //  <ccci ch> CCCI_MIPC_EAP0_CHANNEL
+    CCCI_TTY_DEV_MBIM_EAP0     = 36, //  <ccci ch> CCCI_MBIM_EAP0_CHANNEL
+    CCCI_TTY_DEV_LOG_EAP       = 37, //  <ccci ch> CCCI_MD_LOG_EAP for MD LOG
+    CCCI_TTY_DEV_META_EAP      = 38, //  <ccci ch> CCCI_TST_CHANNEL_EAP for MD META
+    CCCI_TTY_DEV_EPDG          = 39,  // <ccci ch> CCCI_EPDG_CHANNEL
+    CCCI_TTY_DEV_EPDG2         = 40,  // <ccci ch> CCCI_EPDG2_CHANNEL
+    CCCI_TTY_DEV_EPDG3         = 41,  // <ccci ch> CCCI_EPDG3_CHANNEL
+    CCCI_TTY_DEV_EPDG4         = 42,  // <ccci ch> CCCI_EPDG4_CHANNEL
+	CCCI_TTY_DEV_MBIM_DSS0_EAP = 43,  // <ccci ch> CCCI_MBIM_DSS0_EAP_CHANNEL
+	CCCI_TTY_DEV_MBIM_DSS1_EAP = 44,  // <ccci ch> CCCI_MBIM_DSS1_EAP_CHANNEL
+	CCCI_TTY_DEV_MBIM_DSS2_EAP = 45,  // <ccci ch> CCCI_MBIM_DSS2_EAP_CHANNEL
+	CCCI_TTY_DEV_MBIM_DSS3_EAP = 46,  // <ccci ch> CCCI_MBIM_DSS3_EAP_CHANNEL
+	CCCI_TTY_DEV_MBIM_DSS4_EAP = 47,  // <ccci ch> CCCI_MBIM_DSS4_EAP_CHANNEL
+	CCCI_TTY_DEV_MBIM_DSS5_EAP = 48,  // <ccci ch> CCCI_MBIM_DSS5_EAP_CHANNEL
+	CCCI_TTY_DEV_MBIM_DSS6_EAP = 49,  // <ccci ch> CCCI_MBIM_DSS6_EAP_CHANNEL
+	CCCI_TTY_DEV_MBIM_DSS7_EAP = 50,  // <ccci ch> CCCI_MBIM_DSS7_EAP_CHANNEL
+	CCCI_TTY_DEV_MIPC_AP10	   = 51, //  <ccci ch> CCCI_MIPC_AP10_CHANNEL
+	CCCI_TTY_DEV_MIPC_AP11	   = 52, //  <ccci ch> CCCI_MIPC_AP11_CHANNEL
+	CCCI_TTY_DEV_MIPC_AP12	   = 53, //  <ccci ch> CCCI_MIPC_AP12_CHANNEL
+	CCCI_TTY_DEV_MIPC_AP13	   = 54, //  <ccci ch> CCCI_MIPC_AP13_CHANNEL
+	CCCI_TTY_DEV_MIPC_AP14	   = 55, //  <ccci ch> CCCI_MIPC_AP14_CHANNEL
+    CCCI_TTY_DEV_CNT           = 56
+}cccitty_device_id;
+
+#endif //#ifndef _CCCI_TTY_IF_H
diff --git a/mcu/interface/middleware/hif/cdcecm_struct.h b/mcu/interface/middleware/hif/cdcecm_struct.h
new file mode 100644
index 0000000..9a88bec
--- /dev/null
+++ b/mcu/interface/middleware/hif/cdcecm_struct.h
@@ -0,0 +1,96 @@
+/*****************************************************************************
+*  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) 2014
+*
+*  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:
+ * ---------
+ *   cdcecm_struct.h
+ *
+ * Project:
+ * --------
+ *   MOLY
+ *
+ * Description:
+ * ------------
+ *   CDCECM ILM structure definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_CDCECM_STRUCT_H
+#define __INC_CDCECM_STRUCT_H
+
+#include "hif_ior.h"
+#include "hif_mw_msgid.h"
+
+/*
+ * Local parameter structure for MSG_ID_CDCECM_START_DATA_PATH_REQ
+ */
+typedef struct 
+{
+    LOCAL_PARA_HDR
+    kal_uint8 class_id;
+} cdcecm_start_data_path_req_struct;
+
+/*
+ * Local parameter structure for MSG_ID_CDCECM_STOP_DATA_PATH_REQ
+ */
+typedef struct 
+{
+    LOCAL_PARA_HDR
+    kal_uint8 class_id;
+} cdcecm_stop_data_path_req_struct;
+
+/*
+ * Local parameter structure for MSG_ID_CDCECM_RELOAD_UPLINK_REQ
+ */
+typedef struct 
+{
+    LOCAL_PARA_HDR
+    kal_uint8 class_id;
+} cdcecm_reload_uplink_req_struct;
+
+#endif /* __INC_CDCECM_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/dhcp4c_struct.h b/mcu/interface/middleware/hif/dhcp4c_struct.h
new file mode 100644
index 0000000..04ae1e0
--- /dev/null
+++ b/mcu/interface/middleware/hif/dhcp4c_struct.h
@@ -0,0 +1,260 @@
+/*!
+ *  @file dhcp4c_struct.h
+ *  @author Roger Huang <chaomin.haung@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides structure definition of dhcp4c ( DHCPv4 Client )
+ */
+
+#ifndef _DHCP4C_STRUCT_H
+#define _DHCP4C_STRUCT_H
+
+
+/*!
+ *  @brief dhcp4c_cause_e enumerate possible cause of DHCPv4 Client
+ *  @param DHCP4C_CAUSE_MIN                 pseudo state
+ *  @param DHCP4C_CAUSE_SUCCESS             success
+ *  @param DHCP4C_CAUSE_NO_INSTANCE         no instance available
+ *  @param DHCP4C_CAUSE_INVALID_PARAMETER   parameter is invalid
+ *  @param DHCP4C_CAUSE_INVALID_STATE       not allow in this state
+ *  @param DHCP4C_CAUSE_MAX                 pseudo state
+ */
+typedef enum _dhcp4c_cause {
+    DHCP4C_CAUSE_MIN                                = 0,
+    DHCP4C_CAUSE_SUCCESS                            = 1,
+    DHCP4C_CAUSE_NO_INSTANCE                        = 2,
+    DHCP4C_CAUSE_INVALID_PARAMETER                  = 3,
+    DHCP4C_CAUSE_INVALID_STATE                      = 4,
+    DHCP4C_CAUSE_MAX                                = 5,
+} dhcp4c_cause_e;
+
+
+/*!
+ *  @brief dhcp4c_hardware_address_type_e enumerate possible hardward address
+ *         type of DHCPv4 Client
+ *  @param DHCP4C_HTYPE_MIN                 pseudo state
+ *  @param DHCP4C_HTYPE_ETHERNET            ethernet type
+ *  @param DHCP4C_HTYPE_MAX                 pseudo state
+ */
+typedef enum _dhcp4c_hardware_address_type {
+    DHCP4C_HTYPE_MIN                                = 0,
+    DHCP4C_HTYPE_ETHERNET                           = 1,
+    DHCP4C_HTYPE_MAX                                = 2,
+} dhcp4c_hardware_address_type_e;
+
+
+#define DHCP4C_MAX_HARDWARE_ADDRESS_SIZE            16
+/*!
+ *  @brief dhcp4c_activagte_req_struct describe activate request information
+ *         of DHCPv4 Client
+ */
+typedef struct _dhcp4c_activate_req_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief hardware address type
+     */
+    dhcp4c_hardware_address_type_e  hardware_address_type;
+    /*!
+     *  @brief hardware address
+     */
+    kal_uint8       hardware_address[DHCP4C_MAX_HARDWARE_ADDRESS_SIZE];
+} dhcp4c_activate_req_struct;
+
+
+/*!
+ *  @brief dhcp4c_activate_rsp_struct describe activate response information
+ *         of DHCPv4 Client
+ */
+typedef struct _dhcp4c_activate_rsp_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief DHCPv4 Client instance identifier
+     */
+    kal_uint8       dhcp_id;
+    /*!
+     *  @brief response cause
+     */
+    dhcp4c_cause_e  cause;
+} dhcp4c_activate_rsp_struct;
+
+
+/*!
+ *  @brief dhcp4c_deactivate_req_struct describe deactivate request information
+ *         of DHCPv4 Client
+ */
+typedef struct _dhcp4c_deactivate_req_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief DHCPv4 Client instance identifier
+     */
+    kal_uint8       dhcp_id;
+} dhcp4c_deactivate_req_struct;
+
+
+/*!
+ *  @brief dhcp4c_deactivate_rsp_struct describe deactivate response information
+ *         of DHCPv4 Client
+ */
+typedef struct _dhcp4c_deactivate_rsp_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief DHCPv4 Client instance identifier
+     */
+    kal_uint8       dhcp_id;
+    /*!
+     *  @brief response cause
+     */
+    dhcp4c_cause_e  cause;
+} dhcp4c_deactivate_rsp_struct;
+
+
+/*!
+ *  @brief dhcp4c_packet_req_struct describe packet request information
+ *         of DHCPv4 Client
+ */
+typedef struct _dhcp4c_packet_req_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief DHCPv4 Client instance identifier
+     */
+    kal_uint8       dhcp_id;
+    /*!
+     *  @brief request gpd packet buffer
+     */
+    void*           gpd;
+} dhcp4c_packet_req_struct;
+
+
+/*!
+ *  @brief dhcp4c_packet_ind_struct describe packet indicate information
+ *         of DHCPv4 Client
+ */
+typedef struct _dhcp4c_packet_ind_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief DHCPv4 Client instance identifier
+     */
+    kal_uint8       dhcp_id;
+    /*!
+     *  @brief indicate gpd packet buffer
+     */
+    void*           gpd;
+} dhcp4c_packet_ind_struct;
+
+
+/*!
+ *  @brief dhcp4c_ip_up_ind_struct describe ip up indicate information
+ *         of DHCPv4 Client
+ */
+typedef struct _dhcp4c_ip_up_ind_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief DHCPv4 Client instance identifier
+     */
+    kal_uint8       dhcp_id;
+} dhcp4c_ip_up_ind_struct;
+
+
+/*!
+ *  @brief dhcp4c_ip_down_ind_struct describe ip down indicate information
+ *         of DHCPv4 Client
+ */
+typedef struct _dhcp4c_ip_down_ind_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief DHCPv4 Client instance identifier
+     */
+    kal_uint8       dhcp_id;
+} dhcp4c_ip_down_ind_struct;
+
+
+#endif  // _DHCP4C_STRUCT_H
+
diff --git a/mcu/interface/middleware/hif/dpfm_api.h b/mcu/interface/middleware/hif/dpfm_api.h
new file mode 100644
index 0000000..06fdc92
--- /dev/null
+++ b/mcu/interface/middleware/hif/dpfm_api.h
@@ -0,0 +1,266 @@
+/*****************************************************************************
+*  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) 2015
+*
+*  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:
+ * ---------
+ *   dpfm_api.h
+ *
+ * Project:
+ * --------
+ *   UMOLY
+ *
+ * Description:
+ * ------------
+ *   
+ *
+ * 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!
+ * 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 __DPFM_API_H
+#define __DPFM_API_H
+
+#include "hif_ior.h"
+#include "hif_mw_msgid.h"
+#include "ipc_api.h"
+#include "ipc_defs_public.h"
+#include "ipc_enums.h"
+
+#include "dpfm_enums.h"
+#include "dpfm_struct.h"
+
+/*------------------------------------------------------------------------------
+ * Constant definition.
+ *----------------------------------------------------------------------------*/
+#define DPFM_VERSION             2
+#define DPFM_MAX_CT_TABLE_NUM    64
+
+#define DPFM_PKT_TYPE_FILTER_DEL_ACK    0x1
+
+/*------------------------------------------------------------------------------
+ * Global variables.
+ *----------------------------------------------------------------------------*/
+
+/*------------------------------------------------------------------------------
+ * Helper Macro.
+ *----------------------------------------------------------------------------*/
+#define DPFM_GET_PKT_TYPE_FROM_PSN(_psn) (((_psn) & 0x0F00) >> 8)
+
+/*------------------------------------------------------------------------------
+ * Public fucntions.
+ *----------------------------------------------------------------------------*/
+kal_bool dpfm_init(void);
+kal_bool dpfm_reset(void);
+void dpfm_on_ilm(ilm_struct *ilm);
+kal_int32 dpfm_enable(void *info);
+kal_int32 dpfm_disable(void *info);
+kal_int32 dpfm_activate(void *info);
+kal_int32 dpfm_deactivate(void *info);
+
+/*!
+ * Update global alert data usage base on the received packet.
+ *
+ * @param   packet_len [IN] Length of the packet
+ * @param   netif_id [IN] netif_id for the packet.
+ */
+void dpfm_update_global_alert_data_usage(kal_uint32 packet_len, kal_uint32 netif_id);
+
+/*!
+ * Update iquota data usage base on the received packet.
+ *
+ * @param   uplink [IN] Is uplink traffic. false for downlink traffic.
+ * @param   in_netif_id [IN] Source netif_id for the packet.
+ * @param   out_netif_id [IN] Destination netif_id for the packet.
+ * @param   protocol [IN] Protocol of the packet
+ * @param   packet_len [IN] Length of the packet
+ */
+void dpfm_update_iquota_data_usage(kal_bool uplink, kal_uint32 in_netif_id, kal_uint32 out_netif_id, kal_uint8 protocol, kal_uint32 packet_len);
+
+/*!
+ * Check the packet should be sent to which netif.
+ *
+ * @param   uplink [IN] Is uplink traffic. false for downlink traffic.
+ * @param   ip_type [IN] IP type of the packet.
+ * @param   pkt_des [IN] Descriptor of the packet.
+ * @param   in_netif_id [IN] Source netif_id for the packet.
+ * @param   out_netif_id [OUT] Destination netif_id for the packet.
+ *
+ * @return  KAL_TRUE if match DPFM SW filter. KAL_FALSE otherwise.
+ */
+kal_bool dpfm_check_route(kal_bool uplink, kal_uint8 ip_type, ipc_pkt_des_t *pkt_des, kal_uint32 in_netif_id, kal_uint32 *out_netif_id);
+
+/*!
+ * Check if the packet needed to add filter.
+ *
+ * @param   uplink [IN] Is uplink traffic. false for downlink traffic.
+ * @param   pkt_des [IN] Descriptor of the packet.
+ * @param   in_netif_id [IN] Source netif_id for the packet.
+ */
+void dpfm_track_packet(kal_bool uplink, ipc_pkt_des_t *pkt_des, kal_uint32 in_netif_id);
+
+/*!
+ * Process SW filter according to HW filter command result.
+ *
+ * @param   pkt_des [IN] Descriptor of the packet.
+ */
+void dpfm_process_filter_cmd_result(ipc_pkt_des_t *pkt_des);
+
+/*!
+ * Register to DPFM LAN device.
+ *
+ * @param   lan_dev_id [IN] DPFM LAN device id.
+ * @param   dev_info [IN] lan device information.
+ *
+ * @return  KAL_TRUE if register successfully. KAL_FALSE otherwise.
+ */
+kal_bool dpfm_lan_dev_register(kal_uint8 lan_dev_id, dpfm_lan_dev_info_t *dev_info);
+
+/*!
+ * Query DPFM is activated.
+ *
+ * @return  KAL_TRUE if DPFM is activated. KAL_FALSE otherwise.
+ */
+kal_bool dpfm_is_active(void);
+
+/*!
+ * Get DPFM SW filter according to filter id.
+ *
+ * @param   filter_id [IN] DPFM SW filter id.
+ *
+ * @return  SW filter if found. NULL otherwise.
+ */
+dpfm_filter_t* dpfm_find_filter_by_id(kal_int16 filter_id);
+
+/*!
+ * Remove DPFM sensitive data.
+ */
+void dpfm_module_clean(void);
+
+#endif
diff --git a/mcu/interface/middleware/hif/dpfm_enums.h b/mcu/interface/middleware/hif/dpfm_enums.h
new file mode 100644
index 0000000..6d69afc
--- /dev/null
+++ b/mcu/interface/middleware/hif/dpfm_enums.h
@@ -0,0 +1,105 @@
+/*****************************************************************************
+*  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:
+ * ---------
+ *   dpfm_enums.h
+ *
+ * Project:
+ * --------
+ *   UMOLYA
+ *
+ * Description:
+ * ------------
+ *   
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __DPFM_ENUMS_H
+#define __DPFM_ENUMS_H
+
+typedef enum _dpfm_action_e {
+    DPFM_ACTION_ADD,
+    DPFM_ACTION_DELETE,
+} dpfm_action_e;
+
+typedef enum _dpfm_rule_tag_info_e {
+    DPFM_RULE_TAG_NORMAL_PACKET = 0,
+    DPFM_RULE_TAG_FAKE_DL_NAT_PACKET,
+} dpfm_rule_tag_info_e;
+
+typedef enum _dpfm_lan_dev_e {
+    DPFM_LAN_DEV_USB   = 0,
+    DPFM_LAN_DEV_WIFI  = 1,
+    DPFM_LAN_DEV_CNT,
+    DPFM_LAN_DEV_DUMMY = 0xFF,
+} dpfm_lan_dev_e;
+
+typedef enum _dpfm_ct_protocol_e {
+    DPFM_CT_PROTOCOL_TCP = 0,
+    DPFM_CT_PROTOCOL_UDP,
+    DPFM_CT_PROTOCOL_CNT,
+} dpfm_ct_protocol_e;
+
+typedef enum _dpfm_filter_state_e {
+    DPFM_F_STATE_UNINIT             = 0,
+    DPFM_F_STATE_ACTIVE             = 1,
+    DPFM_F_STATE_LAN_DEV_DELETING   = 2,
+    DPFM_F_STATE_HW_DELETING        = 3,
+} dpfm_filter_state_e;
+
+#endif
+
diff --git a/mcu/interface/middleware/hif/dpfm_mdfpm_struct.h b/mcu/interface/middleware/hif/dpfm_mdfpm_struct.h
new file mode 100644
index 0000000..4c3f9c5
--- /dev/null
+++ b/mcu/interface/middleware/hif/dpfm_mdfpm_struct.h
@@ -0,0 +1,109 @@
+/*****************************************************************************
+*  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:
+ * ---------
+ *   dpfm_mdfpm_struct.h
+ *
+ * Project:
+ * --------
+ *   VMOLY
+ *
+ * Description:
+ * ------------
+ *   
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __DPFM_MDFPM_STRUCT_H
+#define __DPFM_MDFPM_STRUCT_H
+
+#include "mdfpm_public_api.h"
+#include "dpfm_struct.h"
+
+/*------------------------------------------------------------------------------
+ * Constant definition.
+ *----------------------------------------------------------------------------*/
+#define DPFM_PARTIAL_CT_TABLE_NUM    ((MDFPM_TTY_BUF_SZ - 8) / sizeof(dpfm_ct_nat_table_entry_t))
+#define DPFM_MAX_CT_TABLE_NUM        64
+
+/*------------------------------------------------------------------------------
+ * Data Structure.
+ *----------------------------------------------------------------------------*/
+#ifdef __TEMP_MDDP_WH_SUPPORT__
+/* Partial CT NUM = (MDFPM_BUF_SZ - HDR) / sizeof(dpfm_ct_nat_table_entry_t) */
+typedef struct _dpfm_notify_ct_timeout_ind_struct {
+    LOCAL_PARA_HDR
+    kal_uint16 entry_num;
+    dpfm_ct_nat_table_entry_t ct_nat_table_entry[DPFM_PARTIAL_CT_TABLE_NUM];
+} dpfm_notify_ct_timeout_ind_struct;
+#else 
+typedef struct _dpfm_notify_ct_timeout_ind_struct {
+    LOCAL_PARA_HDR
+    kal_uint16 entry_num;
+    dpfm_ct_nat_table_entry_t ct_nat_table_entry[DPFM_MAX_CT_TABLE_NUM];
+} dpfm_notify_ct_timeout_ind_struct;
+#endif 
+
+typedef struct _dpfm_set_global_alert_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 cmd;
+    dpfm_global_alert_t ga;
+} dpfm_set_global_alert_req_struct;
+
+#endif /* __DPFM_MDFPM_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/dpfm_struct.h b/mcu/interface/middleware/hif/dpfm_struct.h
new file mode 100644
index 0000000..8c1716f
--- /dev/null
+++ b/mcu/interface/middleware/hif/dpfm_struct.h
@@ -0,0 +1,357 @@
+/*****************************************************************************
+*  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:
+ * ---------
+ *   dpfm_struct.h
+ *
+ * Project:
+ * --------
+ *   VMOLY
+ *
+ * Description:
+ * ------------
+ *   
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __DPFM_STRUCT_H
+#define __DPFM_STRUCT_H
+
+#include "hif_lhif.h"
+
+/*------------------------------------------------------------------------------
+ * Constant definition.
+ *----------------------------------------------------------------------------*/
+#define DPFM_MAX_FILTER_CNT          128
+#define DPFM_MAX_LAN_DEV_USER_NUM    16
+#define DPFM_HASH_TABLE_SIZE         128
+#define DPFM_MAX_HW_FILTER_CNT       128
+#define DPFM_MAX_HW_CMD_CNT          128
+
+#define DPFM_DECLARE_OBJECT \
+            kal_int32       ref_count; \
+            kal_int32       reader_cnt; \
+            kal_int32       writer_cnt;
+/*------------------------------------------------------------------------------
+ * Data Structure.
+ *----------------------------------------------------------------------------*/
+typedef struct _dpfm_ipv4_rule_t {
+    kal_uint32      private_ip;
+    kal_uint32      public_ip;
+    kal_uint32      remote_ip;
+    kal_uint16      private_port;
+    kal_uint16      public_port;
+    kal_uint16      remote_port;
+    kal_uint8       protocol;
+    kal_uint8       reserved;
+    kal_uint32      lan_netif_id;
+    kal_uint32      wan_netif_id;
+} dpfm_ipv4_rule_t;
+
+typedef struct _dpfm_ipv6_rule_t {
+    kal_uint32      private_ip[4];
+    kal_uint32      remote_ip[4];
+    kal_uint16      private_port;
+    kal_uint16      remote_port;
+    kal_uint8       protocol;
+    kal_uint8       reserved[3];
+    kal_uint32      lan_netif_id;
+    kal_uint32      wan_netif_id;
+} dpfm_ipv6_rule_t;
+
+typedef struct _dpfm_tag_packet_t {
+    kal_uint16  guard_pattern;
+    kal_uint8   version;
+    kal_uint8   tag_len;
+    union {
+        struct {
+            kal_uint8   in_netif_id;
+            kal_uint8   out_netif_id;
+            kal_uint16  port;
+        } v1;
+        struct {
+            kal_uint8   tag_info;
+            kal_uint8   reserved;
+            kal_uint16  port;
+            kal_uint32  lan_netif_id;
+            kal_uint32  ip;
+        } v2;
+    } type;
+} dpfm_tag_packet_t;
+
+typedef struct _dpfm_lan_dev_info_t {
+    kal_uint32  netif_id;
+    kal_uint8   net_type;
+    kal_bool    (*notify_add_rule)(kal_int16 filter_id, kal_uint8 *tag);
+    kal_bool    (*notify_match_rule)(kal_bool is_uplink, kal_int16 filter_id);
+    kal_bool    (*notify_del_rule)(kal_int16 filter_id);
+} dpfm_lan_dev_info_t;
+
+typedef struct _dpfm_filter_t {
+    DPFM_DECLARE_OBJECT
+
+    kal_int16               id;
+    kal_uint8               ip_type;
+    kal_uint8               reserved;
+    union {
+        dpfm_ipv4_rule_t     ipv4_rule;
+        dpfm_ipv6_rule_t     ipv6_rule;
+    } rule;
+    kal_uint32              lan_netif_id;
+    kal_uint32              wan_netif_id;
+    struct _dpfm_filter_t   *next_filter[2];
+    kal_uint32              last_access_time;
+    dpfm_filter_state_e     state;
+} dpfm_filter_t;
+
+typedef struct _dpfm_ipv6_filter_t {
+    DPFM_DECLARE_OBJECT
+
+    kal_uint32      ip[4];
+    kal_uint8       is_valid;
+    kal_uint8       reserved[3];
+    kal_uint32      netif_id;
+} dpfm_ipv6_filter_t;
+
+typedef struct _dpfm_filter_list_t {
+    DPFM_DECLARE_OBJECT
+
+    dpfm_filter_t    *filter;
+} dpfm_filter_list_t;
+
+typedef struct _dpfm_ipv6_dl_filter_cbk_context_t {
+    kal_uint8       lan_dev_id;
+    kal_uint8       reserved[3];
+    kal_uint32      lan_dev_user_id;
+} dpfm_ipv6_dl_filter_cbk_context_t;
+
+typedef struct _dpfm_lan_dev_t {
+    kal_bool                            is_activated;
+    dpfm_lan_dev_info_t                  info;
+    kal_uint32                          private_ip;
+    kal_int32                           ipv6_dl_filter_id[DPFM_MAX_LAN_DEV_USER_NUM][DPFM_CT_PROTOCOL_CNT];
+    kal_uint32                          ipv6_dl_filter_cnt[DPFM_MAX_LAN_DEV_USER_NUM];
+    dpfm_ipv6_filter_t                   ipv6_dl_filters[DPFM_MAX_LAN_DEV_USER_NUM];
+    dpfm_ipv6_dl_filter_cbk_context_t    ipv6_dl_filter_cbk_context[DPFM_MAX_LAN_DEV_USER_NUM];
+} dpfm_lan_dev_t;
+
+typedef struct _dpfm_ct_timeout_t {
+    kal_uint32          value;
+    kal_uint32          cnt;
+} dpfm_ct_timeout_t;
+
+typedef struct _dpfm_hw_cmd_q_t {
+    kal_bool                    is_send_ilm;
+    kal_uint32                  read_idx;
+    kal_uint32                  write_idx;
+    kal_int16                   filter_id[DPFM_MAX_FILTER_CNT];
+    lhif_ul_nat_inband_data_t   cmd[DPFM_MAX_FILTER_CNT];
+} dpfm_hw_cmd_q_t;
+
+typedef struct _dpfm_t {
+    kal_bool            is_activated;
+    kal_uint32          user_cnt;
+    kal_uint32          ccmni_lan_netif_id;
+    kal_int16           filter_cmd_read_index;
+    kal_int16           filter_cmd_write_index;
+    kal_int16           filter_id_by_cmd_id[DPFM_MAX_HW_CMD_CNT];
+    kal_int16           filter_id_by_index[DPFM_MAX_HW_FILTER_CNT];
+    kal_uint32          filter_cnt;
+    dpfm_filter_t       filters[DPFM_MAX_FILTER_CNT];
+    dpfm_filter_list_t  hash_table[2][DPFM_HASH_TABLE_SIZE]; // uplink & downlink
+    dpfm_lan_dev_t      lan_dev[DPFM_LAN_DEV_CNT];
+    dpfm_ct_timeout_t   ct_timeout[DPFM_CT_PROTOCOL_CNT];
+    kal_bool            is_filter_send_hw_cmd[DPFM_MAX_FILTER_CNT];
+    dpfm_hw_cmd_q_t     hw_cmd_q;
+} dpfm_t;
+
+#ifdef __TEMP_MDDP_WH_SUPPORT__
+typedef struct _dpfm_ct_nat_table_entry_t {
+    kal_uint32      private_ip;
+    kal_uint32      target_ip;
+    kal_uint32      public_ip;
+    kal_uint16      private_port;
+    kal_uint16      target_port;
+    kal_uint16      public_port;
+    kal_uint8       protocol;
+    kal_uint8       reserved;
+    kal_uint32      timestamp;
+    kal_bool        dst_nat;
+} dpfm_ct_nat_table_entry_t;
+#else 
+typedef struct _dpfm_ct_nat_table_entry_t {
+    kal_uint32      private_ip;
+    kal_uint16      private_port;
+    kal_uint32      target_ip;
+    kal_uint16      target_port;
+    kal_uint32      public_ip;
+    kal_uint16      public_port;
+    kal_uint8       protocol;
+    kal_uint8       reserved;
+    kal_uint32      timestamp;
+    kal_bool        dst_nat;
+} dpfm_ct_nat_table_entry_t;
+#endif 
+
+/* ILM structures definition for Data Usage */
+typedef struct _dpfm_global_alert_t {
+    kal_uint32     trans_id;
+    kal_uint32     status;                 //unused
+    kal_uint64     measure_buffer_size;
+    kal_int8       dpfm_id;
+    kal_uint8      reserved[3];
+} dpfm_global_alert_t;
+
+typedef struct _dpfm_iquota_t {
+    kal_uint32     trans_id;
+    kal_uint32     status;                 //unused
+    kal_uint64     limit_buffer_size;
+    kal_int8       dpfm_id;
+    kal_uint8      reserved[3];
+} dpfm_iquota_t;
+
+typedef struct _dpfm_data_usage_cmd_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 cmd;
+} dpfm_data_usage_cmd_struct;
+
+typedef struct _dpfm_alert_global_alert_ind_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 cmd;
+    dpfm_global_alert_t ga;
+} dpfm_alert_global_alert_ind_struct;
+
+typedef struct _dpfm_set_iquota_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 cmd;
+    dpfm_iquota_t iq;
+} dpfm_set_iquota_req_struct;
+
+typedef struct _dpfm_alert_iquota_ind_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 cmd;
+    dpfm_iquota_t iq;
+} dpfm_alert_iquota_ind_struct;
+
+typedef struct _dpfm_del_iquota_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 cmd;
+    dpfm_iquota_t iq;
+} dpfm_del_iquota_req_struct;
+
+#ifdef __TEMP_MDDP_WH_SUPPORT__
+typedef struct _dpfm_set_ct_timeout_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 udp_timeout_value;
+    kal_uint32 tcp_timeout_value;
+    kal_uint8  reserved[4];
+} dpfm_set_ct_timeout_req_struct;
+
+typedef struct _dpfm_set_ct_timeout_rsp_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 udp_timeout_value;
+    kal_uint32 tcp_timeout_value;
+    kal_uint8  result; //bool
+    kal_uint8  reserved[3];
+} dpfm_set_ct_timeout_rsp_struct;
+
+#else 
+typedef struct _dpfm_set_ct_timeout_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 tcp_timeout_value;
+    kal_uint32 udp_timeout_value;
+    kal_uint8  reserved[4];
+} dpfm_set_ct_timeout_req_struct;
+
+typedef struct _dpfm_set_ct_timeout_rsp_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 tcp_timeout_value;
+    kal_uint32 udp_timeout_value;
+    kal_uint8  result; //bool
+    kal_uint8  reserved[3];
+} dpfm_set_ct_timeout_rsp_struct;
+
+#endif 
+typedef struct _dpfm_lan_dev_del_filter_ind_struct {
+    LOCAL_PARA_HDR
+    kal_int16 filter_id;
+    kal_uint8 reserved[2];
+} dpfm_lan_dev_del_filter_ind_struct;
+
+#endif
+
diff --git a/mcu/interface/middleware/hif/ethercore_struct.h b/mcu/interface/middleware/hif/ethercore_struct.h
new file mode 100644
index 0000000..d008376
--- /dev/null
+++ b/mcu/interface/middleware/hif/ethercore_struct.h
@@ -0,0 +1,77 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+#ifndef _ETHERCORE_STRUCT_H
+#define _ETHERCORE_STRUCT_H
+
+
+/*!
+ *  @brief ethc_device_instance_t describe instance of a generic ether device
+ */
+typedef struct _ethc_device_instance {
+    /*!
+     *  @brief instance id of this device
+     */
+    kal_uint8   eth_id;
+} ethc_device_instance_t;
+
+/*!
+ * @brief ethc_link_req_type_e link request type
+ */
+typedef enum _ethc_link_req_type_e {
+    ETHC_LINK_REQ_TYPE_NORMAL,
+    ETHC_LINK_REQ_TYPE_DPFM,
+} ethc_link_req_type_e;
+
+/*!
+ *  @brief ethc_device_link_msg_t describe link message used to notify link up
+ *         and up to ether device
+ */
+typedef struct _ethc_device_link_msg {
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief instance of ether device
+     */
+    ethc_device_instance_t* instance;
+    ethc_link_req_type_e req_type;
+} ethc_device_link_msg_t;
+
+
+/*------------------------------------------------------------------------------
+ * DHL logging structure
+ *----------------------------------------------------------------------------*/
+typedef ethc_device_link_msg_t ethercore_link_up_req_struct;
+typedef ethc_device_link_msg_t ethercore_link_down_req_struct;
+
+#endif /* _ETHERCORE_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/hif_esl_common.h b/mcu/interface/middleware/hif/hif_esl_common.h
new file mode 100644
index 0000000..c0ff571
--- /dev/null
+++ b/mcu/interface/middleware/hif/hif_esl_common.h
@@ -0,0 +1,79 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *    hif_esl_common.h
+ *
+ * Project:
+ * --------
+ *   UMOLY
+ *
+ * Description:
+ * ------------
+ *    This file intends for ESL common definition
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *============================================================================
+ *             HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+#ifndef _HIF_ESL_COMMON_H_
+#define _HIF_ESL_COMMON_H_
+
+#include "kal_general_types.h"
+
+#define default_ccmni_netif 0x00
+#define default_mbim_netif  0x200
+#define default_rndis_netif 0x100
+#define default_ecm_netif   0x100
+
+typedef struct _hif_esl_netif_parm {
+    LOCAL_PARA_HDR
+    kal_uint32 netif_id;
+} hif_esl_netif_parm;
+
+#endif /* _HIF_ESL_COMMON_H_ */
+
diff --git a/mcu/interface/middleware/hif/hif_ior.h b/mcu/interface/middleware/hif/hif_ior.h
new file mode 100644
index 0000000..de49bb4
--- /dev/null
+++ b/mcu/interface/middleware/hif/hif_ior.h
@@ -0,0 +1,129 @@
+/*!
+ *  @file hif_ior.h
+ *  @author Roger Huang <chaomin.haung@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides generic HIF IO Request interface of all HIF module
+ */
+
+#ifndef __HIF_IOR_H__
+#define __HIF_IOR_H__
+
+#include "qmu_bm.h"
+
+/*!
+ *  @brief hif_io_request_t is a typedef of struct _hif_io_request
+ */
+typedef struct _hif_io_request hif_io_request_t;
+/*!
+ *  @brief struct _hif_io_request describe io request used to communicate
+ *         between hif modules
+ */
+struct _hif_io_request {
+    /*!
+     *  @brief next io request
+     */
+    hif_io_request_t*       next_request;
+    /*!
+     *  @brief pointer to current gpd of this io request
+     */
+    qbm_gpd*                first_gpd;
+    /*!
+     *  @brief pointer to last gpd of this io request
+     */
+    qbm_gpd*                last_gpd;
+};
+
+
+/*!
+ *  @brief hif_io_request_list_t is a typedef of struct _hif_io_request_list
+ */
+typedef struct _hif_io_request_list hif_io_request_list_t;
+/*!
+ *  @brief struct _hif_io_request_list describe io request list used to
+ *                store io request
+ */
+struct _hif_io_request_list {
+    /*!
+     *  @brief pointer to head of this io request list
+     */
+    hif_io_request_t*       head;
+    /*!
+     *  @brief pointer to tail of this io request list
+     */
+    hif_io_request_t*       tail;
+};
+
+
+#define HIF_LIST_INIT(_list)                                \
+    ((_list)->head = (_list)->tail = NULL)
+
+
+#define HIF_LIST_IS_EMPTY(_list)                            \
+    ((_list)->head == NULL)
+
+
+#define HIF_LIST_GET_HEAD(_list)                            \
+    ((_list)->head)
+
+
+#define HIF_LIST_GET_TAIL(_list)                            \
+    ((_list)->tail)
+
+
+#define HIF_LIST_POP_HEAD(_list)                            \
+    ((_list)->head);                                        \
+    {                                                       \
+        void* next;                                         \
+        next = (_list)->head->next_request;                 \
+        (_list)->head = next;                               \
+        if (next == NULL) {                                 \
+            (_list)->tail = NULL;                           \
+        }                                                   \
+    }
+
+
+#define HIF_LIST_PUSH_TAIL(_list, _entry)                   \
+    {                                                       \
+        (_entry)->next_request = NULL;                      \
+        if ((_list)->tail) {                                \
+            (_list)->tail->next_request = (_entry);         \
+        } else {                                            \
+            (_list)->head = (_entry);                       \
+        }                                                   \
+        (_list)->tail = (_entry);                           \
+    }
+
+#endif  // __HIF_IOR_H__
diff --git a/mcu/interface/middleware/hif/ipc_api.h b/mcu/interface/middleware/hif/ipc_api.h
new file mode 100644
index 0000000..02a3237
--- /dev/null
+++ b/mcu/interface/middleware/hif/ipc_api.h
@@ -0,0 +1,1540 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   ipc_api.h
+ *
+ * Project:
+ * --------
+ *   TATAKA
+ *
+ * Description:
+ * ------------
+ *   IP Core public structure and interface definition.
+ *
+ * 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!
+ *
+ * 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!
+ * 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!
+ *
+ * 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!
+ * 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 __INC_IPC_API_H
+#define __INC_IPC_API_H
+
+#include "hif_ior.h"
+#include "hif_mw_msgid.h" /*< expected to remove it when other other module include the header file */
+#include "lhif_if.h"
+
+#include "ipc_defs_public.h"
+#include "ipc_enums.h"
+#include "ipc_struct.h"
+
+/*------------------------------------------------------------------------------
+ * Data structure definition.
+ *----------------------------------------------------------------------------*/
+typedef struct _ipc_pkt_des_t {
+    ipc_pkt_des_type_e          des_type;
+    kal_uint8                  *packet;
+    kal_uint32                  packet_len;
+    union {
+        struct {
+            qbm_gpd            *gpd;
+            qbm_gpd            *bd;
+        };
+        struct {
+            upcm_did           *did;
+            kal_uint32          pkt_start_idx;
+            kal_uint16          psn;
+        };
+        struct {
+            lhif_meta_tbl_t    *meta;
+        };
+        struct {
+            void               *ipf_meta;
+        };
+    };
+    ipc_filter_t              **matched_filter;
+    ipc_filter_info_t          *filter_info;
+    kal_bool                    is_packet_info;     /**< KAL_TRUE : Already parsed packet_info, KAL_FALSE : Not parsed packet_info yet */
+    ipc_packet_info_t          *packet_info;
+    kal_uint8                   ip_type;
+} ipc_pkt_des_t;
+
+typedef struct _ipc_pkt_t {
+    union {
+        kal_bool            isGPD;      /**< KAL_TRUE : Describe GPD list (with head/tail), KAL_FALSE : Describe single data buffer (with pointer/length) */
+        ipc_pkt_des_type_e  buf_type;   /**< Buffer type */
+    };
+
+    union {
+        /* Used if buf_type == IPC_PKT_DES_TYPE_GPD */
+        /* Used if isGPD == KAL_FALSE */
+        struct {
+            qbm_gpd    *head;      /**< Head of GPD List. Used if isGPD == KAL_TRUE */
+            qbm_gpd    *tail;      /**< Tail of GPD List. Used if isGPD == KAL_TRUE */
+        };
+
+        /* Used if buf_type == IPC_PKT_DES_TYPE_DID */
+        struct {
+            upcm_did   *did_head;      /**< Head of DID List. Used if buf_type == IPC_PKT_DES_TYPE_DID */
+            upcm_did   *did_tail;      /**< Tail of DID List. Used if buf_type == IPC_PKT_DES_TYPE_DID */
+        };
+
+        /* Used if buf_type == IPC_PKT_DES_TYPE_META */
+        struct {
+            kal_uint32   start_idx;    /**< Start of meta List. Used if buf_type == IPC_PKT_DES_TYPE_META */
+            kal_uint32   end_idx;      /**< End of DID List. Used if buf_type == IPC_PKT_DES_TYPE_META */
+        };
+    };
+
+    /* Used if buf_type == IPC_PKT_DES_TYPE_NO_DESC */
+    /* Used if isGPD == KAL_FALSE */
+    kal_uint8   *data;      /**< Data pointer of buffer. Used if isGPD == KAL_FALSE */
+    kal_uint32  data_len;   /**< Data pointer of buffer. Used if isGPD == KAL_FALSE */
+
+} ipc_pkt_t;
+/*------------------------------------------------------------------------------
+ * Helper Macro.
+ *----------------------------------------------------------------------------*/
+/*
+ * IPv4/IPv6 common.
+ */
+#define IPC_NE_GET_1B(_buf) \
+            ((kal_uint8)*((kal_uint8 *)(_buf)))
+#define IPC_NE_SET_1B(_buf, _value) \
+            do { \
+                *((kal_uint8 *)(_buf)) = (kal_uint8)(_value); \
+            } while (0)
+
+#ifndef IPC_ON_BIG_ENDIAN_PLATFORM /* little-endian platform */
+    #define IPC_NE_GET_2B(_buf) \
+            ( (((kal_uint16)*((kal_uint8 *)(_buf) + 0)) << 8) | \
+              (((kal_uint16)*((kal_uint8 *)(_buf) + 1)) << 0) )
+
+    #define IPC_NE_SET_2B(_buf, _value) \
+            do { \
+                *((kal_uint8 *)(_buf) + 0) = (kal_uint8)((_value) >> 8); \
+                *((kal_uint8 *)(_buf) + 1) = (kal_uint8)((_value) >> 0); \
+            } while (0)
+
+    #define IPC_NE_GET_4B(_buf) \
+            ( (((kal_uint32)*((kal_uint8 *)(_buf) + 0)) << 24) | \
+              (((kal_uint32)*((kal_uint8 *)(_buf) + 1)) << 16) | \
+              (((kal_uint32)*((kal_uint8 *)(_buf) + 2)) << 8) | \
+              (((kal_uint32)*((kal_uint8 *)(_buf) + 3)) << 0) )
+
+    #define IPC_NE_SET_4B(_buf, _value) \
+            do { \
+                *((kal_uint8 *)(_buf) + 0) = (kal_uint8)((_value) >> 24); \
+                *((kal_uint8 *)(_buf) + 1) = (kal_uint8)((_value) >> 16); \
+                *((kal_uint8 *)(_buf) + 2) = (kal_uint8)((_value) >> 8); \
+                *((kal_uint8 *)(_buf) + 3) = (kal_uint8)((_value) >> 0); \
+            } while (0)
+
+    #define IPC_H2N_2B(_value) \
+            (((kal_uint16)(_value) >> 8) | (((kal_uint16)(_value) & 0xff) << 8))
+
+#else /* big-endian platform */
+    #define IPC_NE_GET_2B(_buf) \
+        ( (((kal_uint16)*((kal_uint8 *)(_buf) + 0)) << 0) | \
+          (((kal_uint16)*((kal_uint8 *)(_buf) + 1)) << 8) )
+
+    #define IPC_NE_SET_2B(_buf, _value) \
+        do { \
+            *((kal_uint8 *)(_buf) + 0) = (kal_uint8)((_value) >> 0); \
+            *((kal_uint8 *)(_buf) + 1) = (kal_uint8)((_value) >> 8); \
+        } while (0)
+
+    #define IPC_NE_GET_4B(_buf) \
+        ( (((kal_uint32)*((kal_uint8 *)(_buf) + 0)) << 0) | \
+          (((kal_uint32)*((kal_uint8 *)(_buf) + 1)) << 8) | \
+          (((kal_uint32)*((kal_uint8 *)(_buf) + 2)) << 16) | \
+          (((kal_uint32)*((kal_uint8 *)(_buf) + 3)) << 24) )
+
+    #define IPC_NE_SET_4B(_buf, _value) \
+            do { \
+                *((kal_uint8 *)(_buf) + 0) = (kal_uint8)((_value) >> 0); \
+                *((kal_uint8 *)(_buf) + 1) = (kal_uint8)((_value) >> 8); \
+                *((kal_uint8 *)(_buf) + 2) = (kal_uint8)((_value) >> 16); \
+                *((kal_uint8 *)(_buf) + 3) = (kal_uint8)((_value) >> 24); \
+            } while (0)
+
+    #define IPC_H2N_2B(_value) \
+            ((kal_uint16)(_value))
+#endif
+
+#define IPC_HDR_IS_V4(_ip_hdr) \
+        (0x40 == (*((kal_uint8 *)(_ip_hdr)) & 0xf0))
+
+#define IPC_HDR_IS_V6(_ip_hdr) \
+        (0x60 == (*((kal_uint8 *)(_ip_hdr)) & 0xf0))
+
+
+#define IPC_CP_ADDR(_dst, _src, _len) \
+        kal_mem_cpy((_dst), (_src), (_len))
+
+#define IPC_EQ_ADDR(_addr1, _addr2, _len) \
+        (0 == kal_mem_cmp((_addr1), (_addr2), (_len)))
+
+#define IPC_EQ_2BYTE(_ptr1, _ptr2) \
+        (   ((*(kal_uint8 *)(_ptr1)) == (*((kal_uint8 *)(_ptr2)))) && \
+            ((*((kal_uint8 *)(_ptr1) + 1)) == (*(((kal_uint8 *)(_ptr2) + 1))))    )
+
+#define IPC_EQ_1BYTE(_ptr1, _ptr2) \
+        ((*(kal_uint8 *)(_ptr1)) == (*((kal_uint8 *)(_ptr2))))
+
+
+/*
+ * IANA IP Protocol Numbers.
+ * Ref: http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
+ */
+#define IPC_HDR_PROT_IPV6_HOP           0 /* IPv6 Hop-by-Hop Option */
+#define IPC_HDR_PROT_ICMP               1 /* Internet Control Message */
+#define IPC_HDR_PROT_IGMP               2 /* Internet Group Message */
+#define IPC_HDR_PROT_IPV4_ENC           4 /* IPv4 encapsulation */
+#define IPC_HDR_PROT_TCP                6 /* Transmission Control */
+#define IPC_HDR_PROT_UDP                17 /* User Datagram */
+#define IPC_HDR_PROT_IPV6_ENC           41 /* IPv6 encapsulation */
+#define IPC_HDR_PROT_IPV6_ROUTE         43 /* Routing Header for IPv6 */
+#define IPC_HDR_PROT_IPV6_FRAG          44 /* Fragment Header for IPv6 */
+#define IPC_HDR_PROT_ESP                50 /* Encap Security Payload */
+#define IPC_HDR_PROT_AH                 51 /* Authentication Header */
+#define IPC_HDR_PROT_ICMPV6             58 /* ICMP for IPv6 */
+#define IPC_HDR_PROT_IPV6_NONEXT        59 /* No Next Header for IPv6 */
+#define IPC_HDR_PROT_IPV6_DEST          60 /* Destination Options for IPv6 */
+
+/*
+ * IPv4.
+ */
+#define IPC_HDR_V4_ADDR_SIZE        (4)
+#define IPC_HDR_V4_HEADER_SIZE      (20)
+
+#define IPC_HDR_V4_GET_IHL(_ip_header) \
+        ((IPC_NE_GET_1B(_ip_header) & 0x0f) << 2)
+
+#define IPC_HDR_V4_SET_IHL(_ip_header, _ihl) \
+        do { \
+            IPC_NE_SET_1B(_ip_header, (IPC_NE_GET_1B(_ip_header) & 0xF0) | (((kal_uint8)(_ihl)>>2) & 0x0F)); \
+        } while (0)
+
+/*
+ * 2016/02/24 Peter.Hsu
+ * To support ECN, we extend existing DSCP API to cover ECN due to backward compatibility.
+ */
+
+/* Get/Set both DSCP & ECN (total 8 bits) */
+#define IPC_HDR_V4_GET_DSCP(_ip_header) \
+        (IPC_NE_GET_1B(((kal_uint8*)(_ip_header)) + 1))
+
+#define IPC_HDR_V4_SET_DSCP(_ip_header, _dscp_ecn) \
+        do { \
+            IPC_NE_SET_1B(((kal_uint8*)(_ip_header)) + 1, IPC_NE_GET_1B(((kal_uint8*)(_ip_header)) + 1) | (kal_uint8)(_dscp_ecn)); \
+        } while (0)
+
+#define IPC_HDR_V4_RESET_VER_IHL_DSCP_ECN(_ip_header) \
+        do { \
+            IPC_NE_SET_1B(_ip_header, 0x45); \
+            IPC_NE_SET_1B(((kal_uint8 *)(_ip_header)) + 1, 0x00); \
+        } while (0)
+
+#define IPC_HDR_V4_GET_TOTAL_LENGTH(_ip_header) \
+        IPC_NE_GET_2B(((kal_uint8 *)(_ip_header)) + 2)
+
+#define IPC_HDR_V4_SET_TOTAL_LENGTH(_ip_header, _length) \
+        do { \
+            IPC_NE_SET_2B(((kal_uint8 *)(_ip_header)) + 2, _length); \
+        } while (0)
+
+#define IPC_HDR_V4_GET_IDENTITY(_ip_header) \
+        IPC_NE_GET_2B(((kal_uint8 *)(_ip_header)) + 4)
+
+#define IPC_HDR_V4_SET_IDENTITY(_ip_header, _id) \
+        do { \
+            IPC_NE_SET_2B(((kal_uint8 *)(_ip_header)) + 4, _id); \
+        } while (0)
+
+#define IPC_HDR_V4_GET_FLAGS(_ip_header) \
+        ((*(((kal_uint8 *)(_ip_header) + 6))) >> 5)
+
+#define IPC_HDR_V4_SET_FLAGS(_ip_header, _flags) \
+        do { \
+            IPC_NE_SET_1B(((kal_uint8*)(_ip_header)) + 6, (IPC_NE_GET_1B(((kal_uint8*)(_ip_header)) + 6) & 0x1F) | ((kal_uint8)(_flags) << 5));\
+        } while (0)
+
+#define IPC_HDR_V4_IS_MF(_ip_header) \
+        (IPC_HDR_V4_GET_FLAGS(_ip_header) & 0x04)
+
+#define IPC_HDR_V4_GET_FRAG_OFFSET(_ip_header) \
+        (IPC_NE_GET_2B(((kal_uint8 *)(_ip_header)) + 6) & 0x1fff)
+
+#define IPC_HDR_V4_SET_FRAG_OFFSET(_ip_header, _offset) \
+        do { \
+        IPC_NE_SET_2B((((kal_uint8 *)(_ip_header)) + 6), \
+                       ((IPC_NE_GET_2B(((kal_uint8 *)(_ip_header)) + 6) & 0xe000) | \
+                         ((kal_uint16)(_offset) & 0x1fff)) ); \
+        } while (0)
+
+#define IPC_HDR_V4_IS_FRAG(_ip_header) \
+        (IPC_HDR_V4_IS_MF(_ip_header) || (0 != IPC_HDR_V4_GET_FRAG_OFFSET(_ip_header)))
+
+#define IPC_HDR_V4_GET_TTL(_ip_header) \
+        IPC_NE_GET_1B(((kal_uint8 *)(_ip_header)) + 8)
+
+#define IPC_HDR_V4_SET_TTL(_ip_header, _ttl) \
+        do { \
+            IPC_NE_SET_1B(((kal_uint8 *)(_ip_header)) + 8, (kal_uint8)(_ttl)); \
+        } while (0)
+
+#define IPC_HDR_V4_GET_PROTOCOL(_ip_header) \
+        IPC_NE_GET_1B(((kal_uint8 *)(_ip_header)) + 9)
+
+#define IPC_HDR_V4_SET_PROTOCOL(_ip_header, _protocol) \
+        do { \
+            IPC_NE_SET_1B(((kal_uint8 *)(_ip_header)) + 9, (kal_uint8)(_protocol)); \
+        } while (0)
+
+#define IPC_HDR_V4_EQ_PROTOCOL(_ip_header, _protocol)   \
+        (IPC_HDR_V4_GET_PROTOCOL(_ip_header) == (_protocol))
+
+#define IPC_HDR_V4_GET_HEADER_CHECKSUM(_ip_header) \
+        IPC_NE_GET_2B((kal_uint8 *)(_ip_header) + 10)
+
+#define IPC_HDR_V4_SET_HEADER_CHECKSUM(_ip_header, _checksum) \
+        do { \
+            IPC_NE_SET_2B((kal_uint8 *)(_ip_header) + 10, _checksum); \
+        } while (0)
+
+#define IPC_HDR_V4_GET_SRC_ADDR(_ip_header) \
+        ((kal_uint8 *)(_ip_header) + 12)
+
+#define IPC_HDR_V4_SET_SRC_ADDR(_ip_header, _src_ip_addr) \
+        do { \
+            IPC_CP_V4_ADDR(IPC_HDR_V4_GET_SRC_ADDR(_ip_header), _src_ip_addr); \
+        } while (0)
+
+#define IPC_HDR_V4_GET_DST_ADDR(_ip_header) \
+        ((kal_uint8 *)(_ip_header) + 16)
+
+#define IPC_HDR_V4_SET_DST_ADDR(_ip_header, _dst_ip_addr) \
+        do { \
+            IPC_CP_V4_ADDR(IPC_HDR_V4_GET_DST_ADDR(_ip_header), _dst_ip_addr); \
+        } while (0)
+
+#define IPC_HDR_V4_GET_NHPTR(_ip_header) \
+        ((kal_uint8 *)(_ip_header) + IPC_HDR_V4_GET_IHL(_ip_header))
+
+#define IPC_CP_V4_ADDR(_dst, _src) \
+        do { \
+        IPC_CP_ADDR(_dst, _src, IPC_HDR_V4_ADDR_SIZE); \
+        } while (0)
+
+#define IPC_EQ_V4_ADDR(_addr1, _addr2) \
+        IPC_EQ_ADDR(_addr1, _addr2, IPC_HDR_V4_ADDR_SIZE)
+
+#define IPC_IS_V4_CLASSA_ADDR(_addr) \
+        ( 0x00 == (*((kal_uint8 *)(_addr)) & 0xf0) )
+
+#define IPC_IS_V4_CLASSB_ADDR(_addr) \
+        ( 0x80 == (*((kal_uint8 *)(_addr)) & 0xf0) )
+
+#define IPC_IS_V4_CLASSC_ADDR(_addr) \
+        ( 0xc0 == (*((kal_uint8 *)(_addr)) & 0xf0) )
+
+#define IPC_IS_V4_CLASSD_ADDR(_addr) \
+        ( 0xe0 == (*((kal_uint8 *)(_addr)) & 0xf0) )
+
+#define IPC_IS_V4_UNSPECIFIED_ADDR(_addr) \
+        ( 0 == *((kal_uint8*)(_addr)) && \
+          0 == *((kal_uint8*)(_addr)+1) && \
+          0 == *((kal_uint8*)(_addr)+2) && \
+          0 == *((kal_uint8*)(_addr)+3) )
+
+/*
+ * IPv6.
+ */
+#define IPC_HDR_V6_ADDR_SIZE        (16)
+#define IPC_HDR_V6_HEADER_SIZE      (40)
+#define IPC_HDR_V6_MAX_HOP          (255)
+
+#define IPC_HDR_V6_LENGTH_OFFSET    (4)
+#define IPC_HDR_V6_NH_TYPE_OFFSET   (6)
+#define IPC_HDR_V6_HOP_LIMIT_OFFSET (7)
+#define IPC_HDR_V6_SRC_ADDR_OFFSET  (8)
+#define IPC_HDR_V6_DST_ADDR_OFFSET  (24)
+
+#define IPC_HDR_V6_GET_TC(_ip_header) \
+        ((IPC_NE_GET_2B(_ip_header) >> 4) & 0xff)
+
+#define IPC_HDR_V6_SET_TC(_ip_header, _tc) \
+        do { \
+            IPC_NE_SET_2B(_ip_header, \
+                          ((IPC_NE_GET_2B(_ip_header) & 0xf00f) | (((kal_uint16)(_tc) & 0xff) << 4))); \
+        } while (0)
+
+#define IPC_HDR_V6_GET_FLOW_LABEL(_ip_header) \
+        (IPC_NE_GET_4B(_ip_header) & 0xfffff)
+
+#define IPC_HDR_V6_SET_FLOW_LABEL(_ip_header, _flow_label) \
+        do { \
+        IPC_NE_SET_4B(_ip_header, \
+                      ((IPC_NE_GET_4B(_ip_header) & 0xfff00000) | ((kal_uint32)(_flow_label) & 0xfffff))); \
+        } while (0)
+
+#define IPC_HDR_V6_RESET_VER_TC_FL(_ip_header) \
+        do { \
+            kal_mem_set((kal_uint8 *)(_ip_header), 0, 4); \
+            *((kal_uint8 *)(_ip_header)) |= 0x60; \
+        } while (0)
+
+#define IPC_HDR_V6_GET_LENGTH(_ip_header) \
+        IPC_NE_GET_2B((kal_uint8 *)(_ip_header) + IPC_HDR_V6_LENGTH_OFFSET)
+
+#define IPC_HDR_V6_SET_LENGTH(_ip_header, _length) \
+        do { \
+            IPC_NE_SET_2B((kal_uint8 *)(_ip_header) + IPC_HDR_V6_LENGTH_OFFSET, _length); \
+        } while (0)
+
+#define IPC_HDR_V6_GET_NH_TYPE(_ip_header) \
+        IPC_NE_GET_1B(((kal_uint8 *)(_ip_header)) + IPC_HDR_V6_NH_TYPE_OFFSET)
+
+#define IPC_HDR_V6_SET_NH_TYPE(_ip_header, _type) \
+        do { \
+            IPC_NE_SET_1B(((kal_uint8 *)(_ip_header)) + IPC_HDR_V6_NH_TYPE_OFFSET, (kal_uint8)(_type)); \
+        } while (0)
+
+#define IPC_HDR_V6_GET_HOP_LIMIT(_ip_header) \
+        IPC_NE_GET_1B((kal_uint8 *)(_ip_header) + IPC_HDR_V6_HOP_LIMIT_OFFSET)
+
+#define IPC_HDR_V6_SET_HOP_LIMIT(_ip_header, _hop_limit) \
+        do { \
+            IPC_NE_SET_1B(((kal_uint8 *)(_ip_header)) + IPC_HDR_V6_HOP_LIMIT_OFFSET, (kal_uint8)(_hop_limit)); \
+        } while (0)
+
+#define IPC_HDR_V6_GET_SRC_ADDR(_ip_header) \
+        ((kal_uint8 *)(_ip_header) + IPC_HDR_V6_SRC_ADDR_OFFSET)
+
+#define IPC_HDR_V6_SET_SRC_ADDR(_ip_header, _src_ip_addr) \
+        do { \
+            IPC_CP_V6_ADDR(IPC_HDR_V6_GET_SRC_ADDR(_ip_header), _src_ip_addr); \
+        } while (0)
+
+#define IPC_HDR_V6_GET_DST_ADDR(_ip_header) \
+        ((kal_uint8 *)(_ip_header) + IPC_HDR_V6_DST_ADDR_OFFSET)
+
+#define IPC_HDR_V6_SET_DST_ADDR(_ip_header, _dst_ip_addr) \
+        do { \
+            IPC_CP_V6_ADDR(IPC_HDR_V6_GET_DST_ADDR(_ip_header), _dst_ip_addr); \
+        } while (0)
+
+#define IPC_HDR_V6_GET_NHPTR(_ip_header) \
+        ((kal_uint8 *)(_ip_header) + IPC_HDR_V6_HEADER_SIZE)
+
+#define IPC_HDR_V6_SET_DST_SOL_MCST_ADDR(_ip_header, _dst_ip_addr) \
+        do { \
+            *(IPC_HDR_V6_GET_DST_ADDR(_ip_header)) = 0xff; \
+            *(IPC_HDR_V6_GET_DST_ADDR(_ip_header) + 1) = 0x02; \
+            kal_mem_set(IPC_HDR_V6_GET_DST_ADDR(_ip_header) + 2, 0, 9); \
+            *(IPC_HDR_V6_GET_DST_ADDR(_ip_header) + 11) = 0x01; \
+            *(IPC_HDR_V6_GET_DST_ADDR(_ip_header) + 12) = 0xff; \
+            kal_mem_cpy(IPC_HDR_V6_GET_DST_ADDR(_ip_header) + 13, (kal_uint8 *)(_dst_ip_addr) + 13, 3); \
+        } while (0)
+
+#define IPC_HDR_V6EXT_GET_NH_TYPE(_ext_header) \
+        IPC_NE_GET_1B(_ext_header)
+
+#define IPC_HDR_V6EXT_GET_HDR_EXT_LEN(_ext_header) \
+        ((IPC_NE_GET_1B(((kal_uint8*)(_ext_header))+1) + 1) << 3)
+
+#define IPC_IS_V6_LINK_LOCAL_ADDR(_addr) \
+        (   (0xfe == IPC_NE_GET_1B(_addr)) && \
+            (0x80 == IPC_NE_GET_1B(((kal_uint8*)(_addr)) + 1)))
+
+#define IPC_IS_V6_GLOBAL_ADDR(_addr) \
+        ( 0x20 == (IPC_NE_GET_1B(_addr) & 0xe0) )
+
+#define IPC_IS_V6_UNSPECIFIED_ADDR(_addr) \
+        ( 0x00 == *((kal_uint8 *)(_addr)) && \
+          0x00 == *((kal_uint8 *)(_addr) +  1) && \
+          0x00 == *((kal_uint8 *)(_addr) +  2) && \
+          0x00 == *((kal_uint8 *)(_addr) +  3) && \
+          0x00 == *((kal_uint8 *)(_addr) +  4) && \
+          0x00 == *((kal_uint8 *)(_addr) +  5) && \
+          0x00 == *((kal_uint8 *)(_addr) +  6) && \
+          0x00 == *((kal_uint8 *)(_addr) +  7) && \
+          0x00 == *((kal_uint8 *)(_addr) +  8) && \
+          0x00 == *((kal_uint8 *)(_addr) +  9) && \
+          0x00 == *((kal_uint8 *)(_addr) + 10) && \
+          0x00 == *((kal_uint8 *)(_addr) + 11) && \
+          0x00 == *((kal_uint8 *)(_addr) + 12) && \
+          0x00 == *((kal_uint8 *)(_addr) + 13) && \
+          0x00 == *((kal_uint8 *)(_addr) + 14) && \
+          0x00 == *((kal_uint8 *)(_addr) + 15))
+
+#define IPC_IS_V6_MCST_ADDR(_addr) \
+        ( 0xff == IPC_NE_GET_1B(_addr) )
+
+#define IPC_CP_V6_ADDR(_dst, _src) \
+        IPC_CP_ADDR(_dst, _src, IPC_HDR_V6_ADDR_SIZE)
+
+#define IPC_EQ_V6_ADDR(_addr1, _addr2) \
+        IPC_EQ_ADDR(_addr1, _addr2, IPC_HDR_V6_ADDR_SIZE)
+
+/*
+ * IPv6 fragment header
+ */
+#define IPC_HDR_V6_FRAGMENT_HEADER_SIZE (8)
+
+/*
+ * UDP.
+ */
+#define IPC_HDR_UDP_HEADER_SIZE     (8)
+
+#define IPC_HDR_UDP_GET_SRC_PORT(_udp) \
+        IPC_NE_GET_2B(_udp)
+
+#define IPC_HDR_UDP_SET_SRC_PORT(_udp, _src_port) \
+        IPC_NE_SET_2B((kal_uint8 *)(_udp), _src_port)
+
+#define IPC_HDR_UDP_EQ_SRC_PORT(_udp, _src_port)    \
+        (IPC_HDR_UDP_GET_SRC_PORT(_udp) == (_src_port))
+
+#define IPC_HDR_UDP_GET_DST_PORT(_udp) \
+        IPC_NE_GET_2B((kal_uint8 *)(_udp) + 2)
+
+#define IPC_HDR_UDP_SET_DST_PORT(_udp, _dst_port) \
+        IPC_NE_SET_2B((kal_uint8 *)(_udp) + 2, _dst_port)
+
+#define IPC_HDR_UDP_EQ_DST_PORT(_udp, _dst_port)    \
+        (IPC_HDR_UDP_GET_DST_PORT(_udp) == (_dst_port))
+
+#define IPC_HDR_UDP_GET_LENGTH(_udp) \
+        IPC_NE_GET_2B((kal_uint8 *)(_udp) + 4)
+
+#define IPC_HDR_UDP_SET_LENGTH(_udp, _length) \
+        IPC_NE_SET_2B((kal_uint8 *)(_udp) + 4, _length)
+
+#define IPC_HDR_UDP_GET_CHECKSUM(_udp) \
+        IPC_NE_GET_2B((kal_uint8 *)(_udp) + 6)
+
+#define IPC_HDR_UDP_SET_CHECKSUM(_udp, _checksum) \
+        IPC_NE_SET_2B((kal_uint8 *)(_udp) + 6, _checksum)
+
+/*
+ * TCP.
+ */
+#define IPC_HDR_TCP_FLAG_FIN    0x01
+#define IPC_HDR_TCP_FLAG_SYN    0x02
+#define IPC_HDR_TCP_FLAG_RST    0x04    // Reset
+#define IPC_HDR_TCP_FLAG_PUSH   0x08
+#define IPC_HDR_TCP_FLAG_ACK    0x10
+#define IPC_HDR_TCP_FLAG_URG    0x20    // Urgent
+#define IPC_HDR_TCP_FLAG_ECE    0x40    // ECN Echo
+#define IPC_HDR_TCP_FLAG_CWR    0x80    // Congestion Window Reduced
+#define IPC_HDR_TCP_FLAG_NS     0x100   // ECN-nonce concealment protection (added to header by RFC 3540)
+
+
+#define IPC_HDR_TCP_HEADER_SIZE     (20)
+
+#define IPC_HDR_TCP_GET_SRC_PORT(_tcp) \
+        IPC_NE_GET_2B(_tcp)
+
+#define IPC_HDR_TCP_SET_SRC_PORT(_tcp, _src_port) \
+        IPC_NE_SET_2B(_tcp, _src_port)
+
+#define IPC_HDR_TCP_EQ_SRC_PORT(_tcp, _src_port)    \
+        (IPC_HDR_TCP_GET_SRC_PORT(_tcp) == (_src_port))
+
+#define IPC_HDR_TCP_GET_DST_PORT(_tcp) \
+        IPC_NE_GET_2B((kal_uint8 *)(_tcp) + 2)
+
+#define IPC_HDR_TCP_SET_DST_PORT(_tcp, _dst_port) \
+        IPC_NE_SET_2B((kal_uint8 *)(_tcp) + 2, _dst_port)
+
+#define IPC_HDR_TCP_EQ_DST_PORT(_tcp, _dst_port)    \
+        (IPC_HDR_TCP_GET_DST_PORT(_tcp) == (_dst_port))
+
+#define IPC_HDR_TCP_GET_SEQ_NUM(_tcp) \
+        IPC_NE_GET_4B((kal_uint8 *)(_tcp) + 4)
+
+#define IPC_HDR_TCP_SET_SEQ_NUM(_tcp, _seq_num) \
+        IPC_NE_SET_4B((kal_uint8 *)(_tcp) + 4, _seq_num)
+
+#define IPC_HDR_TCP_EQ_SEQ_NUM(_tcp, _seq_num)    \
+        (IPC_HDR_TCP_GET_SEQ_NUM(_tcp) == (_seq_num))
+
+#define IPC_HDR_TCP_GET_ACK_NUM(_tcp) \
+        IPC_NE_GET_4B((kal_uint8 *)(_tcp) + 8)
+
+#define IPC_HDR_TCP_SET_ACK_NUM(_tcp, _ack_num) \
+        IPC_NE_SET_4B((kal_uint8 *)(_tcp) + 8, _ack_num)
+
+#define IPC_HDR_TCP_EQ_ACK_NUM(_tcp, _ack_num)    \
+        (IPC_HDR_TCP_GET_ACK_NUM(_tcp) == (_ack_num))
+
+#define IPC_HDR_TCP_GET_OFFSET(_tcp) \
+        ((IPC_NE_GET_1B((kal_uint8 *)(_tcp) + 12) & 0xF0) >> 2)
+
+#define IPC_HDR_TCP_SET_OFFSET(_tcp, _offset) \
+        do { \
+            IPC_NE_SET_1B((kal_uint8 *)(_tcp) + 12, (IPC_NE_GET_1B((kal_uint8 *)(_tcp) + 12) & 0x0F) | ((((kal_uint8)(_offset)>>2)<<4) & 0xF0)); \
+        } while (0)
+
+#define IPC_HDR_TCP_GET_RESERVED(_tcp) \
+        ((IPC_NE_GET_1B((kal_uint8 *)(_tcp) + 12) >> 1) & 0x07)
+
+#define IPC_HDR_TCP_SET_RESERVED(_tcp, _reserved) \
+        do { \
+            IPC_NE_SET_1B((kal_uint8 *)(_tcp) + 12, (IPC_NE_GET_1B((kal_uint8 *)(_tcp) + 12) & 0xF1) | (((kal_uint8)(_reserved) << 1) & 0x0E)); \
+        } while (0)
+
+#define IPC_HDR_TCP_GET_FLAGS(_tcp) \
+        (IPC_NE_GET_2B((kal_uint8 *)(_tcp) + 12) & 0x01FF)
+
+#define IPC_HDR_TCP_SET_FLAGS(_tcp, _flags) \
+        do { \
+            IPC_NE_SET_2B((kal_uint8 *)(_tcp) + 12, (IPC_NE_GET_2B((kal_uint8 *)(_tcp) + 12) & 0xFE00) | ((_flags) & 0x01FF)); \
+        } while (0)
+
+#define IPC_HDR_TCP_GET_WINDOW(_tcp) \
+        IPC_NE_GET_2B((kal_uint8 *)(_tcp) + 14)
+
+#define IPC_HDR_TCP_SET_WINDOW(_tcp, _window) \
+        IPC_NE_SET_2B((kal_uint8 *)(_tcp) + 14, _window)
+
+#define IPC_HDR_TCP_GET_CHECKSUM(_tcp) \
+        IPC_NE_GET_2B((kal_uint8 *)(_tcp) + 16)
+
+#define IPC_HDR_TCP_SET_CHECKSUM(_tcp, _checksum) \
+        IPC_NE_SET_2B((kal_uint8 *)(_tcp) + 16, _checksum)
+
+#define IPC_HDR_TCP_GET_URGENT_PTR(_tcp) \
+        IPC_NE_GET_2B((kal_uint8 *)(_tcp) + 18)
+
+#define IPC_HDR_TCP_SET_URGENT_PTR(_tcp, _urp) \
+        IPC_NE_SET_2B((kal_uint8 *)(_tcp) + 18, _urp)
+/*
+ * ICMP.
+ */
+#define IPC_HDR_ICMP_HEADER_SIZE     (8)
+
+#define IPC_HDR_ICMP_TYPE_ECHO_REQUEST    (8)
+#define IPC_HDR_ICMP_TYPE_ECHO_REPLY      (0)
+#define IPC_HDR_ICMP_TYPE_RS              (10)
+#define IPC_HDR_ICMP_TYPE_RA              (9)
+
+#define IPC_HDR_ICMPV6_TYPE_ECHO_REQUEST  (128)
+#define IPC_HDR_ICMPV6_TYPE_ECHO_REPLY    (129)
+#define IPC_HDR_ICMPV6_TYPE_RS            (133)
+#define IPC_HDR_ICMPV6_TYPE_RA            (134)
+
+#define IPC_HDR_ICMP_GET_TYPE(_icmp) \
+        IPC_NE_GET_1B(_icmp)
+
+#define IPC_HDR_ICMP_SET_TYPE(_icmp, _type) \
+        IPC_NE_SET_1B(_icmp, _type)
+
+#define IPC_HDR_ICMP_EQ_TYPE(_icmp, _type)  \
+        (IPC_HDR_ICMP_GET_TYPE(_icmp) == (_type))
+
+#define IPC_HDR_ICMP_GET_CODE(_icmp) \
+        IPC_NE_GET_1B((kal_uint8 *)(_icmp) + 1)
+
+#define IPC_HDR_ICMP_SET_CODE(_icmp, _code) \
+        IPC_NE_SET_1B((kal_uint8 *)(_icmp) + 1, (_code))
+
+#define IPC_HDR_ICMP_EQ_CODE(_icmp, _code)  \
+        (IPC_HDR_ICMP_GET_CODE(_icmp) == (_code))
+
+#define IPC_HDR_ICMP_GET_CHECKSUM(_icmp) \
+        IPC_NE_GET_2B((kal_uint8 *)(_icmp) + 2)
+
+#define IPC_HDR_ICMP_SET_CHECKSUM(_icmp, _checksum) \
+        IPC_NE_SET_2B((kal_uint8 *)(_icmp) + 2, _checksum)
+
+#define IPC_HDR_ICMP_SET_UNUSED(_icmp, _value) \
+        IPC_NE_SET_4B((kal_uint8 *)(_icmp) + 4, _value)
+/*
+ * Ports.
+ */
+#define IPC_PORT_BOOTPS (67)
+#define IPC_PORT_BOOTPC (68)
+
+/*
+ * Helper functions
+ */
+#define ipc_get_netif_id_from_l2p_chid(_ipc_l2p_enum, _chid) ((kal_uint32)(_ipc_l2p_enum | _chid))
+
+/*------------------------------------------------------------------------------
+ * Public functions.
+ *----------------------------------------------------------------------------*/
+/**
+ * Allow HIF side module, such as ethercore or ppp, to register callback functions,
+ * callback context, and module id for a network interface.
+ *
+ * @param   config [IN] The information required to regerster a network interface.
+ * @param   handle [OUT] Caller allocated space to store a handle to the network interface attached.
+ *                       It returns a IPC_INVALID_HANDLE if failed.
+ *
+ * @return KAL_TRUE if successful, KAL_FALSE otherwise.
+ */
+kal_bool ipc_attach(ipc_conf_t *config, ipc_handle_t *handle);
+
+/**
+ * Detach the network interface.
+ *
+ * @param   handle [IN] Handle to the network interface to detach.
+ *
+ * @return KAL_TRUE if successful, KAL_FALSE otherwise.
+ */
+kal_bool ipc_detach(ipc_handle_t handle);
+
+/**
+ * Send a list of IP datagrams to wireless network.
+ *
+ * @param   handle [IN] Handle to the network interface attached.
+ * @param   ior [IN] It wraps up a set of uplink GPD to send.
+ *
+ * @return KAL_TRUE if successful, KAL_FALSE otherwise.
+ */
+kal_bool ipc_uplink(ipc_handle_t handle, ipc_io_request_t *ior);
+
+/**
+ * Retrieve index of a set of IPv4/IPv6 addresses.
+ *
+ * @param   handle [IN] Handle to the network interface attached.
+ *
+ * @return Non-negtive value as a valid index, netgative value for an invalid one (e.g. before session established.).
+ */
+kal_int32 ipc_get_ip_id(ipc_handle_t handle);
+
+/**
+ * Force reloading buffers for the network interface to receive uplink traffic.
+ *
+ * @param   handle [IN] Handle to the network interface attached.
+ */
+void ipc_need_ul_reload(ipc_handle_t handle);
+
+/**
+ * Check if any network interfaces need uplink reload retry,
+ * if so, send an ILM to IPCORE to do uplink reload.
+ */
+void ipc_check_ul_reload_retry(void);
+
+/**
+ * Manually notify the HIF network interface link/IP status changed. (This API does NOT change IP Core internal FSM !)
+ *
+ * @param   netif_id [IN] The network interface ID.
+ * @param   ip_type [IN] Type of the PDN, IPC_IP_TYPE_IPV4, IPC_IP_TYPE_IPV6, or IPC_IP_TYPE_MIXED.
+ * @param   link_update[IN] KAL_TRUE if an IP session is established/deactived and link status is changed. KAL_FALSE if an IP information is updated for an activated IP session.
+ * @param   link_up [IN] (If link_update is KAL_TRUE) KAL_TRUE if an IP session is established, KAL_FALSE if an IP session is deactived ;
+                                    (If link_update is KAL_FALSE) KAL_TRUE if new IP information is available, KAL_FALSE if original IP information is obsoleted
+ */
+void ipc_notify_link_change(kal_uint32 netif_id, kal_uint8 ip_type, kal_bool link_update, kal_bool is_up);
+
+/**
+ * Install callback function and filtering rules for uplink traffic.
+ *
+ * @param   rules [IN] Rules to filter of uplink IP datagrams.
+ * @param   callback_func [IN] Callback function for a uplink IP datagram matched the rules.
+ * @param   callback_context [IN] Context to pass in the callback function.
+ *
+ * @return Zero or postive value as filter ID if registration succeeded, negative value if it failed.
+ */
+kal_int32 ipc_register_ul_filter_cbk(ipc_filter_rules_t *rules,
+                                     ipc_filter_callback_t callback_func,
+                                     void *callback_context);
+
+/**
+ * Install callback function and filtering rules for downlink traffic.
+ *
+ * @param   rules [IN] Rules to filter of downlink IP datagrams.
+ * @param   callback_func [IN] Callback function for a downlink IP datagram matched the rules.
+ * @param   callback_context [IN] Context to pass in the callback function.
+ *
+ * @return Zero or postive value as filter ID if registration succeeded, negative value if it failed.
+ */
+kal_int32 ipc_register_dl_filter_cbk(ipc_filter_rules_t *rules,
+                                     ipc_filter_callback_t callback_func,
+                                     void *callback_context);
+
+/**
+ * Install module ID and filtering rules for uplink traffic.
+ *
+ * @param   rules [IN] Rules to filter of uplink IP datagrams.
+ * @param   callback_module [IN] Destination module of the MSG MSG_ID_IPCORE_UL_PACKET_FILTERED_REQ for a uplink IP datagram matched the rules.
+ * @param   callback_context [IN] Context to pass in the callback function.
+ *
+ * @return Zero or postive value as filter ID if registration succeeded, negative value if it failed.
+ */
+kal_int32 ipc_register_ul_filter_msg(ipc_filter_rules_t *rules,
+                                     module_type callback_module,
+                                     void *callback_context);
+
+/**
+ * Install module ID and filtering rules for downlink traffic.
+ *
+ * @param   rules [IN] Rules to filter of downlink IP datagrams.
+ * @param   callback_module [IN] Destination module of the MSG MSG_ID_IPCORE_DL_PACKET_FILTERED_REQ for a downlink IP datagram matched the rules.
+ * @param   callback_context [IN] Context to pass in the callback function.
+ *
+ * @return Zero or postive value as filter ID if registration succeeded, negative value if it failed.
+ */
+kal_int32 ipc_register_dl_filter_msg(ipc_filter_rules_t *rules,
+                                     module_type callback_module,
+                                     void *callback_context);
+
+/**
+ * Install callback function and filtering rules for uplink traffic. (callback function with information as parameter)
+ *
+ * @param   rules [IN] Rules to filter of uplink IP datagrams.
+ * @param   callback_func [IN] Callback function for a uplink IP datagram matched the rules (with information as parameter).
+ * @param   callback_context [IN] Context to pass in the callback function.
+ *
+ * @return Zero or positive value as filter ID if registration succeeded, negative value if it failed.
+ */
+kal_int32 ipc_register_ul_filter_with_info_cbk(ipc_filter_rules_t *rules,
+                                               ipc_filter_with_info_callback_t callback_func,
+                                               void *callback_context);
+
+/**
+ * Install callback function and filtering rules for downlink traffic. (callback function with information as parameter)
+ *
+ * @param   rules [IN] Rules to filter of downlink IP datagrams.
+ * @param   callback_func [IN] Callback function for a downlink IP datagram matched the rules (with information as parameter).
+ * @param   callback_context [IN] Context to pass in the callback function.
+ *
+ * @return Zero or postive value as filter ID if registration succeeded, negative value if it failed.
+ */
+kal_int32 ipc_register_dl_filter_with_info_cbk(ipc_filter_rules_t *rules,
+                                               ipc_filter_with_info_callback_t callback_func,
+                                               void *callback_context);
+
+/**
+ * Install module ID and filtering rules for uplink traffic. (callback function with information as parameter)
+ *
+ * @param   rules [IN] Rules to filter of uplink IP datagrams.
+ * @param   callback_module [IN] Destination module of the MSG MSG_ID_IPCORE_UL_PACKET_FILTERED_WITH_INFO_REQ for a uplink IP datagram matched the rules.
+ * @param   callback_context [IN] Context to pass in the callback function.
+ *
+ * @return Zero or postive value as filter ID if registration succeeded, negative value if it failed.
+ */
+kal_int32 ipc_register_ul_filter_with_info_msg(ipc_filter_rules_t *rules,
+                                               module_type callback_module,
+                                               void *callback_context);
+
+/**
+ * Install module ID and filtering rules for downlink traffic. (callback function with information as parameter)
+ *
+ * @param   rules [IN] Rules to filter of downlink IP datagrams.
+ * @param   callback_module [IN] Destination module of the MSG MSG_ID_IPCORE_DL_PACKET_FILTERED_WITH_INFO_REQ for a downlink IP datagram matched the rules.
+ * @param   callback_context [IN] Context to pass in the callback function.
+ *
+ * @return Zero or postive value as filter ID if registration succeeded, negative value if it failed.
+ */
+kal_int32 ipc_register_dl_filter_with_info_msg(ipc_filter_rules_t *rules,
+                                               module_type callback_module,
+                                               void *callback_context);
+
+/**
+ * Uninstall the filter for uplink traffic.
+ *
+ * @param   filter_id [IN] filter ID to unregister.
+ */
+void ipc_deregister_ul_filter(kal_int32 filter_id);
+
+/**
+ * Uninstall the filter for donwlink traffic.
+ *
+ * @param   filter_id [IN] filter ID to unregister.
+ */
+void ipc_deregister_dl_filter(kal_int32 filter_id);
+
+/**
+ * Copy buffers in the GPD list to the buffer prepared by caller.
+ *
+ * @param   dst_buffer [OUT] Destination buffer to copy to, which is prepared by caller.
+ * @param   dst_max_len [IN] Size of the destination buffer prepared by caller in bytes.
+ * @param   dst_len_copied [OUT] Number of bytes copied to the destination buffer.
+ * @param   src_head_gpd [IN] Head of the GPD list with source buffers to copy from.
+ * @param   src_tail_gpd [IN] Tail of the GPD list with source buffers to copy from.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_gpd_copy(kal_uint8 *dst_buffer, kal_uint32 dst_max_len, kal_uint32 *dst_len_copied, qbm_gpd *src_head_gpd, qbm_gpd *src_tail_gpd);
+
+/**
+ * Pack datagram in GPD format and selectively fill L4(UDP) and IP header.
+ *
+ * @param   uplink [IN] Uplink or downlink packet.
+ * @param   pkt [IN] Datagram or GPD list to sent.
+ * @param   hdr [IN] UDP/IP header information which will be filled to sent packet(s). NULL pointer means "No packet modification is needed"
+ * @param   head_gpd [OUT] Head of GPD list return
+ * @param   tail_gpd [OUT] Tail of GPD list return
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_pack_pkt_public(kal_bool uplink,
+                             ipc_pkt_t *pkt,
+                             ipc_hdr_t *hdr,
+                             qbm_gpd **head_gpd,
+                             qbm_gpd **tail_gpd);
+
+/**
+ * Send datagram in buffer or GPD list to the wireless netowrk and selectively fill L4(UDP) and IP header on each of them.
+ *
+ * @param   pkt [IN] Datagram or GPD list to sent.
+ * @param   hdr [IN] UDP/IP header information which will be filled to sent packet(s). NULL pointer means "No packet modification is needed"
+ * @param   ebi [IN] EBI/NSAPI.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_send_ul_pkt(ipc_pkt_t *pkt, ipc_hdr_t *hdr, kal_uint32 ebi);
+
+/**
+ * Send datagram in buffer or GPD list to the wireless netowrk and selectively fill L4(UDP) and IP header on each of them.
+ *
+ * @param   pkt [IN] Datagram or GPD list to sent.
+ * @param   hdr [IN] UDP/IP header information which will be filled to sent packet(s). NULL pointer means "No packet modification is needed"
+ * @param   pdn [IN] PDN ID
+ * @param   ip_type [IN] Type of IP datagrams, see IPC_IP_TYPE_XXX defined for valid values. Note that only one of IPv4/IPv6 can be selected and MIX type is NOT allowed.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_send_ul_pkt_by_pdn(ipc_pkt_t *pkt,
+                                ipc_hdr_t *hdr,
+                                kal_uint32 pdn,
+                                kal_uint8 ip_type);
+
+/**
+ * Send datagram in buffer or GPD list to the wireless netowrk and selectively fill L4(UDP) and IP header on each of them.
+ *
+ * @param   pkt [IN] Datagram or GPD list to sent.
+ * @param   hdr [IN] UDP/IP header information which will be filled to sent packet(s). NULL pointer means "No packet modification is needed"
+ * @param   netif_id [IN] Network interface ID
+ * @param   ip_type [IN] Type of IP datagrams, see IPC_IP_TYPE_XXX defined for valid values. Note that only one of IPv4/IPv6 can be selected and MIX type is NOT allowed.
+
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_send_ul_pkt_by_netif_id(ipc_pkt_t *pkt,
+                                     ipc_hdr_t *hdr,
+                                     kal_uint32 netif_id,
+                                     kal_uint8 ip_type);
+
+/**
+ * Send datagram in buffer or GPD list to the wireless netowrk and selectively fill L4(UDP) and IP header on each of them.
+ *
+ * @param   pkt [IN] Datagram or GPD list to sent.
+ * @param   hdr [IN] UDP/IP header information which will be filled to sent packet(s). NULL pointer means "No packet modification is needed"
+ * @param   ebi [IN] EBI/NSAPI.
+ * @param   proto_idx [IN] The index to distinquish from different SIM Card.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_send_ul_pkt_multiple_ps(ipc_pkt_t *pkt,
+                                     ipc_hdr_t *hdr,
+                                     kal_uint32 ebi,
+                                     kal_uint8 proto_idx);
+
+/**
+ * Send datagram in buffer or GPD list to the wireless netowrk and selectively fill L4(UDP) and IP header on each of them.
+ *
+ * @param   pkt [IN] Datagram or GPD list to sent.
+ * @param   hdr [IN] UDP/IP header information which will be filled to sent packet(s). NULL pointer means "No packet modification is needed"
+ * @param   pdn [IN] PDN ID
+ * @param   ip_type [IN] Type of IP datagrams, see IPC_IP_TYPE_XXX defined for valid values. Note that only one of IPv4/IPv6 can be selected and MIX type is NOT allowed.
+ * @param   proto_idx [IN] The index to distinquish from different SIM Card.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_send_ul_pkt_by_pdn_multiple_ps(ipc_pkt_t *pkt,
+                                            ipc_hdr_t *hdr,
+                                            kal_uint32 pdn,
+                                            kal_uint8 ip_type,
+                                            kal_uint8 proto_idx);
+
+/**
+* Send datagram in buffer or GPD list to the wireless netowrk after filtering and selectively fill L4(UDP) and IP header on each of them.
+*
+* @param pkt [IN] Datagram or GPD list to sent.
+* @param hdr [IN] UDP/IP header information which will be filled to sent packet(s). NULL pointer means "No packet modification is needed"
+* @param pdn [IN] PDN ID
+* @param ip_type [IN] Type of IP datagrams, see IPC_IP_TYPE_XXX defined for valid values. Note that only one of IPv4/IPv6 can be selected and MIX type is NOT allowed.
+* @param proto_idx [IN] The index to distinquish from different SIM Card.
+*
+* @return KAL_TRUE if succeeded, KAL_FALSE otherwise.
+*/
+kal_bool ipc_send_ul_pkt_on_normal_path_by_pdn_multiple_ps(ipc_pkt_t *pkt,
+                                                 ipc_hdr_t *hdr,
+                                                 kal_uint32 pdn,
+                                                 kal_uint8 ip_type,
+                                                 kal_uint8 proto_idx);
+                                            
+/**
+ * Send datagram in buffer or GPD list to the netowrk interface and selectively fill L4(UDP) and IP header on each of them.
+ *
+ * @param   pkt [IN] Datagram or GPD list to sent.
+ * @param   hdr [IN] UDP/IP header information which will be filled to sent packet(s). NULL pointer means "No packet modification is needed"
+ * @param   netif_id [IN] Network interface ID.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_send_dl_pkt(ipc_pkt_t *pkt, ipc_hdr_t *hdr, kal_uint32 netif_id);
+
+/**
+ * Register a notification.
+ *
+ * @param   callback_func [IN] Callback function pointer.
+ * @param   callback_context [IN] Context to pass in the callback function.
+ *
+ * @return Zero or positive value as notification ID if registration succeeded, negative value otherwise.
+ */
+kal_int32 ipc_register_ntfy(ipc_ntfy_callback_t callback_func,
+                            void *callback_context);
+
+/**
+ * Uninstall the registered notification.
+ *
+ * @param   ntfy_id [IN] notification ID gotten from ipc_register_ntfy() to uninstall.
+ */
+void ipc_deregister_ntfy(kal_int32 ntfy_id);
+
+/**
+ * Register link up indication handler
+ *
+ * @param   module_id [IN]  Module ID to handle ILM MSG_ID_IPCORE_LINK_UP_IND.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_register_link_up_ind_handler(module_type module_id);
+
+/**
+ * Uninstall the registered link up indication handler
+ */
+void ipc_deregister_link_up_ind_handler(void);
+
+/**
+ * Register IP up indication handler
+ *
+ * @param   module_id [IN]  Module ID to handle ILM MSG_ID_IPCORE_IP_UP_IND.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_register_ip_up_ind_handler(module_type module_id);
+
+/**
+ * Uninstall the registered link up indication handler
+ */
+void ipc_deregister_ip_up_ind_handler(void);
+
+/**
+ * Bind two lan netif to one another (for MD Direct Tethering)
+ *
+ * @param   netif_id_1 [IN] lan netif ID.
+ * @param   netif_id_2 [IN] lan netif ID.
+ */
+void ipc_bind_lan_netif(kal_uint32 netif_id_1, kal_uint32 netif_id_2);
+
+/**
+ * Unbind two lan netif from one another (for MD Direct Tethering)
+ *
+ * @param   netif_id_1 [IN] lan netif ID.
+ * @param   netif_id_2 [IN] lan netif ID.
+ */
+void ipc_unbind_lan_netif(kal_uint32 netif_id_1, kal_uint32 netif_id_2);
+
+/**
+ * Send a list of IP datagrams to wireless network. (Gen93)
+ *
+ * @param   start_idx [IN] Start idx of the Meta list.
+ * @param   end_idx [IN] Start idx of the Meta list.
+ * @param   queue_type [IN] Type of the Meta queue.
+ *
+ * @return KAL_TRUE if successful, KAL_FALSE otherwise.
+ */
+kal_bool ipc_meta_uplink(kal_uint16 start_idx, kal_uint16 end_idx, LHIF_QUEUE_TYPE queue_type);
+
+/**
+ * Get pdn_id & protocol index by given netif ID
+ *
+ * @param   netif_id [IN] The network interface ID.
+ * @param   ip_type [IN] The IP type of the queried PDN.
+ * @param   p_pdn_id [OUT] The result of the PDN ID.
+ * @param   p_proto_idx [OUT] The result of the protocol index.
+ *
+ * @return KAL_TRUE if successful, KAL_FALSE otherwise.
+ */
+kal_bool ipc_find_pdn_id_by_netif_id(kal_uint32 netif_id, kal_uint8 ip_type, kal_uint32 *p_pdn_id, kal_uint8 *p_proto_idx);
+
+/**
+ * Send datagram in buffer or DID list to the netowrk interface and selectively fill L4(UDP) and IP header on each of them. (Gen93)
+ *
+ * @param   pkt [IN] Datagram or DID list to sent.
+ * @param   hdr [IN] UDP/IP header information which will be filled to sent packet(s). NULL pointer means "No packet modification is needed"
+ * @param   netif_id [IN] Network interface ID.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool ipc_send_dl_pkt_in_did(ipc_pkt_t *pkt, ipc_hdr_t *hdr, kal_uint32 netif_id);
+
+/**
+ * Re-filtering API for ipc_fragment submoule to check the filtering result of the fragment packets. (Gen93)
+ *
+ * @param   ip_type [IN] Type of the packet, either IPC_IP_TYPE_IPV4 or IPC_IP_TYPE_IPV6.
+ * @param   info [IN] Information for re-filtering.
+ * @param   p_head [OUT] Head of GPD list return
+ * @param   p_tail [OUT] Tail of GPD list return
+ */
+void ipc_frag_refilter(kal_uint8 ip_type, ipc_frag_refilter_info_t *info, qbm_gpd *p_head, qbm_gpd *p_tail);
+
+/**
+ * Re-filtering API for ipc_fragment submoule to send fragment packets to AP when fragment collection timeout or exception. (Gen93)
+ *
+ * @param   ip_type [IN] Type of the packet, either IPC_IP_TYPE_IPV4 or IPC_IP_TYPE_IPV6.
+ * @param   info [IN] Information for re-filtering.
+ * @param   p_head [OUT] Head of GPD list return
+ * @param   p_tail [OUT] Tail of GPD list return
+ */
+void ipc_frag_send_pkt(kal_uint8 ip_type, ipc_frag_refilter_info_t *info, qbm_gpd *p_head, qbm_gpd *p_tail);
+
+/*
+ * Look into packet to gather necessary IP header & the upper layer protocol header information.
+ * Note that, for IPv6's packet, current implementation don't handle the following cases and take them  as not found:
+ *     #1. IPv6 packet with ESP header:
+ *        According to RFC 4303 section 3.1, everything after ESP header is encrypted.
+ *        Since we cannot decrypt it, we cannot acturally look into the upper layer protocol.
+ *
+ *     #2. IPv6 extension header not defined in RFC 2460:
+ *        If necessary, we will handle them here according to corresponding RFC.
+ *
+ *     #3. fragmentation:
+ *        No application needs IPv6 fragmentation on a modem platform so far.
+ *
+ * @param   ipv6_packet [IN] The packet.
+ * @param   packet_len [IN] Length of the packet.
+ * @param   p_info [OUT] The necessary information gathered for later packete filtering.
+ *
+ * @return KAL_TRUE if the packet's information was gathered sucessfully, KAL_FALSE otherwise.
+ */
+kal_bool ipc_get_packet_info(kal_uint8 *p_packet, kal_uint16 packet_len, ipc_packet_info_t *p_info);
+
+/**
+ * Send a list of IP datagrams filter-out by IPF. (Gen95)
+ *
+ * @param   start_idx [IN] Start idx of the Meta list.
+ * @param   end_idx [IN] Start idx of the Meta list.
+ * @param   queue_type [IN] Type of the Meta queue.
+ *
+ */
+void  ipc_meta_downlink(kal_uint16 start_idx, kal_uint16 end_idx, kal_uint32 queue_type);
+
+/**
+ * Query bound PDN id according to netif_id and ip_type
+ *
+ * @param   netif_id [IN] network interface ID.
+ * @param   ip_type [IN] IPC_IP_TYPE_IPV4 / IPC_IP_TYPE_IPV6. (ipc_enums.h)
+ * @param   pdn_id [OUT] return the bound PDN ID.
+ *
+ * @return KAL_TRUE if successful, KAL_FALSE otherwise.
+ */
+kal_bool ipc_query_pdn_by_netif(kal_uint32 netif_id, kal_uint8 ip_type, kal_int32 *pdn_id);
+
+/**
+ * calculate TCP checksum
+ *
+ * @param   is_ipv4    ipv4 or ipv6
+ * @param   src_addr   source address
+ * @param   dst_addr   destination address
+ * @param   tcp_header tcp header pointer
+ * @param   tcp_len    tcp length
+ */
+kal_uint16 ipc_calc_tcp_checksum(kal_bool is_ipv4,
+                                 kal_uint8 *src_addr,
+                                 kal_uint8 *dst_addr,
+                                 kal_uint8 *tcp_header,
+                                 kal_uint32 tcp_len);
+
+/**
+ * calculate UDP checksum
+ *
+ * @param   is_ipv4    ipv4 or ipv6
+ * @param   src_addr   source address
+ * @param   dst_addr   destination address
+ * @param   udp_header udp header pointer
+ * @param   udp_len    udp length
+ */
+kal_uint16 ipc_calc_udp_checksum(kal_bool is_ipv4,
+                                 kal_uint8 *src_addr,
+                                 kal_uint8 *dst_addr,
+                                 kal_uint8 *udp_header,
+                                 kal_uint32 udp_len);
+
+/**
+ * calculate IPv4 checksum
+ *
+ * @param   ip_header IP header pointer
+ */
+kal_uint16 ipc_calc_ipv4_checksum(kal_uint8 *ip_header);
+
+/**
+ * send DL did by channel_id
+ *
+ * @param   net_type    network type
+ * @param   ch_id       channel id
+ * @param   p_did_head  did head
+ * @param   p_did_tail  did tail
+ */
+kal_bool ipc_send_dl_did_by_ch_id(kal_uint8 net_type,
+                                  kal_uint8 ch_id,
+                                  upcm_did *p_did_head,
+                                  upcm_did *p_did_tail);
+
+
+/**
+ * Send datagram in QBM GPD to the netowrk interface after unwinding call stack
+ *
+ * @param   pkt           Packet GPD
+ * @param   netif_id      Network interface ID.
+ * @param   session_type  IPV4/V6 session type
+ */
+kal_bool ipc_send_dl_pkt_enqueue(qbm_gpd *pkt, kal_uint32 netif_id, kal_uint32 session_type);
+
+/**
+ * register ipc filter
+ *
+ * @param   data_path_direction  DL_DATA_PATH or UL_DATA_PATH
+ * @param   p_rules              filter rules
+ * @param   p_ntfy_ctxt          filter match notification context
+ *
+ * @return  non negative filter id for successful, otherwise IPC_INVALID_FILTER_ID
+ */
+kal_int32 ipc_reg_filter(ipc_data_path_direction_e data_path_direct,
+                         ipc_filter_rules_t *p_rules,
+                         ipc_filter_ntfy_ctxt_t *p_ntfy_ctxt);
+
+/**
+ * deregister ipc filter
+ *
+ * @param   filter_id  the filter_id which want to be deregistered
+ *
+ * @return  KAL_TRUE if successful, KAL_FALSE otherwise.
+ */
+kal_bool ipc_dereg_filter(kal_int32 filter_id);
+
+/**
+ * Get data usage by Netif_id
+ *
+ * @param netif_id [IN] the netif_id for which want to know data usgae
+ * @param data_usage [OUT] data usage of uplink and downlink path
+ *
+ * @return KAL_TRUE if successful, KAL_FALSE otherwise.
+ */
+kal_bool ipc_get_data_usage_by_netif_id(kal_uint32 netif_id, ipc_data_usage_info_t *data_usage);
+
+/**
+ * Get data usage by pdn_id
+ *
+ * @param  pdn_id [IN]  the pdn_id for which want to know data usgae
+ * @param  proto_idx [IN]  the sim_idx for which want to know data usgae
+ * @param  data_usage [OUT]  data usage of uplink and downlink path
+ *
+ * @return  KAL_TRUE if successful, KAL_FALSE otherwise.
+ */
+kal_bool ipc_get_data_usage_by_pdn_id(kal_uint32 pdn_id, kal_uint8 proto_idx, ipc_data_usage_info_t *data_usage);
+
+#endif /* __INC_IPC_API_H */
diff --git a/mcu/interface/middleware/hif/ipc_defs_public.h b/mcu/interface/middleware/hif/ipc_defs_public.h
new file mode 100644
index 0000000..89b401a
--- /dev/null
+++ b/mcu/interface/middleware/hif/ipc_defs_public.h
@@ -0,0 +1,101 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   ipc_defs_public.h
+ *
+ * Project:
+ * --------
+ *   TATAKA
+ *
+ * Description:
+ * ------------
+ *   IP Core public definition.
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_IPC_DEFS_PUBLIC_H
+#define __INC_IPC_DEFS_PUBLIC_H
+
+/* 2011/12/16: SD1/Moja guarantees pdn_id falls in [0,15]. */
+/* 2016/03/15: To support multi-PS, need to enlarge maximum netif/session number. */
+#define IPC_MAX_SESSION_CNT             256
+#define IPC_MAX_NETIF_CNT               64 /**< Maximal number of host network interfaces supported. Note that, it must <= 64. */
+#define IPC_MAX_IP_ID_CNT               IPC_MAX_NETIF_CNT
+#define IPC_IMS_FILTER_CNT              2
+#define IPC_AOMGR_FILTER_CNT            (IPC_MAX_NETIF_CNT * 2) /* DHCPv4 and DHCPv6 */
+#define IPC_MAX_DL_FILTER_CNT           (IPC_MAX_SESSION_CNT + IPC_IMS_FILTER_CNT)
+#define IPC_MAX_UL_FILTER_CNT           (IPC_AOMGR_FILTER_CNT)
+#define IPC_PFM_MAX_FILTER_CNT          256
+#define IPC_MAX_FILTER_CNT              (IPC_MAX_DL_FILTER_CNT + IPC_MAX_UL_FILTER_CNT + IPC_PFM_MAX_FILTER_CNT)
+#define IPC_DEL_OBJECT_SLEEP_TICKS      KAL_TICKS_10_MSEC
+#define IPC_W_LOCK_OBJECT_SLEEP_TICKS   1 
+#define IPC_DEF_TTL                     128
+#define IPC_MAX_NTFY_CNT                4
+
+#endif /* __INC_IPC_DEFS_PUBLIC_H */
diff --git a/mcu/interface/middleware/hif/ipc_enums.h b/mcu/interface/middleware/hif/ipc_enums.h
new file mode 100644
index 0000000..8e16596
--- /dev/null
+++ b/mcu/interface/middleware/hif/ipc_enums.h
@@ -0,0 +1,382 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   ipc_enums.h
+ *
+ * Project:
+ * --------
+ *   TATAKA
+ *
+ * Description:
+ * ------------
+ *   IP Core public enumeration definition.
+ *
+ * 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!
+ * 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!
+ * 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 __INC_IPC_ENUMS_H
+#define __INC_IPC_ENUMS_H
+
+/*------------------------------------------------------------------------------
+ * Data structure definition.
+ *----------------------------------------------------------------------------*/
+#define IPC_IP_TYPE_MIXED           0
+#define IPC_IP_TYPE_IPV4            1
+#define IPC_IP_TYPE_IPV6            2
+#define IPC_IP_TYPE_INVALID         3
+
+/** extra flags */
+#define IPC_DRP_ALLW_PKT            (0x0001 << 0)
+
+/** Network interface configuration */
+#define IPC_F_DHCP4C                0x00000001  /** DHCPv4 Client */
+#define IPC_F_DYNAMIC_Q_MAPPING     0x00000008  /** CCMNI Dynamic Queue Mapping */
+#define IPC_F_TETHERING_ROUTE       0x00000002  /** Direct Tethering routing required */
+#define IPC_F_LAN                   0x00000004  /** LAN netif, which binds to other netif */
+#define IPC_F_LATENCY_CONCERN       0x00010000  /** Latency Concern Module */
+#define IPC_F_TEST_LOOPBACK_A       0x10000000  /** Test Loopback mode A */
+#define IPC_F_TEST_LOOPBACK_B       0x20000000  /** Test Loopback mode B */
+#define IPC_F_KEEP_PDN_MAPPING      0x00000010  /** Keep previous PDN mapping state */
+
+#define IPC_INVALID_HANDLE          NULL
+
+/** Filter feature option */
+#define IPC_FILTER_FEATURE_WC                   (0x01 << 0)  /** Wild card filter: report matched to all packets */
+#define IPC_FILTER_FEATURE_BWM                  (0x01 << 1)  /** Bypass when matched filter: bypass the matched packets */
+#define IPC_FILTER_FEATURE_IPV6_DPFM            (0x01 << 3)  /** Special feature for IPV6 MDT(no GPD callback) [Gen95 only]*/
+#define IPC_FILTER_FEATURE_FRAG                 (0x01 << 2)  /** Support to filter fragment packet */
+#define IPC_FILTER_FEATURE_CLONE                (0x01 << 6)  /** Matched filter action : clone it */
+#define IPC_FILTER_FEATURE_PFM_DL               (0x01 << 7)  /** Filter registered through PFM */
+#define IPC_FILTER_FEATURE_CUST_FILTER          (0x01 << 4)  /** Add customized filter flow */
+#define IPC_FILTER_FEATURE_CUST_FILTER_W_INFO   (0x01 << 5)  /** Add customized filter flow and callback with IPC_INFO instead of user arguments */
+#define IPC_FILTER_FEATURE_IG_PN                (0x01 << 8)  /** Ignore PDN & NETIF */
+
+/** Filter rule */
+#define IPC_FILTER_BY_PROTOCOL      (0x0001 << 0)
+#define IPC_FILTER_BY_SRC_PORT      (0x0001 << 1)
+#define IPC_FILTER_BY_DST_PORT      (0x0001 << 2)
+#define IPC_FILTER_BY_SRC_IPV4      (0x0001 << 3)
+#define IPC_FILTER_BY_DST_IPV4      (0x0001 << 4)
+#define IPC_FILTER_BY_SRC_IPV6      (0x0001 << 5)
+#define IPC_FILTER_BY_DST_IPV6      (0x0001 << 6)
+#define IPC_FILTER_BY_ICMPV4_TYPE   (0x0001 << 7)
+#define IPC_FILTER_BY_ICMPV6_TYPE   (0x0001 << 8)
+#define IPC_FILTER_BY_EBI           (0x0001 << 9)
+#define IPC_FILTER_BY_PDN_ID        (0x0001 << 10)
+#define IPC_FILTER_BY_NETIF_ID      (0x0001 << 11)
+#define IPC_FILTER_BY_TCP_FLAGS     (0x0001 << 12)
+#define IPC_FILTER_BY_SPI           (0x0001 << 13)
+
+/** Network interface ID. */
+typedef enum _ipc_netif_id_e {
+    IPC_NETIF_ID_CCMNI_BEGIN = 0x00000000,
+    IPC_NETIF_ID_CCMNI_END   = 0x000000ff,
+    IPC_NETIF_ID_ETH_BEGIN   = 0x00000100,
+    IPC_NETIF_ID_ETH_END     = 0x000001ff,
+    IPC_NETIF_ID_MBIM_BEGIN  = 0x00000200,
+    IPC_NETIF_ID_MBIM_END    = 0x000002ff,
+    IPC_NETIF_ID_PPP_BEGIN   = 0x00000300,
+    IPC_NETIF_ID_PPP_END     = 0x000003ff,
+    IPC_NETIF_ID_LHIF_BEGIN  = 0x00000400,
+    IPC_NETIF_ID_LHIF_END    = 0x000004ff,
+    IPC_NETIF_ID_MCIF_BEGIN  = 0x00000500,
+    IPC_NETIF_ID_MCIF_END    = 0x000005ff,
+    IPC_NETIF_ID_VNIF_BEGIN  = 0x00000600,
+    IPC_NETIF_ID_VNIF_END    = 0x000006ff,
+} ipc_netif_id_e;
+
+/** IPCore defines netif type for CCMNI Queue Mapping */
+typedef enum _ipc_netif_type_e {
+    IPC_NETIF_TYPE_NORMAL,
+    IPC_NETIF_TYPE_LATENCY_CONCERN,
+} ipc_netif_type_e;
+
+/** UL Data Throttling feature option */
+#define IPC_THROTTLE_FEATURE_BLOCK_LANTENCY_CONCERN 0x01
+
+/** Gen93 DL DID HIF Type Enum definition */
+typedef enum _ipc_si_hif_type_e {
+    IPC_SI_HIF_TYPE_LHIF = 0,
+    IPC_SI_HIF_TYPE_USB  = 1,
+    IPC_SI_HIF_TYPE_MCIF = 2,
+    IPC_SI_HIF_TYPE_VNIF = 3,
+    IPC_SI_HIF_TYPE_IGR  = 0x7,
+    IPC_SI_HIF_TYPE_MAX,
+} ipc_si_hif_type_e;
+
+/** Get Packet Info Error Code */
+typedef enum _ipc_packet_info_parser_error_code {
+    V4_IPV4_HDR_FAILED = 0,
+    V4_UDP_HDR_FAILED,
+    V4_TCP_HDR_FAILED,
+    V4_ICMP_HDR_FAILED,
+    V4_AH_HDR_FAILED,
+    V4_ESP_HDR_FAILED,
+    V6_IPV6_HDR_FAILED,
+    V6_UDP_HDR_FAILED,
+    V6_TCP_HDR_FAILED,
+    V6_ICMP_HDR_FAILED,
+    V6_EXT_HDR_FAILED,
+    V6_ESP_HDR_FAILED,
+    FIND_V6_EXT_HDR_FAILED,
+    FIND_V6_EXT_HDR_SHIFT_FAILED,
+    IPC_PACKET_INFO_PARSER_ERROR_CODE_MAX = 0x7fffffff,
+} ipc_packet_info_parser_error_code;
+
+/** IPCore filter_info source descriptor type */
+typedef enum _ipc_fi_desc_type_e {
+    IPC_FI_DESC_TYPE_DID,
+    IPC_FI_DESC_TYPE_NONE,
+    IPC_FI_DESC_TYPE_MAX = 0xffffffff,
+} ipc_fi_desc_type_e;
+
+/** IPCORE UL throttle state enum */
+typedef enum _ipc_ul_throttle_state_e {
+    IPC_UL_THROTTLE_STATE_NONE,
+    IPC_UL_THROTTLE_STATE_ACTIVE,
+    IPC_UL_THROTTLE_STATE_SUSPEND,
+} ipc_ul_throttle_state_e;
+
+/** IPCore notification type definition */
+typedef enum _ipc_ntfy_type_e {
+    IPC_NTFY_TYPE_INVALID,
+    IPC_NTFY_TYPE_MIN,
+    IPC_NTFY_TYPE_ATTACH,
+    IPC_NTFY_TYPE_DETACH,
+    IPC_NTFY_TYPE_IP_DOWN,
+    IPC_NTFY_TYPE_IP_UP,
+    IPC_NTFY_TYPE_LINK_DOWN,
+    IPC_NTFY_TYPE_LINK_UP,
+    IPC_NTFY_TYPE_MAX,
+} ipc_ntfy_type_e;
+
+/** IPCore io request type */
+typedef enum _ipc_io_req_data_path_e {
+    IPC_NORMAL_DATA_PATH = 0,
+    IPC_INTERNAL_DATA_PATH,
+} ipc_io_req_data_path_e;
+
+/**
+ * Backward compatible to kal_bool isGPD in ipc_pkt_t.
+ * Note that NO_DESC MUST be 0 and GPD MUST be 1.
+ */
+typedef enum _ipc_pkt_des_type_e {
+    IPC_PKT_DES_TYPE_NO_DESC = 0,
+    IPC_PKT_DES_TYPE_GPD = 1,
+    IPC_PKT_DES_TYPE_SPD,
+    IPC_PKT_DES_TYPE_META,
+    IPC_PKT_DES_TYPE_DID,
+    IPC_PKT_DES_TYPE_MAX,
+} ipc_pkt_des_type_e;
+
+/** IPCore link req type definition */
+typedef enum _ipc_link_req_type_e {
+    IPC_LINK_REQ_TYPE_NORMAL,
+    IPC_LINK_REQ_TYPE_DPFM,
+} ipc_link_req_type_e;
+
+/** IPCore data path definition */
+typedef enum _ipc_data_path_direction_e {
+    DL_DIRECT = 0,
+    UL_DIRECT
+} ipc_data_path_direction_e;
+
+/** IPCore filter notification type */
+typedef enum _ipc_filter_ntfy_type_e {
+    IPC_FILTER_NTFY_CBK_FUNC,
+    IPC_FILTER_NTFY_ILM,
+    IPC_FILTER_NTFY_CBK_FUNC_WITH_FILTER_INFO,
+    IPC_FILTER_NTFY_ILM_WITH_FILTER_INFO
+} ipc_filter_ntfy_type_e;
+
+typedef enum _ipc_data_enq_position_e {
+    IPC_DATA_DID_HEAD = 0,
+    IPC_DATA_DID_TAIL
+} ipc_data_enq_position_e;
+
+#endif /* __INC_IPC_ENUMS_H */
diff --git a/mcu/interface/middleware/hif/ipc_filter_priority.h b/mcu/interface/middleware/hif/ipc_filter_priority.h
new file mode 100644
index 0000000..9d0a7e9
--- /dev/null
+++ b/mcu/interface/middleware/hif/ipc_filter_priority.h
@@ -0,0 +1,114 @@
+/*****************************************************************************
+*  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) 2014
+*
+*  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:
+ * ---------
+ *   ipc_filter_priority.h
+ *
+ * Project:
+ * --------
+ *   MOLY
+ *
+ * Description:
+ * ------------
+ *   IP Core filter priority definition.
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __INC_IPC_FILTER_PRIORITY_H
+#define __INC_IPC_FILTER_PRIORITY_H
+
+#define IPC_UL_FILTER_PRIORITY(_name, _num) IPC_UL_FILTER_PRIORITY_ ## _name ## _BEGIN, \
+                                            IPC_UL_FILTER_PRIORITY_ ## _name ## _END = IPC_UL_FILTER_PRIORITY_ ## _name ## _BEGIN + _num,
+
+#define IPC_DL_FILTER_PRIORITY(_name, _num) IPC_DL_FILTER_PRIORITY_ ## _name ## _BEGIN, \
+                                            IPC_DL_FILTER_PRIORITY_ ## _name ## _END = IPC_DL_FILTER_PRIORITY_ ## _name ## _BEGIN + _num,
+
+/* Priority for UL filters */
+typedef enum {
+    IPC_UL_FILTER_PRIORITY_BEGIN = 0,
+
+    IPC_UL_FILTER_PRIORITY(AOMGR, 20)
+    IPC_UL_FILTER_PRIORITY(NDPC, 4)
+
+    MAX_IPC_UL_FILTER_PRIORITY,
+} IPC_UL_FILTER_PRIORITY;
+
+/* Priority for DL filters */
+typedef enum {
+    IPC_DL_FILTER_PRIORITY_BEGIN = 0,
+
+    IPC_DL_FILTER_PRIORITY(IPC_DHCP, 16)
+    IPC_DL_FILTER_PRIORITY(AOMGR, 4)
+    IPC_DL_FILTER_PRIORITY(LTECSR, 4)
+    IPC_DL_FILTER_PRIORITY(TCPIP_STACK, 1)
+
+    IPC_DL_FILTER_PRIORITY(PFM_GARBAGE_FILTER, 128)
+
+    MAX_IPC_DL_FILTER_PRIORITY,
+} IPC_DL_FILTER_PRIORITY;
+
+#endif /* __INC_IPC_FILTER_PRIORITY_H */
diff --git a/mcu/interface/middleware/hif/ipc_struct.h b/mcu/interface/middleware/hif/ipc_struct.h
new file mode 100644
index 0000000..ab3625b
--- /dev/null
+++ b/mcu/interface/middleware/hif/ipc_struct.h
@@ -0,0 +1,694 @@
+/******************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   ipc_struct.h
+ *
+ * Project:
+ * --------
+ *   TATAKA
+ *
+ * Description:
+ * ------------
+ *   IP Core ILM structure and interface definition.
+ *
+ * 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!
+ * 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!
+ * 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!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_IPC_STRUCT_H
+#define __INC_IPC_STRUCT_H
+
+#include "kal_public_api.h"
+#include "ipcore_upcm_struct.h"
+#include "upcm_did.h"
+#include "ipc_defs_public.h"
+#include "ipc_enums.h"
+#include "qmu_bm_common.h"
+#include "hif_lhif.h"
+
+typedef struct _ipc_packet_info_t {
+    kal_uint32 info_valid_fields;
+    kal_uint32 src_addr[4];
+    kal_uint32 dst_addr[4];
+    kal_uint16 ipv4_checksum;
+    kal_uint16 src_port;
+    kal_uint16 dst_port;
+    kal_uint16 tcp_flags;
+    kal_uint16 l4_checksum;
+    kal_uint8 reserved[2];
+    kal_uint8 icmpv4_type;
+    kal_uint8 icmpv6_type;
+    kal_uint8 protocol;
+    /* The following are NOT included in valid_fields */
+    kal_bool fragment;
+    kal_bool need_reassemble;
+    kal_uint32 l4_offset;
+    kal_uint32 data_offset;
+    kal_uint32 netif_id;
+    kal_uint32 out_netif_id;
+    kal_uint32 ip_id;                       /**< IPv4/IPv6 IP ID */
+    kal_uint16 frag_payload_offset;         /**< fragment offset */
+    kal_uint16 frag_payload_len;            /**< Payload length: IPv4 frag payload lenght = total length - IPv4 HDR length, IPv6 frag payload lenght = payload length - all ext HDR lehgth before fragment   >> HDR - fragment HDR lenght */
+    kal_uint8 frag_flag;                    /**< fragment flag: more fragment */
+    kal_uint16 frag_buffer_payload_offset;  /**< buffer offset which is used to inidcate the start address of fragmented payload in GPD */
+    kal_uint32 spi;
+} ipc_packet_info_t;
+
+typedef struct _ipc_io_request_t {
+    struct _ipc_io_request_t    *next_request;
+    qbm_gpd*                    first_gpd;
+    qbm_gpd*                    last_gpd;
+    kal_uint8                   ip_type;        /**< Type of IP datagrams, see IPC_IP_TYPE_XXX defined for valid values. */
+    kal_uint8                   qos_priority;   /**< Priority, valid from 0~7. */
+    kal_uint8                   data_path_type; /**< reference ipc_io_req_data_path_e */
+    kal_uint8                   reserved;
+} ipc_io_request_t;
+
+typedef struct _ipc_conf_t {
+    module_type     module_id; /**< The module registering with IP CORE. */
+    kal_uint32      netif_id;  /**< An index to identify instance of a specific module. For example, if module_id is MOD_ETHERCORE, netif_id is 0, it reprents for eth0. */
+    kal_uint32      features;  /**< Each bit is set to enable an optional feature, see IPC_F_XXX for details. */
+
+    void           *ul_reload_context; /**< Context to be passed in the callback function ipc_ul_reload_callback_t. */
+    kal_bool        (*ipc_ul_reload_callback_t)(void *context); /**< Uplink reloading callback function. */
+
+    void           *callback_context; /**< Context to be passed in the follow callback functions. */
+    kal_bool        (*ipc_dlink_callback_t)(void *context, ipc_io_request_t *ior); /** Downlink callback function. */
+    kal_bool        (*ipc_dlink_did_cb_t)(void *context, upcm_did *did); /** [Gen93] Downlink callback function. */
+} ipc_conf_t;
+
+typedef struct _ipc_frag_refilter_info_t {
+    kal_bool                uplink;
+    kal_bool                is_pkt_info;
+    kal_uint32              netif_id;
+    kal_uint32              pdn_id;
+    ipc_packet_info_t      *packet_info;
+    kal_int32               filter_id;
+    kal_uint32              filter_magic_number;
+} ipc_frag_refilter_info_t;
+
+typedef struct _ipc_filter_info_t {
+    kal_uint32      netif_id;     /**< Source Network interface ID */
+    kal_int32       ip_id;        /**< ID to query corresponding NMU IP database */
+    kal_int16       ebi;          /**< EBI that the packets came from (only valid for DL) */
+    kal_uint8       proto_idx;    /**< Index for distinquish different SIM card (only valid when supporting Multiple PS feature */
+    kal_uint8       rsvd;
+    kal_uint32      data_offset;    /**< The data offset to payload. (The length of IP TCP/UDP header) Requirement from TH.Cheng LTECSR 2014/11/11 */
+    void           *src_desc_ptr;   /**< Descriptor pointer */
+    kal_uint32      src_desc_type;  /**< Descriptor type (please refer to ipc_fi_desc_type_e)*/
+    kal_uint32      src_desc_indx;  /**< Descriptor internal index, for one descriptor containing more than one packets case. */
+} ipc_filter_info_t;
+
+/*
+ * Callback function to process the IP datagram filtered.
+ *
+ * @param   context [IN] A context specified while registering the filter.
+ * @param   filter_id [IN] Corresponding registered filter ID.
+ * @param   head_gpd [IN] Pointer head of the GPD list for the IP datagram filtered.
+ * @param   tail_gpd [IN] Pointer tail of the GPD list for the IP datagram filtered.
+ * @param   length [IN] Bytes of buffers used in the GPD list.
+ */
+typedef void (*ipc_filter_callback_t)(void *context,
+                                      kal_int32 filter_id,
+                                      qbm_gpd *head_gpd,
+                                      qbm_gpd *tail_gpd,
+                                      kal_uint32 length);
+
+/*
+ * Callback function with packet information to process the IP datagram filtered.
+ *
+ * @param   info_p [IN] Related information of filtered out GPDs.
+ * @param   context [IN] A context specified while registering the filter.
+ * @param   filter_id [IN] Corresponding registered filter ID.
+ * @param   head_gpd [IN] Pointer head of the GPD list for the IP datagram filtered.
+ * @param   tail_gpd [IN] Pointer tail of the GPD list for the IP datagram filtered.
+ * @param   length [IN] Bytes of buffers used in the GPD list.
+ */
+typedef void (*ipc_filter_with_info_callback_t)(ipc_filter_info_t *info_p,
+                                                void *context,
+                                                kal_int32 filter_id,
+                                                qbm_gpd *head_gpd,
+                                                qbm_gpd *tail_gpd,
+                                                kal_uint32 length);
+
+/**
+ * Customized Callback function to process the IP datagram filtered.
+ *
+ * @param   p_pkt     matched filter packet content
+ * @param   pkt_len   packet length
+ * @param   filter_id the filter id which was registered before
+ * @param   p_args    customized filter callback function arguments
+ *
+ * @return  KAL_TRUE means packet was matched; otherwise KAL_FALSE
+ */
+
+typedef kal_bool (*ipc_filter_cust_cbk)(const kal_uint8 *p_pkt,
+                                        kal_int32        pkt_len,
+                                        kal_int32        filter_id,
+                                        void            *p_args);
+
+typedef struct _ipc_filter_rules_t {
+    kal_uint16      features;     /**< Union of  to indicate which type of filter it is. */
+    kal_uint16      priority;     /**< Priority will affect the order of filter rules when performing filtering. */
+    kal_uint32      valid_fields; /**< Union of IPC_FILTER_BY_XXX to indicate which fields in this structure are valid. */
+    kal_uint32      netif_id;     /**< Network interface ID to filter. */
+    kal_uint32      pdn_id;       /**< [downlink filter ONLY] PDN ID to filter. */
+    kal_uint32      ebi;          /**< [downlink filter ONLY] EBI/NSAPI to filter. */
+    kal_uint8       proto_idx;    /**< [downlink filter ONLY] Multiple PS use only. */
+    kal_uint8       protocol;     /**< The protocol used in the data portion of the IP datagram to filter. */
+
+    kal_uint16      src_port;     /**< Source port number to filter. */
+    kal_uint16      dst_port;     /**< Destination port number to filter. */
+    kal_uint16      tcp_flags;    /**< TCP flags of TCP to filter. */
+    kal_uint32      spi;          /**< Security Parameter Index. */
+
+    union {
+        kal_uint8 addr8[4];
+        kal_uint32 addr32;
+    } src_ipv4; /**< Source IPv4 address to filter. */
+    union {
+        kal_uint8 addr8[4];
+        kal_uint32 addr32;
+    } dst_ipv4; /**< Destination IPv4 address to filter. */
+
+    union {
+        kal_uint8 addr8[16];
+        kal_uint32 addr32[4];
+    } src_ipv6; /**< Source IPv6 address to filter. */
+    union {
+        kal_uint8 addr8[16];
+        kal_uint32 addr32[4];
+    } dst_ipv6; /**< Destination IPv6 address to filter. */
+
+    kal_uint8       ip_type;      /**< Type of IP traffic the filter to apply, see IPC_IP_TYPE_XXX defined for valid values. */
+    kal_uint8       icmpv4_type;    /**< Type field of ICMPv4 header to filter. */
+    kal_uint8       icmpv6_type;    /**< Type field of ICMPv6 header to filter. */
+    kal_uint8       reserved;
+    ipc_filter_cust_cbk  cust_cbk_func;
+    void                *p_cust_cbk_args;
+} ipc_filter_rules_t;
+
+#define IPC_NEXT_FILTER_MAP_SIZE    2
+typedef struct _ipc_filter_t ipc_filter_t;
+typedef struct _ipc_filter_t {
+    kal_int32               filter_id;
+    ipc_filter_rules_t      rules;
+    kal_bool                callback_with_info;
+    void                   *callback_func;
+    void                   *callback_context;
+    module_type             module_id;
+    kal_uint8               is_updated_to_list;
+    kal_uint8               rsvd[1];
+    void                   *module_context;
+    ipc_filter_t           *next_filter_map[IPC_NEXT_FILTER_MAP_SIZE];
+    ipc_filter_cust_cbk     cust_cbk_func;
+    void                   *p_cust_cbk_args;
+    kal_bool                is_bypass_sync_hw;
+} ipc_filter_t;
+
+typedef struct _ipc_hdr_t {
+    kal_uint8       ip_type;    /**< Type of IP datagrams, see IPC_IP_TYPE_XXX defined for valid values. Note that only one of IPv4/IPv6 can be selected and MIX type is NOT allowed */
+    kal_uint8      *src_addr;   /**< Source IP Address, length of this pointer is decided by ip_type field */
+    kal_uint8      *dst_addr;   /**< Destination IP Address, length of this pointer is decided by ip_type field */
+    kal_uint16      src_port;   /**< Source Port Number */
+    kal_uint16      dst_port;   /**< Destination Port Number */
+    kal_uint8       dscp_tc;    /**< DSCP & ECN(IPv4) or Traffic Class(IPv6) field */
+} ipc_hdr_t;
+
+typedef void * ipc_handle_t;
+
+/**
+ * UPCM will fill DL info only on head GPD's SW control Info.
+ * user use  QBM_DES_GET_SW_CTRL_FIELD(_p) to get this structure
+ */
+typedef struct
+{
+    kal_uint8       ebi;
+    kal_uint8       flow:4;
+    kal_uint8       reserved:4;
+    kal_uint16      psn;
+}ipc_gpd_extra_info_t;
+
+/** Local parameter structure for MSG_ID_IPCORE_LINK_UP_IND / MSG_ID_IPCORE_IP_UP_IND / MSG_ID_IPCORE_LINK_UP_RSP / MSG_ID_IPCORE_IP_UP_RSP. */
+typedef struct _ipc_link_handshake_msg_t {
+    LOCAL_PARA_HDR
+    kal_uint32      netif_id;   /**< Unique ID to identified corresponding host network interface */
+    kal_int32       ip_id;      /**< ID to query corresponding NMU IP database */
+    kal_uint8       ip_type;    /**< Type of IP datagrams, see IPC_IP_TYPE_XXX defined for valid values. */
+    kal_uint8       rsvd[3];
+} ipc_link_handshake_msg_t;
+
+/** Local parameter structure for MSG_ID_IPCORE_LINK_UP_REQ / MSG_ID_IPCORE_LINK_DOWN_REQ / MSG_ID_IPCORE_IP_UP_REQ / MSG_ID_IPCORE_IP_DOWN_REQ. */
+typedef struct _ipc_link_req_t {
+    LOCAL_PARA_HDR
+    void           *callback_context;   /**< Context registered in to ipc_attach(). */
+    kal_uint8       ip_type;            /**< Type of IP datagrams, see IPC_IP_TYPE_XXX defined for valid values. */
+    kal_uint8       rsvd[3];
+    ipc_link_req_type_e req_type;
+} ipc_link_req_t;
+
+/** Local parameter structure for MSG_ID_IPCORE_LHIFCORE_QUEUE_MAPPING_REQ/RSP. */
+typedef struct _ipc_lhifcore_q_mapping_msg_t {
+    LOCAL_PARA_HDR
+    ipcore_upcm_pdn_bind_ind_struct bind_ind;           /**< PDN binding information */
+    module_type                     bind_src_mod_id;    /**< PDN binding ILM src module ID */
+    kal_uint32                      netif_features;     /**< Binding netif features */
+    void                           *callback_context;   /**< Context registered in to ipc_attach(). */
+    ipc_netif_type_e                netif_type;         /**< Type of netif for ccmni queue mapping, see ipc_netif_type_e defined for valid values */
+    kal_bool                        result;             /**< The result of dynamic queue mapping */
+} ipc_lhifcore_q_mapping_msg_t;
+
+/** Local parameter structure for MSG_ID_IPCORE_DL_PACKET_FILTERED_REQ and MSG_ID_IPCORE_UL_PACKET_FILTERED_REQ. */
+typedef struct _ipc_packet_filtered_req_t
+{
+    LOCAL_PARA_HDR
+    void       *context;
+    kal_int32   filter_id;
+    void       *head_gpd;
+    void       *tail_gpd;
+    kal_uint32  length;
+} ipc_packet_filtered_req_t;
+
+/** Local parameter structure for MSG_ID_IPCORE_DL_PACKET_FILTERED_WITH_INFO_REQ and MSG_ID_IPCORE_UL_PACKET_FILTERED_WITH_INFO_REQ. */
+typedef struct _ipc_packet_filtered_with_info_req_t
+{
+    LOCAL_PARA_HDR
+    ipc_filter_info_t    info;
+    void                *context;
+    kal_int32             filter_id;
+    void                *head_gpd;
+    void                *tail_gpd;
+    kal_uint32           length;
+} ipc_packet_filtered_with_info_req_t;
+
+/** Local parameter structure for MSG_ID_IPCORE_QUERY_INFO_CNF. */
+typedef struct _ipc_netif_info_t
+{
+    kal_uint32 netif_id;    /** Unique ID for corresponding host network interface */
+} ipc_netif_info_t;
+
+typedef struct _ipc_netif_list_t
+{
+    kal_uint32 netif_cnt;                       /**< Attached netif count */
+    ipc_netif_info_t list[IPC_MAX_NETIF_CNT];   /**< Information of each attached netif */
+} ipc_netif_list_t;
+
+typedef struct _ipc_query_info_t
+{
+    LOCAL_PARA_HDR
+    ipc_netif_list_t netif; /** Network interface information */
+} ipc_query_info_t;
+
+/** Parameter for IP CORE status change notifications */
+typedef struct _ipc_ntfy_param_t
+{
+    ipc_ntfy_type_e ntfy_type;  /**< Notify type to indicate */
+    kal_int32       ntfy_id;    /**< Notify ID allocated in ipc_register_ntfy(). */
+    void            *context;   /**< Context registered in ipc_register_ntfy(). */
+    kal_uint32      netif_id;   /**< Unique ID to identified corresponding host network interface */
+    kal_int32       ip_id;      /**< ID to query corresponding NMU IP database */
+} ipc_ntfy_param_t;
+
+/** Local parameter structure for MSG_ID_LMS_NETIF_ATTACH */
+typedef struct _lms_ipc_ntfy_t {
+    LOCAL_PARA_HDR
+    ipc_ntfy_param_t ipc_ntfy_para;
+} lms_ipc_ntfy_t;
+
+/*
+ * Callback function to notify IPCore notification.
+ *
+ * @param   param [IN] Parameter to notify registered module.
+ */
+typedef void (*ipc_ntfy_callback_t)(ipc_ntfy_param_t *param);
+
+/** Parameter for IPCore UL throttle configuration */
+typedef struct _ipc_ul_throttle_conf_t
+{
+    kal_uint8       enabled;                    /**< 0 to disable IPCORE UL throttle mechanism; otherwise, others to enable. */
+    kal_uint8       active_period_100ms;        /**< active period of UL throttle, minimum unit: 100ms.*/
+    kal_uint8       suspend_period_100ms;       /**< suspend period of UL throttle, minimum unit: 100ms.*/
+    kal_uint8       features;                   /**< feature option of UL throttle, please refer IPC_THROTTLE_FEATURE_XX */
+} ipc_ul_throttle_conf_t;
+
+/** Local parameter structure for MSG_ID_IPCORE_SET_UL_THROTTLE */
+typedef struct _ipc_set_ul_throttle_param_t {
+    LOCAL_PARA_HDR
+    ipc_ul_throttle_conf_t conf;
+} ipc_set_ul_throttle_param_t;
+
+/** Local EM structure for MSG_ID_EM_IPC_UL_THROTTLE_STATUS_IND */
+typedef struct _em_ipc_ul_throttle_status_ind_struct_t
+{
+    LOCAL_PARA_HDR
+    ipc_ul_throttle_state_e throttle_state;
+    ipc_ul_throttle_conf_t throttle_conf;
+} em_ipc_ul_throttle_status_ind_struct_t;
+
+/** Local parameter structure for MSG_ID_IPCORE_VDM_IMS_EMERGENCY_CALL_IND */
+typedef struct _ipc_vdm_ims_emergency_call_ind_struct_t
+{
+    LOCAL_PARA_HDR
+    kal_bool is_calling;
+} ipc_vdm_ims_emergency_call_ind_struct_t;
+
+/** Local parameter structure for MSG_ID_IPCORE_REGISTER_FILTER_REQ */
+typedef struct _ipc_register_filter_req_struct_t
+{
+    LOCAL_PARA_HDR
+    kal_int32               filter_id;
+    kal_bool                data_path_direct;
+    kal_bool                callback_with_info;
+    ipc_filter_rules_t      rules;
+    void                   *callback_func;
+    void                   *callback_context;
+    module_type             module_id;
+} ipc_register_filter_req_struct_t;
+
+/** Local parameter structure for MSG_ID_IPCORE_DEREGISTER_FILTER_REQ */
+typedef struct _ipc_deregister_filter_req_struct_t
+{
+    LOCAL_PARA_HDR
+    kal_int32               filter_id;
+} ipc_deregister_filter_req_struct_t;
+
+/** RQ rules structure */
+typedef struct _ipc_rq_info_t {
+    kal_bool is_ipv4;
+    kal_uint16 src_port;
+    kal_uint16 dst_port;
+    kal_uint32 spi;
+
+#define IPC_RQ_INFO_3_TUPLE (0x1 << 0)
+#define IPC_RQ_INFO_5_TUPLE (0x1 << 1)
+#define IPC_RQ_INFO_SPI     (0x1 << 2)
+    kal_uint8 valid_field;
+    kal_uint8 qfi;
+    kal_uint8 protocol;
+    kal_uint8 psi;
+
+    union {
+        kal_uint8 addr8[4];
+        kal_uint32 addr32;
+    } src_ipv4;
+    union {
+        kal_uint8 addr8[4];
+        kal_uint32 addr32;
+    } dst_ipv4;
+
+    union {
+        kal_uint8 addr8[16];
+        kal_uint32 addr32[4];
+    } src_ipv6;
+    union {
+        kal_uint8 addr8[16];
+        kal_uint32 addr32[4];
+    } dst_ipv6;
+} ipc_rq_info_t;
+
+typedef struct _ipc_rq_info_ind_t {
+    PEER_BUFF_HDR
+    void *p_rq_info;
+} ipc_rq_info_ind_t;
+
+/* IPCore filter notification context */
+typedef struct _ipc_filter_ntfy_mode_t {
+    module_type                     cbk_mod;
+    ipc_filter_callback_t           cbk_func;
+    ipc_filter_with_info_callback_t with_info_cbk_func;
+} ipc_filter_ntfy_mode_t;
+
+/* IPCore filter notification context */
+typedef struct _ipc_filter_ntfy_ctxt_t {
+    ipc_filter_ntfy_type_e ntfy_type;
+    ipc_filter_ntfy_mode_t ntfy_mod;
+    void *p_ntfy_args;
+} ipc_filter_ntfy_ctxt_t;
+
+typedef struct _ipc_restore_netif_struct_t {
+    LOCAL_PARA_HDR
+
+    kal_uint32 netif_id;
+    kal_uint8 ip_type;
+    kal_bool is_link_update;
+    kal_bool is_up;
+} ipc_restore_netif_struct_t;
+
+typedef struct _d2cm_ipcore_info_ind_struct
+{
+    LOCAL_PARA_HDR
+    kal_int32 netif_id;
+    kal_bool keep_ra;
+} d2cm_ipcore_info_ind_struct;
+
+typedef struct _ipc_data_usage_info_t {
+    kal_uint32 uplink_bytes;
+    kal_uint32 downlink_bytes;
+    kal_uint32 uplink_packets;
+    kal_uint32 downlink_packets;
+} ipc_data_usage_info_t;
+
+/**------------------------------------------------------------------------------
+ * DHL logging structure
+ *----------------------------------------------------------------------------*/
+/** typedef void ipcore_code_begin_struct; */
+typedef ipc_link_req_t ipcore_link_up_req_struct;
+typedef ipc_link_req_t ipcore_link_down_req_struct;
+typedef ipc_lhifcore_q_mapping_msg_t ipcore_lhifcore_queue_mapping_req_struct;
+typedef ipc_lhifcore_q_mapping_msg_t ipcore_lhifcore_queue_mapping_rsp_struct;
+/** typedef void lms_dl_sdu_struct; */
+typedef lms_ipc_ntfy_t lms_netif_attach_struct;
+/** typedef void ipcore_process_ul_queue_req_struct; */
+/** typedef void ipcore_retry_ul_reload_req_struct; */
+typedef ipc_packet_filtered_req_t ipcore_dl_packet_filtered_req_struct;
+typedef ipc_packet_filtered_req_t ipcore_ul_packet_filtered_req_struct;
+typedef ipc_link_req_t ipcore_ip_up_req_struct;
+typedef ipc_link_req_t ipcore_ip_down_req_struct;
+typedef ipc_link_handshake_msg_t ipcore_link_up_ind_struct;
+typedef ipc_link_handshake_msg_t ipcore_ip_up_ind_struct;
+typedef ipc_link_handshake_msg_t ipcore_link_up_rsp_struct;
+typedef ipc_link_handshake_msg_t ipcore_ip_up_rsp_struct;
+/** typedef void ipcore_query_info_req_struct; */
+typedef ipc_query_info_t ipcore_query_info_cnf_struct;
+typedef ipc_packet_filtered_with_info_req_t ipcore_dl_packet_filtered_with_info_req_struct;
+typedef ipc_packet_filtered_with_info_req_t ipcore_ul_packet_filtered_with_info_req_struct;
+typedef ipc_set_ul_throttle_param_t ipcore_set_ul_throttle_struct;
+typedef em_ipc_ul_throttle_status_ind_struct_t em_ipc_ul_throttle_status_ind_struct;
+typedef ipc_vdm_ims_emergency_call_ind_struct_t ipcore_vdm_ims_emergency_call_ind_struct;
+typedef ipc_register_filter_req_struct_t ipcore_register_filter_req_struct;
+typedef ipc_deregister_filter_req_struct_t ipcore_deregister_filter_req_struct;
+
+#endif /* __INC_IPC_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/ipfc_enums.h b/mcu/interface/middleware/hif/ipfc_enums.h
new file mode 100644
index 0000000..b5c9824
--- /dev/null
+++ b/mcu/interface/middleware/hif/ipfc_enums.h
@@ -0,0 +1,15 @@
+#ifndef __INC_IPFC_ENUMS_H
+#define __INC_IPFC_ENUMS_H
+
+typedef enum _ipfc_dbg_func_code {
+    IPFC_CORE_MAKE_RESERVATION = 0,
+    IPFC_CORE_CANCEL_RESERVATION,
+    IPFC_CORE_WAIT_IN_LINE,
+    IPFC_CORE_SERVE_ORDER,
+    IPFC_GOURMET_DL_FILTER_QUEST_TO_UPDATE_HW_FILTER,
+    IPFC_GOURMET_DL_FILTER_PEND_TO_UPDATE_HW_FILTER,
+    IPFC_GOURMET_DL_FILTER_UPDATE_HW_FILTER,
+    IPFC_DBG_FUNC_CODE_MAX = 0x7fffffff,
+} ipfc_dbg_func_code;
+
+#endif /* __INC_IPFC_ENUMS_H */
diff --git a/mcu/interface/middleware/hif/ipfc_export_core.h b/mcu/interface/middleware/hif/ipfc_export_core.h
new file mode 100644
index 0000000..01ab493
--- /dev/null
+++ b/mcu/interface/middleware/hif/ipfc_export_core.h
@@ -0,0 +1,10 @@
+#ifndef  _IPFCORE_EXPORT_INC
+#define  _IPFCORE_EXPORT_INC
+
+#include "kal_public_api.h"
+
+kal_bool    ipfc_core_enable_meta_check(kal_uint32 meta_id, void (*hdlr_p)(kal_uint16, kal_uint16, kal_uint32));
+void        ipfc_core_query_meta_info(void** base, kal_uint16* entry_num, kal_uint32 ipf_meta_q_type);
+void        ipfc_core_release_meta_entry(kal_uint16 rel_num, kal_uint32 ipf_meta_q_type);
+
+#endif //_IPFCORE_EXPORT_INC
diff --git a/mcu/interface/middleware/hif/ipfc_export_plugin_rqos.h b/mcu/interface/middleware/hif/ipfc_export_plugin_rqos.h
new file mode 100644
index 0000000..deeec1d
--- /dev/null
+++ b/mcu/interface/middleware/hif/ipfc_export_plugin_rqos.h
@@ -0,0 +1,10 @@
+#ifndef __INC_IPFC_PLUGIN_RQOS
+#define __INC_IPFC_PLUGIN_RQOS
+
+#include "kal_public_api.h"
+#include "ipfc_export_plugin_rqos_type.h"
+
+kal_bool ipfc_plugin_rqos_set_threshold(kal_uint8 pdn_sim_id, kal_bool to_enable, kal_uint16 threshold);
+kal_bool ipfc_gourmet_rqos_nas_enable(kal_uint16 t_unit);
+
+#endif //__INC_IPFC_PLUGIN_RQOS
diff --git a/mcu/interface/middleware/hif/ipfc_export_plugin_rqos_type.h b/mcu/interface/middleware/hif/ipfc_export_plugin_rqos_type.h
new file mode 100644
index 0000000..79914ef
--- /dev/null
+++ b/mcu/interface/middleware/hif/ipfc_export_plugin_rqos_type.h
@@ -0,0 +1,29 @@
+#ifndef __INC_IPFC_PLUGIN_RQOS_TYPE
+#define __INC_IPFC_PLUGIN_RQOS_TYPE
+
+#include "kal_public_api.h"
+#include "kal_public_defs.h"
+
+#include "ipc_struct.h"
+
+#define RQOS_PROTOCOL_TCP 0x06
+#define RQOS_PROTOCOL_UDP 0x11
+#define RQOS_PROTOCOL_ESP 0x32
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 rule_idx;
+
+    ipc_rq_info_t rq_info;
+
+} tftlib_rqos_add_rule_ind_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint32 delete_bitmask;
+
+} tftlib_rqos_del_rules_ind_struct;
+
+#endif //__INC_IPFC_PLUGIN_RQOS_TYPE
diff --git a/mcu/interface/middleware/hif/lms_enums.h b/mcu/interface/middleware/hif/lms_enums.h
new file mode 100644
index 0000000..b00841d
--- /dev/null
+++ b/mcu/interface/middleware/hif/lms_enums.h
@@ -0,0 +1,70 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   lms_enums.h
+ *
+ * Project:
+ * --------
+ *   TATAKA
+ *
+ * Description:
+ * ------------
+ *   LMS public enumeration definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_LMS_ENUMS_H
+#define __INC_LMS_ENUMS_H
+
+/*------------------------------------------------------------------------------
+ * Data structure defintion.
+ *----------------------------------------------------------------------------*/
+
+#endif /* __INC_LMS_ENUMS_H */
diff --git a/mcu/interface/middleware/hif/lms_struct.h b/mcu/interface/middleware/hif/lms_struct.h
new file mode 100644
index 0000000..b642368
--- /dev/null
+++ b/mcu/interface/middleware/hif/lms_struct.h
@@ -0,0 +1,75 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   lms_struct.h
+ *
+ * Project:
+ * --------
+ *   TATAKA
+ *
+ * Description:
+ * ------------
+ *   LMS ILM structure and interface definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+  *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_LMS_STRUCT_H
+#define __INC_LMS_STRUCT_H
+
+#include "hif_ior.h"
+#include "hif_mw_msgid.h"
+#include "ipc_struct.h"
+
+
+/*------------------------------------------------------------------------------
+ * DHL logging structure
+ *----------------------------------------------------------------------------*/
+
+#endif /* __INC_LMS_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/mbim_defs_public.h b/mcu/interface/middleware/hif/mbim_defs_public.h
new file mode 100644
index 0000000..fa82349
--- /dev/null
+++ b/mcu/interface/middleware/hif/mbim_defs_public.h
@@ -0,0 +1,75 @@
+/*****************************************************************************
+*  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. 
+*
+*  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:
+ * ---------
+ *   mbim_defs_public.h
+ *
+ * Project:
+ * --------
+ * 
+ *
+ * Description:
+ * ------------
+ *   MBIM public definition.
+ *
+ * Author:
+ * -------
+ *   
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_MBIM_DEFS_PUBLIC_H
+#define __INC_MBIM_DEFS_PUBLIC_H
+
+typedef struct{
+	LOCAL_PARA_HDR
+	kal_uint32 remote_wakeup_type;
+} usb_l5io_remote_wakeup_ind_struct;
+
+typedef int (*mbim_suspend_callback)(void *param);
+void mbim_register_suspend_callback(mbim_suspend_callback callback, void *param);
+
+#endif /* __INC_MBIM_DEFS_PUBLIC_H */
diff --git a/mcu/interface/middleware/hif/ms_adapter.h b/mcu/interface/middleware/hif/ms_adapter.h
new file mode 100644
index 0000000..d9d7b3b
--- /dev/null
+++ b/mcu/interface/middleware/hif/ms_adapter.h
@@ -0,0 +1,83 @@
+#ifndef __MS_ADAPTER_H
+#define __MS_ADAPTER_H
+
+#include "fs_func.h"
+
+#define MAX_DISK_DRVER              	4
+#define	USBMS_INVALID_MAX_LUN			0xFF
+#define DEFAULT_MAX_GPD_OF_LUN			64
+#define NAND_READ_SZ					(1024*16)
+#define NAND_WRITE_SZ					(1024*32)
+
+typedef enum 
+{
+	USB_STORAGE_DEV_STATUS_OK = 0,
+	USB_STORAGE_DEV_STATUS_MEDIA_CHANGE,
+	USB_STORAGE_DEV_STATUS_NOMEDIA,
+	USB_STORAGE_DEV_STATUS_WP,
+	USB_STORAGE_DEV_STATUS_MAX
+} USB_STORAGE_DEV_STATUS;
+
+
+typedef enum
+{
+	USB_STORAGE_DEV_NOR,
+	USB_STORAGE_DEV_NAND,
+	USB_STORAGE_DEV_CARD,
+	USB_STORAGE_DEV_CDROM,
+	USB_STORAGE_DEV_NONE
+}USB_STORAGE_DEV_TYPE;
+
+/* read capacity command structure */
+typedef struct
+{
+	kal_uint32 LastBA;	/*depend on the target*/
+	kal_uint32 BlkLen;	/*512*/
+} Read_Capacity_Info;     
+
+typedef struct
+{
+	kal_bool (* usbms_read)(void *data, kal_uint32 lba, kal_uint16 lba_num);
+	kal_bool (* usbms_write)(void *data, kal_uint32 lba, kal_uint16 lba_num);
+	kal_bool (* usbms_read_gpd)(qbm_gpd *head,qbm_gpd *tail, kal_uint32 lba, kal_uint16 lba_num); //read with GPD
+	kal_bool (* usbms_write_gpd)(qbm_gpd *head,qbm_gpd *tail, kal_uint32 lba, kal_uint16 lba_num); //write with GPD
+	kal_bool (* usbms_query_max_bd_num)(kal_uint16  *max_bd_num); //query the max BD number, the driver can receive
+	kal_bool (* usbms_format)(void);
+	USB_STORAGE_DEV_STATUS (* usbms_checkmedia_exist)(void);
+	kal_bool (* usbms_prevmedia_removal)(kal_bool enable);
+	kal_bool (* usbms_read_capacity)(kal_uint32 *max_lba, kal_uint32 *lba_len);
+//	kal_bool (* usbms_read_formatcapacity)(kal_uint32 *no_of_blks, kal_uint32 *blk_len);
+	USB_STORAGE_DEV_TYPE	(* usbms_dev_type)(void);
+}USB_DiskDriver_STRUCT;
+
+typedef enum 
+{
+	MS_READ = 0,
+	MS_WRITE
+} MS_DIRECTION;
+
+extern FS_HANDLE			g_cdrom_drive_handle;
+/* translate fd type to usb dev type*/
+extern USB_STORAGE_DEV_TYPE MS_Trans_Fs_Type(FS_DEVICE_TYPE_ENUM type);
+extern kal_uint8 MS_Get_Max_LUN(void);
+extern void MS_DeRegister_DiskDriver(kal_uint8 disk_index);
+extern void MS_Change_Register_DiskDriver(kal_uint8 disk_index, USB_DiskDriver_STRUCT *disk_api);
+extern USB_STORAGE_DEV_STATUS MS_Checkmedia_Exist(kal_uint8 LUN);
+extern kal_bool MS_Format(kal_uint8 LUN);
+extern kal_bool MS_Read_Capacity(kal_uint8 LUN, kal_uint32 *max_lba, kal_uint32 *lba_len);
+//extern kal_bool MS_Read_FormatCapacity(kal_uint8 LUN, kal_uint32 *max_lba, kal_uint32 *sec_len);
+extern kal_bool MS_Read_Write(MS_DIRECTION direct, void *dev_t,qbm_gpd *head,qbm_gpd *tail, kal_uint16 lba_num);
+extern kal_bool MS_Prevmedia_Removal(kal_uint8 LUN, kal_bool enable);
+extern USB_STORAGE_DEV_TYPE MS_Dev_Type(kal_uint8 LUN);
+extern kal_uint8 MS_Register_DiskDriver(USB_DiskDriver_STRUCT *disk_api);
+extern kal_uint8 MS_Set_Current_Driver(kal_uint32 drv);
+extern kal_uint32 MS_Get_Current_Driver(void);
+extern void MS_Adapter_Deinit(void);
+extern void MS_Init_Normal_Mode(void);
+extern void MS_End_Normal_Mode(void);
+extern kal_uint16 MS_Query_Max_BD_Num(kal_uint8 LUN);
+extern void FAT_Init(void);
+
+#endif
+
+
diff --git a/mcu/interface/middleware/hif/nccmni_if.h b/mcu/interface/middleware/hif/nccmni_if.h
new file mode 100644
index 0000000..0ff8d38
--- /dev/null
+++ b/mcu/interface/middleware/hif/nccmni_if.h
@@ -0,0 +1,275 @@
+/*****************************************************************************
+*  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) 2012
+*
+*  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:
+ * ---------
+ *   nccmni.h
+ *
+ * Project:
+ * --------
+ *   VMOLY
+ *
+ * Description:
+ * ------------
+ *   NCCMNI interface header file
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ * ==========================================================================
+ * $Log$
+ *
+ * 03 23 2020 actory.ou
+ * [MOLY00502858] [Gen97][Gen98] merge ccci channel id/runtime data id
+ * [19NOV][OA][NCCCIDEV] sync TTY/NCCMNI port table
+ *
+ * 02 24 2020 actory.ou
+ * [MOLY00474576] [Gen97] NCCMNI development
+ * [19NOV.DEV][OA] add sending API for proxy to send packet to sAP
+ *
+ *
+ ****************************************************************************/
+#ifndef _NCCMNI_IF_H
+#define _NCCMNI_IF_H
+
+#include "tcpip_struct.h"
+#include "iwlan_public_defs.h"
+
+typedef enum{
+    NCCMNI_NET_IF_MIN = 0,
+    NCCMNI_NET_IF_0 = NCCMNI_NET_IF_MIN,
+    NCCMNI_NET_IF_1,
+    NCCMNI_NET_IF_2,
+    NCCMNI_NET_IF_3,
+    NCCMNI_NET_IF_4,
+    NCCMNI_NET_IF_5,
+    NCCMNI_NET_IF_6,
+    NCCMNI_NET_IF_7,
+    NCCMNI_NET_IF_8,
+    NCCMNI_NET_IF_9,
+    NCCMNI_NET_IF_10,
+    NCCMNI_NET_IF_11,
+    NCCMNI_NET_IF_12,
+    NCCMNI_NET_IF_13,
+    NCCMNI_NET_IF_14,
+    NCCMNI_NET_IF_15,
+    NCCMNI_NET_IF_16,
+    NCCMNI_NET_IF_17,
+    NCCMNI_NET_IF_18,
+    NCCMNI_NET_IF_19,
+    NCCMNI_NET_IF_20,
+    NCCMNI_NET_IF_MAX,
+    NCCMNI_NET_IF_MAXBIT = 0xFF,
+} NCCMNI_NET_IF_E;
+
+typedef enum{
+    NCCMNI_PACKET_TYPE_BUFFER = 0, //support buffer mode only
+    NCCMNI_PACKET_TYPE_MAX,
+} NCCMNI_PACKET_TYPE_E;
+
+typedef struct{
+    NCCMNI_PACKET_TYPE_E pkt_type;
+    
+    //if pkt type==NCCMNI_PACKET_TYPE_BUFFER
+    kal_uint8 *p_data;
+    kal_uint32 data_len;
+} NCCMNI_SEND_PACKET_T;
+
+kal_bool nccmni_send_dl_pkt(NCCMNI_SEND_PACKET_T *p_pkt, NCCMNI_NET_IF_E netif_id);
+
+//L5 -> NCCMNI
+
+#pragma pack(push)
+#pragma pack(4)
+// MSG_ID_L5_NCCMNI_REGFILTER_REQ
+typedef struct{
+    NCCMNI_NET_IF_E nccmni_net_if; //kal_uint8
+    kal_uint16 nccmni_seq;
+    kal_uint8 reserve1;
+    kal_uint32 valid_field; //mandatory, a bitmap, refer to IPC_FILTER_BY_XXX
+    kal_uint8 ip_type; //IPC_IP_TYPE_IPV4 or IPC_IP_TYPE_IPV6
+    kal_uint8 ctrl_protocol; //IPC_HDR_PROT_XXX
+    kal_uint16 src_port;
+    kal_uint16 dst_port;
+    kal_uint16 tcp_flags; //IPC_HDR_TCP_FLAG_XXX
+    kal_uint32 spi; //
+    union{
+        kal_uint8 addr8[4];
+        kal_uint32 addr32;
+    } src_ipv4; // Source IPv4 address to filter.
+    union{
+        kal_uint8 addr8[4];
+        kal_uint32 addr32;
+    } dst_ipv4; // Destination IPv4 address to filter.
+
+    union{
+        kal_uint8 addr8[16];
+        kal_uint32 addr32[4];
+    } src_ipv6; // Source IPv6 address to filter.
+    union{
+        kal_uint8 addr8[16];
+        kal_uint32 addr32[4];
+    } dst_ipv6; // Destination IPv6 address to filter. 
+    
+    kal_uint8 icmpv4_type;    // Type field of ICMPv4 header to filter.
+    kal_uint8 icmpv6_type;    // Type field of ICMPv6 header to filter.
+    kal_uint16 reserve2;
+} l5_nccmni_regfilter_req_struct;
+#pragma pack(pop)
+
+
+#pragma pack(push)
+#pragma pack(4)
+// MSG_ID_L5_NCCMNI_REGFILTER_CNF
+typedef struct{
+    NCCMNI_NET_IF_E nccmni_net_if; //kal_uint8
+    kal_uint16 nccmni_seq;
+    kal_uint8 reserve;
+    kal_int32 filter_id; //>=0: filter id, <0: set failed
+} l5_nccmni_regfilter_cnf_struct;
+#pragma pack(pop)
+
+
+#pragma pack(push)
+#pragma pack(4)
+// MSG_ID_L5_NCCMNI_DEREGFILTER_REQ
+typedef struct{
+    NCCMNI_NET_IF_E nccmni_net_if; //kal_uint8
+    kal_uint16 nccmni_seq;
+    kal_uint8 reserve;
+    kal_int32 is_deregister_all_filter; //0: deregister the filter id only, 1: deregister all filter
+    kal_int32 filter_id; //filter id to deregister
+} l5_nccmni_deregfilter_req_struct;
+#pragma pack(pop)
+
+
+#pragma pack(push)
+#pragma pack(4)
+// MSG_ID_L5_NCCMNI_DEREGFILTER_CNF
+typedef struct{
+    NCCMNI_NET_IF_E nccmni_net_if; //kal_uint8
+    kal_uint16 nccmni_seq;
+    kal_uint8 reserve;
+    kal_int32 is_success; //1: success
+} l5_nccmni_deregfilter_cnf_struct;
+#pragma pack(pop)
+
+
+// D2 --> NCCMNI
+
+#define D2_NCCMNI_REQ_LOCAL_PARA_HDR \
+    LOCAL_PARA_HDR \
+    kal_uint32      interface_id; /* transaction id + channel id */ \
+    iwlan_ran_e     ran_type;     /* iwlan_ran_e */
+
+// MSG_ID_D2_NCCMNI_ESTABLISHPDN_REQ
+typedef struct
+{
+    D2_NCCMNI_REQ_LOCAL_PARA_HDR
+
+    kal_uint32              netif_id;     /* network_interface_id in net_info */
+    new_ip_info_struct      ip_info;
+    kal_bool                net_info_present;
+    tcpip_net_info_struct_t net_info;
+} d2_nccmni_establishpdn_req_struct;
+
+// MSG_ID_D2_NCCMNI_DISCONNECTPDN_REQ
+typedef struct
+{
+    D2_NCCMNI_REQ_LOCAL_PARA_HDR
+} d2_nccmni_disconnectpdn_req_struct;
+
+// MSG_ID_D2_NCCMNI_IFCHANGE_REQ
+typedef struct
+{
+    D2_NCCMNI_REQ_LOCAL_PARA_HDR
+
+    kal_uint32              event;
+    new_ip_info_struct      ip_info;
+    kal_bool                net_info_present;
+    tcpip_net_info_struct_t net_info;
+} d2_nccmni_ifchange_req_struct;
+
+
+// NCCMNI --> D2
+typedef enum
+{
+    NCCMNI_RES_SUCC = 0,
+    NCCMNI_RES_NONE = 1,
+    NCCMNI_RES_FAIL = 2,
+    NCCMNI_RES_MAX  = 0x7FFFFFFF,
+} nccmni_res_enum;
+
+
+#define D2_NCCMNI_CNF_LOCAL_PARA_HDR \
+    LOCAL_PARA_HDR \
+    kal_uint32      interface_id; \
+    nccmni_res_enum res;
+
+typedef struct
+{
+    D2_NCCMNI_CNF_LOCAL_PARA_HDR
+} d2_nccmni_cnf_struct;
+
+
+// MSG_ID_D2_NCCMNI_ESTABLISHPDN_CNF
+typedef struct
+{
+    D2_NCCMNI_CNF_LOCAL_PARA_HDR
+
+    // kal_uint32              stkif_id;
+    // ipstk_ip_info_struct    ipstk_ip_info;
+} d2_nccmni_establishpdn_cnf_struct;
+
+// MSG_ID_D2_NCCMNI_DISCONNECTPDN_CNF
+typedef struct
+{
+    D2_NCCMNI_CNF_LOCAL_PARA_HDR
+
+    // kal_uint32              stkif_id;
+} d2_nccmni_disconnectpdn_cnf_struct;
+
+// MSG_ID_D2_NCCMNI_IFCHANGE_CNF
+typedef struct
+{
+    D2_NCCMNI_CNF_LOCAL_PARA_HDR
+
+    // kal_uint32              stkif_id;
+    // ipstk_ip_info_struct    ipstk_ip_info;
+} d2_nccmni_ifchange_cnf_struct;
+
+#endif //#ifndef _NCCMNI_IF_H
diff --git a/mcu/interface/middleware/hif/ndpc_struct.h b/mcu/interface/middleware/hif/ndpc_struct.h
new file mode 100644
index 0000000..a40228c
--- /dev/null
+++ b/mcu/interface/middleware/hif/ndpc_struct.h
@@ -0,0 +1,258 @@
+/*!
+ *  @file ndpc_struct.h
+ *  @author Roger Huang <chaomin.haung@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides structure definition of ndpc ( NDP Client )
+ */
+
+#ifndef _NDPC_STRUCT_H
+#define _NDPC_STRUCT_H
+
+/*!
+ *  @brief ndpc_cause_e enumerate possible cause of NDP Client
+ *  @param NDPC_CAUSE_MIN                   pseudo state
+ *  @param NDPC_CAUSE_SUCCESS               success
+ *  @param NDPC_CAUSE_NO_INSTANCE           no instance available
+ *  @param NDPC_CAUSE_INVALID_PARAMETER     parameter is invalid
+ *  @param NDPC_CAUSE_MAX                   pseudo state
+ */
+typedef enum _ndpc_cause {
+    NDPC_CAUSE_MIN                                  = 0,
+    NDPC_CAUSE_SUCCESS                              = 1,
+    NDPC_CAUSE_NO_INSTANCE                          = 2,
+    NDPC_CAUSE_INVALID_PARAMETER                    = 3,
+    NDPC_CAUSE_INVALID_STATE                        = 4,
+    NDPC_CAUSE_MAX                                  = 5,
+} ndpc_cause_e;
+
+
+/*!
+ *  @brief ndpc_link_layer_type_e enumerate possible link layer type of
+ *         NDP Client
+ *  @param NDPC_LINK_MIN                    pseudo state
+ *  @param NDPC_LINK_ETHERNET               ethernet type
+ *  @param NDPC_LINK_MAX                    pseudo state
+ */
+typedef enum _ndpc_link_layer_type {
+    NDPC_LINK_MIN                                   = 0,
+    NDPC_LINK_ETHERNET                              = 1,
+    NDPC_LINK_MAX                                   = 2,
+} ndpc_link_layer_type_e;
+
+
+#define NDPC_MAX_LINK_ADDRESS_SIZE                  8
+/*!
+ *  @brief ndpc_activagte_req_struct describe activate request information
+ *         of NDP Client
+ */
+typedef struct _ndpc_activate_req_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief link layer type
+     */
+    ndpc_link_layer_type_e      link_layer_type;
+    /*!
+     *  @brief link layer address
+     */
+    kal_uint8                   link_layer_address[NDPC_MAX_LINK_ADDRESS_SIZE];
+} ndpc_activate_req_struct;
+
+
+/*!
+ *  @brief ndpc_activate_rsp_struct describe activate response information
+ *         of NDP Client
+ */
+typedef struct _ndpc_activate_rsp_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief NDP Client instance identifier
+     */
+    kal_uint8       ndp_id;
+    /*!
+     *  @brief response cause
+     */
+    ndpc_cause_e    cause;
+} ndpc_activate_rsp_struct;
+
+
+/*!
+ *  @brief ndpc_deactivate_req_struct describe deactivate request information
+ *         of NDP Client
+ */
+typedef struct _ndpc_deactivate_req_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief NDP Client instance identifier
+     */
+    kal_uint8       ndp_id;
+} ndpc_deactivate_req_struct;
+
+
+/*!
+ *  @brief ndpc_deactivate_rsp_struct describe deactivate response information
+ *         of NDP Client
+ */
+typedef struct _ndpc_deactivate_rsp_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief NDP Client instance identifier
+     */
+    kal_uint8       ndp_id;
+    /*!
+     *  @brief response cause
+     */
+    ndpc_cause_e    cause;
+} ndpc_deactivate_rsp_struct;
+
+
+/*!
+ *  @brief ndpc_packet_req_struct describe packet request information
+ *         of NDP Client
+ */
+typedef struct _ndpc_packet_req_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief NDP Client instance identifier
+     */
+    kal_uint8       ndp_id;
+    /*!
+     *  @brief request gpd packet buffer
+     */
+    void*           gpd;
+} ndpc_packet_req_struct;
+
+
+/*!
+ *  @brief ndpc_packet_ind_struct describe packet indicate information
+ *         of NDP Client
+ */
+typedef struct _ndpc_packet_ind_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief NDP Client instance identifier
+     */
+    kal_uint8       ndp_id;
+    /*!
+     *  @brief indicate gpd packet buffer
+     */
+    void*           gpd;
+} ndpc_packet_ind_struct;
+
+
+/*!
+ *  @brief ndpc_ip_up_ind_struct describe ip up indicate information
+ *         of NDP Client
+ */
+typedef struct _ndpc_ip_up_ind_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief NDP Client instance identifier
+     */
+    kal_uint8       ndp_id;
+} ndpc_ip_up_ind_struct;
+
+
+/*!
+ *  @brief ndpc_ip_down_ind_struct describe ip down indicate information
+ *         of NDP Client
+ */
+typedef struct _ndpc_ip_down_ind_struct {
+    /*!
+     *  @brief ILM local parameter header
+     */
+    LOCAL_PARA_HDR
+    /*!
+     *  @brief ip instance identifier
+     */
+    kal_uint8       ip_id;
+    /*!
+     *  @brief NDP Client instance identifier
+     */
+    kal_uint8       ndp_id;
+} ndpc_ip_down_ind_struct;
+
+
+#endif  // _NDPC_STRUCT_H
+
diff --git a/mcu/interface/middleware/hif/nmu.h b/mcu/interface/middleware/hif/nmu.h
new file mode 100644
index 0000000..772a4e8
--- /dev/null
+++ b/mcu/interface/middleware/hif/nmu.h
@@ -0,0 +1,177 @@
+/*!
+ *  @file nmu.h
+ *  @author Roger Huang <chaomin.haung@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides interface of nmu ( network management unit )
+ */
+
+#ifndef _NMU_H
+#define _NMU_H
+
+#define DECLARE_NMU_ETH_ENUM(_prefix) \
+    NMU_ ## _prefix ## _UP, \
+    NMU_ ## _prefix ## _HOST_MAC, \
+    NMU_ ## _prefix ## _GATEWAY_MAC, \
+    NMU_ ## _prefix ## _TX_PKT_CNT, \
+    NMU_ ## _prefix ## _RX_PKT_CNT, \
+    NMU_ ## _prefix ## _TX_BYTE_CNT, \
+    NMU_ ## _prefix ## _RX_BYTE_CNT, \
+    NMU_ ## _prefix ## _TX_ERROR_PKT_CNT, \
+    NMU_ ## _prefix ## _RX_ERROR_PKT_CNT, \
+    NMU_ ## _prefix ## _TX_DROP_PKT_CNT, \
+    NMU_ ## _prefix ## _RX_DROP_PKT_CNT, \
+    NMU_ ## _prefix ## _RX_FRAME_ALIGN_ERROR_CNT,
+
+#define DECLARE_NMU_IP_ENUM(_prefix) \
+    NMU_ ## _prefix ## _UP, \
+    NMU_ ## _prefix ## _ADDR, \
+    NMU_ ## _prefix ## _MASK, \
+    NMU_ ## _prefix ## _GATEWAY, \
+    NMU_ ## _prefix ## _MTU_SIZE, \
+    NMU_ ## _prefix ## _DNS_NUM, \
+    NMU_ ## _prefix ## _DNS1, \
+    NMU_ ## _prefix ## _DNS2, \
+    NMU_ ## _prefix ## _IP6_UP, \
+    NMU_ ## _prefix ## _IP6_PREFIX, \
+    NMU_ ## _prefix ## _IP6_PREFIX_LEN, \
+    NMU_ ## _prefix ## _IP6_IID, \
+    NMU_ ## _prefix ## _IP6_IID_LEN, \
+    NMU_ ## _prefix ## _IP6_MTU_SIZE, \
+    NMU_ ## _prefix ## _IP6_DNS_NUM, \
+    NMU_ ## _prefix ## _IP6_DNS1, \
+    NMU_ ## _prefix ## _IP6_DNS2,
+
+/*!
+ *  @brief nmu_entry_e enumberate all information entry support in nmu
+ */
+typedef enum _nmu_entry_e {
+    NMU_MTU_SIZE,           /* Maximal transmission unit in bytes. "Downlink = host Rx = device Tx"
+                               Default value is 9000. Original value is 1500. */
+    NMU_MRU_SIZE,           /* Maximal receive unit in bytes. "Uplink = host Tx = device Rx"
+                               Default value is 1500. */
+    NMU_UL_SPEED,           /* Uplink speed in unit of bps. */
+    NMU_DL_SPEED,           /* Downlink speed in unit of bps. */
+
+    DECLARE_NMU_ETH_ENUM(ETH0)
+    DECLARE_NMU_ETH_ENUM(ETH1)
+    DECLARE_NMU_ETH_ENUM(ETH2)
+    DECLARE_NMU_ETH_ENUM(ETH3)
+    DECLARE_NMU_ETH_ENUM(ETH4)
+    DECLARE_NMU_ETH_ENUM(ETH5)
+    DECLARE_NMU_ETH_ENUM(ETH6)
+    DECLARE_NMU_ETH_ENUM(ETH7)
+    DECLARE_NMU_ETH_ENUM(ETH8)
+    DECLARE_NMU_ETH_ENUM(ETH9)
+    DECLARE_NMU_ETH_ENUM(ETH10)
+    DECLARE_NMU_ETH_ENUM(ETH11)
+    DECLARE_NMU_ETH_ENUM(ETH12)
+    DECLARE_NMU_ETH_ENUM(ETH13)
+    DECLARE_NMU_ETH_ENUM(ETH14)
+    DECLARE_NMU_ETH_ENUM(ETH15)
+
+    DECLARE_NMU_IP_ENUM(IP0)
+    DECLARE_NMU_IP_ENUM(IP1)
+    DECLARE_NMU_IP_ENUM(IP2)
+    DECLARE_NMU_IP_ENUM(IP3)
+    DECLARE_NMU_IP_ENUM(IP4)
+    DECLARE_NMU_IP_ENUM(IP5)
+    DECLARE_NMU_IP_ENUM(IP6)
+    DECLARE_NMU_IP_ENUM(IP7)
+    DECLARE_NMU_IP_ENUM(IP8)
+    DECLARE_NMU_IP_ENUM(IP9)
+    DECLARE_NMU_IP_ENUM(IP10)
+    DECLARE_NMU_IP_ENUM(IP11)
+    DECLARE_NMU_IP_ENUM(IP12)
+    DECLARE_NMU_IP_ENUM(IP13)
+    DECLARE_NMU_IP_ENUM(IP14)
+    DECLARE_NMU_IP_ENUM(IP15)
+
+    /* always be the last line */
+    NMU_MAX_ENTRY,
+} nmu_entry_e;
+
+typedef kal_uint8                   nmu_eth_addr_t[6];
+typedef kal_uint32                  nmu_in_addr_t;
+typedef kal_uint32                  nmu_in6_addr_t[4];
+typedef kal_uint8                   nmu_status_t;
+typedef kal_uint64                  nmu_stat_t;
+
+/*!
+ *  @brief nmu_nvram_table_t is a collection of network information stored
+ *                           in nvram
+ */
+typedef struct _nmu_nvram_table {
+    kal_uint32              compiler_resv;
+    nmu_eth_addr_t          eth0_host_mac;
+
+} nmu_nvram_table_t;
+
+/*!
+ *  @brief  nmu init function
+ */
+void nmu_init(void);
+
+
+/*!
+ *  @brief  write entry value to nmu
+ *  @param  entry entry enum value
+ *  @param  len   the length to write
+ *  @param  data  pointer to the start address of entry data
+ *  @return KAL_TRUE if success, KAL_FALSE if entry not exist, or Read Only
+ *          attribute is set
+ */
+kal_bool nmu_set_property(nmu_entry_e entry, kal_uint32 len, void* data);
+
+
+/*!
+ *  @brief  read entry value from nmu
+ *  @param  entry entry enum value
+ *  @param  len   the length to read
+ *  @param  data  pointer to the start address of entry data
+ *  @return KAL_TRUE if success, KAL_FALSE if entry not exist, or
+ *          data buffer is not big enough
+ */
+kal_bool nmu_get_property(nmu_entry_e entry, kal_uint32 len, void* data);
+
+
+/*!
+ *  @brief  clean all entry value
+ */
+void nmu_clean_db(void);
+
+
+#endif  // _NMU_H
+
diff --git a/mcu/interface/middleware/hif/nmu_util.h b/mcu/interface/middleware/hif/nmu_util.h
new file mode 100644
index 0000000..2f80937
--- /dev/null
+++ b/mcu/interface/middleware/hif/nmu_util.h
@@ -0,0 +1,582 @@
+/*!
+ *  @file nmu_util.h
+ *  @author Roger Huang <chaomin.haung@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides utility interface of nmu ( network management unit )
+ */
+
+#ifndef _NMU_UTIL_H
+#define _NMU_UTIL_H
+
+#include "nmu.h"
+
+
+/*!
+ *  @brief  set ethernet interface up
+ *  @param  eth_id ethernet interface id
+ */
+void nmu_set_eth_up(kal_uint8 eth_id);
+
+
+/*
+ *  @brief  set ethernet interface down
+ *  @param  eth_id ethernet interface id
+ */
+void nmu_set_eth_down(kal_uint8 eth_id);
+
+
+/*
+ *  @brief  check if ethernet interface is up or not
+ *  @param  eth_id ethernet interface id
+ *  @return KAL_TRUE if ethernet interface is up, KAL_FALSE if it's down
+ *          attribute is set
+ */
+kal_bool nmu_check_eth_up(kal_uint8 eth_id);
+
+
+/*
+ *  @brief  set host mac address of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  mac_address mac address to be written
+ */
+void nmu_set_host_mac(kal_uint8 eth_id, void* mac_address);
+
+
+/*
+ *  @brief  get host mac address of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  mac_address mac address to be read
+ */
+void nmu_get_host_mac(kal_uint8 eth_id, void* mac_address);
+
+
+/*
+ *  @brief  set gateway mac address of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  mac_address mac address to be written
+ */
+void nmu_set_gateway_mac(kal_uint8 eth_id, void* mac_address);
+
+
+/*
+ *  @brief  get gateway mac address of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  mac_address mac address to be read
+ */
+void nmu_get_gateway_mac(kal_uint8 eth_id, void* mac_address);
+
+
+/*
+ *  @brief  set transmit packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be written
+ */
+void nmu_set_eth_tx_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  add transmit packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be added
+ */
+void nmu_add_eth_tx_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  get transmit packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be read
+ */
+void nmu_get_eth_tx_pkt_cnt(kal_uint8 eth_id, nmu_stat_t* value);
+
+
+/*
+ *  @brief  set receive packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be written
+ */
+void nmu_set_eth_rx_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  add receive packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be added
+ */
+void nmu_add_eth_rx_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  get receive packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be read
+ */
+void nmu_get_eth_rx_pkt_cnt(kal_uint8 eth_id, nmu_stat_t* value);
+
+
+/*
+ *  @brief  set transmit packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be written
+ */
+void nmu_set_eth_tx_byte_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  add transmit packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be added
+ */
+void nmu_add_eth_tx_byte_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  get transmit packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be read
+ */
+void nmu_get_eth_tx_byte_cnt(kal_uint8 eth_id, nmu_stat_t* value);
+
+
+/*
+ *  @brief  set receive packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be written
+ */
+void nmu_set_eth_rx_byte_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  add receive packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be added
+ */
+void nmu_add_eth_rx_byte_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  get receive packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be read
+ */
+void nmu_get_eth_rx_byte_cnt(kal_uint8 eth_id, nmu_stat_t* value);
+
+
+/*
+ *  @brief  set receive packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be written
+ */
+void nmu_set_eth_tx_error_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  add receive packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be added
+ */
+void nmu_add_eth_tx_error_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  get receive packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be read
+ */
+void nmu_get_eth_tx_error_pkt_cnt(kal_uint8 eth_id, nmu_stat_t* value);
+
+
+/*
+ *  @brief  set receive packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be written
+ */
+void nmu_set_eth_rx_error_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  add receive packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be added
+ */
+void nmu_add_eth_rx_error_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  get receive packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be read
+ */
+void nmu_get_eth_rx_error_pkt_cnt(kal_uint8 eth_id, nmu_stat_t* value);
+
+/*
+ *  @brief  set transmit dropped packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be written
+ */
+void nmu_set_eth_tx_drop_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  add transmit dropped packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be added
+ */
+void nmu_add_eth_tx_drop_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  get transmit dropped packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be read
+ */
+void nmu_get_eth_tx_drop_pkt_cnt(kal_uint8 eth_id, nmu_stat_t* value);
+
+
+/*
+ *  @brief  set receive dropped packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be written
+ */
+void nmu_set_eth_rx_drop_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  add receive dropped packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be added
+ */
+void nmu_add_eth_rx_drop_pkt_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  get receive dropped packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be read
+ */
+void nmu_get_eth_rx_drop_pkt_cnt(kal_uint8 eth_id, nmu_stat_t* value);
+
+
+/*
+ *  @brief  set receive dropped packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be written
+ */
+void nmu_set_eth_rx_frame_align_error_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  add receive dropped packet counts of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be added
+ */
+void nmu_add_eth_rx_frame_align_error_cnt(kal_uint8 eth_id, nmu_stat_t value);
+
+
+/*
+ *  @brief  get receive packet bytes of ethernet interface
+ *  @param  eth_id ethernet interface id
+ *  @param  value value to be read
+ */
+void nmu_get_eth_rx_frame_align_error_cnt(kal_uint8 eth_id, nmu_stat_t* value);
+
+
+/*
+ *  @brief  set ipv4 instance IPv4 up
+ *  @param  ip_id ip instance id
+ */
+void nmu_set_ip4_up(kal_uint8 ip_id);
+
+
+/*
+ *  @brief  set ip instance IPv4 down
+ *  @param  ip_id ip instance id
+ */
+void nmu_set_ip4_down(kal_uint8 ip_id);
+
+
+/*
+ *  @brief  check ip instance IPv4 is up or not
+ *  @param  ip_id ip instance id
+ *  @return KAL_TRUE if IPv4 is up, KAL_FALSE if not
+ */
+kal_bool nmu_check_ip4_up(kal_uint8 ip_id);
+
+
+/*
+ *  @brief  set IPv4 address of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  ip_address IPv4 address to be written
+ */
+void nmu_set_ip4_ip(kal_uint8 ip_id, void* ip_address);
+
+
+/*
+ *  @brief  get IPv4 address of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  ip_address IPv4 address to be read
+ */
+void nmu_get_ip4_ip(kal_uint8 ip_id, void* ip_address);
+
+
+/*
+ *  @brief  set IPv4 netmask of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  mask IPv4 netmask to be written
+ */
+void nmu_set_ip4_mask(kal_uint8 ip_id, void* mask);
+
+
+/*
+ *  @brief  set IPv4 netmask of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  mask IPv4 netmask to be written
+ */
+void nmu_get_ip4_mask(kal_uint8 ip_id, void* mask);
+
+
+/*
+ *  @brief  set IPv4 gateway address of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  gateway IPv4 address to be written
+ */
+void nmu_set_ip4_gateway(kal_uint8 ip_id, void* gateway);
+
+
+/*
+ *  @brief  get IPv4 gateway address of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  gateway IPv4 address to be read
+ */
+void nmu_get_ip4_gateway(kal_uint8 ip_id, void* gateway);
+
+
+/*
+ *  @brief  set IPv4 mtu size of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  mtu_size mtu size to be written
+ */
+void nmu_set_ip4_mtu_size(kal_uint8 ip_id, kal_uint16 mtu_size);
+
+
+/*
+ *  @brief  get IPv4 mtu size of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  mtu_size mtu size to be read
+ */
+void nmu_get_ip4_mtu_size(kal_uint8 ip_id, kal_uint16* mtu_size);
+
+
+/*
+ *  @brief  set total number of IPv4 DNS servers of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  dns_num total number to be written
+ */
+void nmu_set_ip4_dns_num(kal_uint8 ip_id, kal_uint8 dns_num);
+
+
+/*
+ *  @brief  get total number of IPv4 DNS servers of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  dns_num total number to be read
+ */
+void nmu_get_ip4_dns_num(kal_uint8 ip_id, kal_uint8* dns_num);
+
+
+/*
+ *  @brief  set DNS server IPv4 address of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  dns_id dns server no
+ *  @param  dns IPv4 address to be written
+ */
+void nmu_set_ip4_dns(kal_uint8 ip_id, kal_uint8 dns_id, void* dns);
+
+
+/*
+ *  @brief  get DNS server IPv4 address of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  dns_id dns server no
+ *  @param  dns IPv4 address to be read
+ */
+void nmu_get_ip4_dns(kal_uint8 ip_id, kal_uint8 dns_id, void* dns);
+
+
+/*
+ *  @brief  set ip instance IPv6 up
+ *  @param  ip_id ip instance id
+ */
+void nmu_set_ip6_up(kal_uint8 ip_id);
+
+
+/*
+ *  @brief  set ip instance IPv6 down
+ *  @param  ip_id ip instance id
+ */
+void nmu_set_ip6_down(kal_uint8 ip_id);
+
+
+/*
+ *  @brief  check ip instance IPv6 is up or not
+ *  @param  ip_id ip instance id
+ *  @return KAL_TRUE if IPv6 is up, KAL_FALSE if not
+ */
+kal_bool nmu_check_ip6_up(kal_uint8 ip_id);
+
+
+/*
+ *  @brief  set IPv6 mtu size of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  mtu_size mtu size to be written
+ */
+void nmu_set_ip6_mtu_size(kal_uint8 ip_id, kal_uint32 mtu_size);
+
+
+/*
+ *  @brief  get IPv6 mtu size of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  mtu_size mtu size to be read
+ */
+void nmu_get_ip6_mtu_size(kal_uint8 ip_id, kal_uint32* mtu_size);
+
+
+/*
+ *  @brief  set IPv6 prefix length of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  prefix_len prefix length to be written
+ */
+void nmu_set_ip6_prefix_len(kal_uint8 ip_id, kal_uint8 prefix_len);
+
+
+/*
+ *  @brief  get IPv6 prefix length of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  prefix_len prefix length to be read
+ */
+void nmu_get_ip6_prefix_len(kal_uint8 ip_id, kal_uint8* prefix_len);
+
+
+/*
+ *  @brief  set IPv6 prefix of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  prefix_len prefix to be written
+ */
+void nmu_set_ip6_prefix(kal_uint8 ip_id, void* prefix);
+
+
+/*
+ *  @brief  get IPv6 prefix of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  prefix_len prefix to be read
+ */
+void nmu_get_ip6_prefix(kal_uint8 ip_id, void* prefix);
+
+
+/*
+ *  @brief  set IPv6 interface identifier length of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  iid_len interface identifier length to be written
+ */
+void nmu_set_ip6_iid_len(kal_uint8 ip_id, kal_uint8 iid_len);
+
+
+/*
+ *  @brief  get IPv6 interface identifier length of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  iid_len interface identifier length to be read
+ */
+void nmu_get_ip6_iid_len(kal_uint8 ip_id, kal_uint8* iid_len);
+
+
+/*
+ *  @brief  set IPv6 interface identifier of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  iid_len interface identifier to be written
+ */
+void nmu_set_ip6_iid(kal_uint8 ip_id, void* iid);
+
+
+/*
+ *  @brief  get IPv6 interface identifier of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  iid_len interface identifier to be read
+ */
+void nmu_get_ip6_iid(kal_uint8 ip_id, void* iid);
+
+
+/*
+ *  @brief  set total number of IPv6 DNS servers of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  dns_num total number to be written
+ */
+void nmu_set_ip6_dns_num(kal_uint8 ip_id, kal_uint8 dns_num);
+
+
+/*
+ *  @brief  get total number of IPv6 DNS servers of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  dns_num total number to be read
+ */
+void nmu_get_ip6_dns_num(kal_uint8 ip_id, kal_uint8* dns_num);
+
+
+/*
+ *  @brief  set DNS server IPv6 address of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  dns_id dns server no
+ *  @param  dns IPv6 address to be written
+ */
+void nmu_set_ip6_dns(kal_uint8 ip_id, kal_uint8 dns_id, void* dns);
+
+
+/*
+ *  @brief  get DNS server IPv6 address of ip instance
+ *  @param  ip_id ip instance id
+ *  @param  dns_id dns server no
+ *  @param  dns IPv6 address to be read
+ */
+void nmu_get_ip6_dns(kal_uint8 ip_id, kal_uint8 dns_id, void* dns);
+
+
+/*
+ *  @brief  set fake netmask and gateway through real ip address
+ *  @param  ip_id ip instance id
+ *  @param  ip_address IPv4 address used to calculated fake netmask and gateway
+ */
+void nmu_set_ip4_fake_mask_and_gateway(kal_uint8 ip_id, void *ip_address);
+
+
+#endif  // _NMU_UTIL_H
+
diff --git a/mcu/interface/middleware/hif/pfm_api.h b/mcu/interface/middleware/hif/pfm_api.h
new file mode 100644
index 0000000..f0d2144
--- /dev/null
+++ b/mcu/interface/middleware/hif/pfm_api.h
@@ -0,0 +1,119 @@
+/*****************************************************************************
+*  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) 2014
+*
+*  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:
+ * ---------
+ *   pfm_api.h
+ *
+ * Project:
+ * --------
+ *   MOLY
+ *
+ * Description:
+ * ------------
+ *   Packet Filter Manager public structure and interface definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __INC_PFM_API_H
+#define __INC_PFM_API_H
+
+#include "pfm_struct.h"
+
+/*------------------------------------------------------------------------------
+ * Public fucntions.
+ *----------------------------------------------------------------------------*/
+
+/*!
+ * Handle ILM message.
+ *
+ * @param   ilm [IN]  ILM data structure
+ */
+void pfm_on_ilm(ilm_struct *ilm);
+
+/*!
+ * Packet Filter Manager init function.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool pfm_init(void);
+
+/*!
+ * Packet Filter Manager reset function.
+ *
+ * @return  KAL_TRUE if succeeded, KAL_FALSE otherwise.
+ */
+kal_bool pfm_reset(void);
+
+/*!
+ * @brief pfm_reg_cbk_wake_type_pkt
+ * Register callback for MBIM WAKE REASON wake type pkt
+ *
+ * @param [IN]pf_wake_type_pkt
+ *        [IN]priv_data
+ */
+void pfm_reg_cbk_wake_type_pkt(pfm_garbage_str_wake_type_pkt_f pf_wake_type_pkt, void* priv_data);
+
+/*!
+ * @brief pfm_dereg_cbk_wake_type_pkt
+ * De-register callback for MBIM WAKE REASON wake type pkt
+ *
+ */
+void pfm_dereg_cbk_wake_type_pkt();
+
+#endif /* __INC_PFM_API_H */
diff --git a/mcu/interface/middleware/hif/pfm_config.h b/mcu/interface/middleware/hif/pfm_config.h
new file mode 100644
index 0000000..f282fff
--- /dev/null
+++ b/mcu/interface/middleware/hif/pfm_config.h
@@ -0,0 +1,107 @@
+/*****************************************************************************
+*  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) 2014
+*
+*  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:
+ * ---------
+ *   pfm_config.h
+ *
+ * Project:
+ * --------
+ *   MOLY
+ *
+ * Description:
+ * ------------
+ *   This file provides the filter set index for different features.
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+/* PFM_FILTER_SET_PREFIX(prefix)            Filter Set ID */
+PFM_FILTER_SET_FEATURE_NAME(GARBAGE_FILTER)  /* 0 */
+PFM_FILTER_SET_PREFIX(garbage_filter)        /* 0 */
+PFM_FILTER_SET_FEATURE_NAME(FIN_ACK_FILTER)  /* 1 */
+PFM_FILTER_SET_PREFIX(fin_ack_filter)        /* 1 */
+PFM_FILTER_SET_FEATURE_NAME(UDP_IGMP_FILTER) /* 2 */
+PFM_FILTER_SET_PREFIX(udp_igmp_filter)       /* 2 */
+PFM_FILTER_SET_FEATURE_NAME(GARBAGE_STR_FILTER) /* 3 */
+PFM_FILTER_SET_PREFIX(garbage_str_filter)       /* 3 */
+PFM_FILTER_SET_FEATURE_NAME(ICMP_PING_FILTER) /* 4 */
+PFM_FILTER_SET_PREFIX(icmp_ping_filter)       /* 4 */
+PFM_FILTER_SET_FEATURE_NAME(UL_DISABLE_ALL_PACKETS_FILTER) /* 5 */
+PFM_FILTER_SET_PREFIX(ul_disable_all_packets_filter)       /* 5 */
+PFM_FILTER_SET_FEATURE_NAME(UL_ICMP_PING_WHITELIST_FILTER) /* 6 */
+PFM_FILTER_SET_PREFIX(ul_icmp_ping_whitelist_filter)       /* 6 */
diff --git a/mcu/interface/middleware/hif/pfm_enums.h b/mcu/interface/middleware/hif/pfm_enums.h
new file mode 100644
index 0000000..4d0652b
--- /dev/null
+++ b/mcu/interface/middleware/hif/pfm_enums.h
@@ -0,0 +1,77 @@
+/*****************************************************************************
+*  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) 2014
+*
+*  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:
+ * ---------
+ *   pfm_enums.h
+ *
+ * Project:
+ * --------
+ *   MOLY
+ *
+ * Description:
+ * ------------
+ *   Packet Filter Manager public enumeration definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __INC_PFM_ENUMS_H
+#define __INC_PFM_ENUMS_H
+
+typedef enum _pfm_filter_set_id_e {
+    #undef PFM_FILTER_SET_FEATURE_NAME
+    #undef PFM_FILTER_SET_PREFIX
+    #define PFM_FILTER_SET_FEATURE_NAME(_name) PFM_ ## _name ## _SET_ID,
+    #define PFM_FILTER_SET_PREFIX(_prefix) 
+    #include "pfm_config.h"
+
+    NUM_OF_PFM_FILTER_SET_ID,
+} pfm_filter_set_id_e;
+
+#endif /* __INC_PFM_ENUMS_H */
diff --git a/mcu/interface/middleware/hif/pfm_struct.h b/mcu/interface/middleware/hif/pfm_struct.h
new file mode 100644
index 0000000..546b1ec
--- /dev/null
+++ b/mcu/interface/middleware/hif/pfm_struct.h
@@ -0,0 +1,135 @@
+/*****************************************************************************
+*  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) 2014
+*
+*  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:
+ * ---------
+ *   pfm_struct.h
+ *
+ * Project:
+ * --------
+ *   MOLY
+ *
+ * Description:
+ * ------------
+ *   Packet Filter Manager ILM structure and interface definition.
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_PFM_STRUCT_H
+#define __INC_PFM_STRUCT_H
+
+#include "hif_ior.h"
+
+/*
+ * Callback function to process the IP datagram filtered.
+ *
+ * @param   packet [IN] Packet buffer.
+ * @param   packet_len [IN] Packet len.
+ * @param   pfm_filter_id [IN] PFM Filter id of matched packet.
+ * @param   priv_data [IN] optional data.
+ */
+typedef void (*pfm_garbage_str_wake_type_pkt_f)(const kal_uint8 *packet,
+                                                kal_int32 packet_len,
+                                                kal_int32 pfm_filter_id,
+                                                void* priv_data);
+
+/*
+ * Local parameter structure for MSG_ID_PFM_REGISTER_FILTER_REQ & MSG_ID_PFM_DEREGISTER_FILTER_REQ
+ */
+typedef struct _pfm_filter_set_t {
+    LOCAL_PARA_HDR
+
+    kal_uint32  filter_set_id;
+    kal_int32   filter_cnt;
+    kal_uint32  uplink;
+} pfm_filter_set_t;
+
+#define PFM_STR_FILTER_MAX_SIZE     192
+#define PFM_STR_FILTER_MAX_NUM      16
+
+typedef struct _pfm_str_filter_t {
+    kal_int32   filter_id;
+    kal_uint32  netif_id;
+    kal_uint16  filter_len;
+    kal_uint16  mask_len;
+    kal_uint8   filter[PFM_STR_FILTER_MAX_SIZE];
+    kal_uint8   mask[PFM_STR_FILTER_MAX_SIZE];
+    kal_uint32  magic_code;
+} pfm_str_filter_t;
+
+typedef struct _pfm_pcie_state_change_ind_t {
+    LOCAL_PARA_HDR
+    kal_uint32  is_suspend;
+} pfm_pcie_state_change_ind_struct;
+
+/*------------------------------------------------------------------------------
+ * DHL logging structure
+ *----------------------------------------------------------------------------*/
+typedef pfm_filter_set_t pfm_register_filter_req_struct;
+typedef pfm_filter_set_t pfm_deregister_filter_req_struct;
+
+#endif /* __INC_PFM_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/sys_test.h b/mcu/interface/middleware/hif/sys_test.h
new file mode 100644
index 0000000..0d6a560
--- /dev/null
+++ b/mcu/interface/middleware/hif/sys_test.h
@@ -0,0 +1,89 @@
+/*!
+ *  @file sys_test.h
+ *  @author TJ Chang <tj.chang@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  
+ */
+#ifndef _SYS_TEST_H
+#define _SYS_TEST_H
+
+#include "kal_general_types.h"
+
+
+// ==========================================================
+// Data Structure Definition
+// ==========================================================
+/*!
+ *  struct _ST_TCASE_T
+ *  
+ *  @brief register information of a test module.
+ *
+ *  @param  p_param           the parameter of test function.
+ *  @param  p_ret_err_str     returned string of error description.
+ *                            This string buffer is allocated by caller (sys_test) module,
+ *                            and the callee module fills in error description in this buffer.
+ *                   
+ *  @param  p_ret_err_str_sz  The caller (sys_test) module use this parameter to define the max size of error string buffer,
+ *                            and the callee module fills in the actual size of error string buffer when returning.
+ *                            Note: The callee module CAN NOT fill into 'p_ret_err_str' with exceeding size limit.
+ */
+typedef kal_bool (*st_fn)(void *p_param, kal_char *p_ret_err_str, kal_uint32 *p_ret_err_str_sz);
+typedef struct _ST_TCASE_T {
+    kal_char    *test_func_name; /* string description of test function */ 
+    st_fn       test_func; /* entry point of test function */
+    void        *test_param; /* parameter of test function */
+} ST_TCASE_T;
+
+
+// ==========================================================
+// SYS_TEST API
+// ==========================================================
+/*!
+ *  st_reg_test
+ *  
+ *  @brief register test function to SYS_TEST module.
+ *
+ *  @param  p_mod_name        test module naming.
+ *  @param  p_tcase           test function information used to register.
+ *  @param  tcase_num         number of test function struct.
+ *
+ *  @return kal_bool          KAL_TRUE if success, otherwise KAL_FALSE if fail.
+ */
+kal_bool st_reg_test(kal_char *p_mod_name, ST_TCASE_T *p_tcase, kal_uint32 tcase_num);
+
+
+#endif  /* _SYS_TEST_H */
+
diff --git a/mcu/interface/middleware/hif/tmc_api.h b/mcu/interface/middleware/hif/tmc_api.h
new file mode 100644
index 0000000..35a903b
--- /dev/null
+++ b/mcu/interface/middleware/hif/tmc_api.h
@@ -0,0 +1,95 @@
+/*****************************************************************************
+*  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) 2019
+*
+*  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:
+ * ---------
+ *   tmc_api.h
+ *
+ * Project:
+ * --------
+ *   VMOLY
+ *
+ * Description:
+ * ------------
+ *   Thermal Management Controller public application interface.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __INC_TMC_API_H__
+#define __INC_TMC_API_H__
+
+/**
+ * Registered module ID to TMC
+ *
+ * @param module_id  TMC will send thermal session notification to the mod_id.
+ *
+ * @return KAL_TRUE if successful, KAL_FALSE otherwise.
+ *
+ */
+kal_bool tmc_reg_mod_id(module_type module_id);
+
+/**
+ * Deregistered module ID to TMC
+ *
+ * @param module_id  TMC will stop send thermal notification to the mod_id.
+ *
+ * @return KAL_TRUE if successful, KAL_FALSE otherwise.
+ *
+ */
+kal_bool tmc_dereg_mod_id(module_type module_id);
+
+#endif /* __INC_TMC_API_H__ */
diff --git a/mcu/interface/middleware/hif/tmc_enums.h b/mcu/interface/middleware/hif/tmc_enums.h
new file mode 100644
index 0000000..00f2e61
--- /dev/null
+++ b/mcu/interface/middleware/hif/tmc_enums.h
@@ -0,0 +1,71 @@
+/*****************************************************************************
+*  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) 2015
+*
+*  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:
+ * ---------
+ *   tmc_enums.h
+ *
+ * Project:
+ * --------
+ *   UMOLY
+ *
+ * Description:
+ * ------------
+ *   Thermal Management Controller public enumeration definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __INC_TMC_ENUMS_H
+#define __INC_TMC_ENUMS_H
+
+#endif /* __INC_TMC_ENUMS_H */
diff --git a/mcu/interface/middleware/hif/tmc_l1_struct.h b/mcu/interface/middleware/hif/tmc_l1_struct.h
new file mode 100644
index 0000000..5bbd257
--- /dev/null
+++ b/mcu/interface/middleware/hif/tmc_l1_struct.h
@@ -0,0 +1,63 @@
+/*****************************************************************************
+*  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) 2019
+*
+*  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).
+*
+*****************************************************************************/
+
+#ifndef TMC_L1_STRUCT_H
+#define TMC_L1_STRUCT_H
+
+#include "kal_general_types.h"
+#include "kal_public_defs.h"
+
+#define NR_MAX_TX_PWR_REQ_ANT_NUM 16
+
+/* reference structure el1_lte_max_tx_pwr_red_req_struct */
+typedef struct
+{
+    LOCAL_PARA_HDR
+    /*
+     *  op 1: for all band, op 3,5: only for band, op 4: reset, n = 1
+     *  op 9: for all band (2 antennas), op 10: one band (2 antennas), n = 2
+     *  op 11: for all band (n antennas), op 12: one band (n antennas), 1 < n <= NR_MAX_TX_PWR_REQ_ANT_NUM
+     */
+    kal_uint8   op;
+    kal_uint16  band;  /*< Band in integer format (1 - 255) */
+
+    kal_uint8   para1; /*< 0~255, unit: 1/8 dB, (0~32 dB) */
+    kal_uint8   para2; /*< reserved */
+    kal_uint8   para3; /*< reserved */
+    kal_uint8   n;     /*< 1~NR_MAX_TX_PWR_REQ_ANT_NUM, number of valid parameters in param[] */
+    kal_uint8   param[NR_MAX_TX_PWR_REQ_ANT_NUM]; /*< 0~255, unit: 1/8 dB, (0~32 dB) */
+} nl1_nr_max_tx_pwr_red_req_struct;
+
+#endif /* TMC_L1_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/tmc_l5_struct.h b/mcu/interface/middleware/hif/tmc_l5_struct.h
new file mode 100644
index 0000000..df00efc
--- /dev/null
+++ b/mcu/interface/middleware/hif/tmc_l5_struct.h
@@ -0,0 +1,128 @@
+/*****************************************************************************
+*  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) 2015
+*
+*  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:
+ * ---------
+ *   tmc_l5_struct.h
+ *
+ * Project:
+ * --------
+ *   VMOLY
+ *
+ * Description:
+ * ------------
+ *   Thermal Management Controller ILM structure and interface definition.
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_TMC_L5_STRUCT_H
+#define __INC_TMC_L5_STRUCT_H
+
+#include "kal_public_defs.h"
+#include "tmc_struct.h"
+
+/* Macro & Enum definition */
+#define TMC_ACTUATOR_NAME_LEN           40
+#define TMC_ACTUATOR_UL_THROTTLE        "UL Throttle\0"
+#define TMC_ACTUATOR_REDUCE_TX_POWER    "3G4G PA\0"
+#define TMC_ACTUATOR_REDUCE_NR_TX_POWER "NR PA\0"
+#define TMC_ACTUATOR_CC_CONTROL         "CC Control\0"
+#define TMC_ACTUATOR_SW_SHUTDOWN        "SW Shutdown\0"
+#define TMC_ACTUATOR_FLIGHT_MODE        "Flight Mode\0"
+
+typedef struct l5io_tmc_actuator_num_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 status_id;
+} l5io_tmc_actuator_num_req_struct;
+
+typedef struct l5io_tmc_actuator_num_cnf_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 status_id;
+    kal_uint32 actuator_num;
+    tmc_req_result_enum result;
+} l5io_tmc_actuator_num_cnf_struct;
+
+typedef struct l5io_tmc_actuator_state_query_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 status_id;
+    kal_uint32 actuator_id;
+} l5io_tmc_actuator_state_query_req_struct;
+
+typedef struct l5io_tmc_actuator_state_query_cnf_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 status_id;
+    kal_uint32 actuator_id;
+    kal_char   actuator_name[TMC_ACTUATOR_NAME_LEN];
+    kal_uint32 zone_id;
+    kal_uint32 max_lv;
+    kal_uint32 current_lv;
+    kal_uint32 user_impact;
+    kal_uint32 efficiency;
+    tmc_req_result_enum result;
+} l5io_tmc_actuator_state_query_cnf_struct;
+
+typedef tmc_ctrl_req_struct l5io_tmc_actuator_set_req_struct;
+typedef tmc_ctrl_rsp_struct l5io_tmc_actuator_set_cnf_struct;
+
+#endif /* __INC_TMC_L5_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/tmc_nrrc_struct.h b/mcu/interface/middleware/hif/tmc_nrrc_struct.h
new file mode 100644
index 0000000..118bef5
--- /dev/null
+++ b/mcu/interface/middleware/hif/tmc_nrrc_struct.h
@@ -0,0 +1,135 @@
+/*****************************************************************************
+*  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) 2019
+*
+*  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).
+*
+*****************************************************************************/
+
+#ifndef TMC_NRRC_STRUCT_H
+#define TMC_NRRC_STRUCT_H
+
+#include "kal_general_types.h"
+#include "kal_public_defs.h"
+
+/********************************************
+ *                  MACROS                  *
+ ********************************************/
+
+
+/********************************************
+ *         TYPE DEFINITIONS & ENUMS         *
+ ********************************************/
+
+/**
+ * Enumeration identifies maximum number of downlink MIMO layers values.
+ */
+typedef enum
+{
+    NRRC_MAX_MIMO_LAYERS_DL2       = 0,
+    NRRC_MAX_MIMO_LAYERS_DL4       = 1,
+    NRRC_MAX_MIMO_LAYERS_DL8       = 2
+} nrrc_max_mimo_layers_dl_enum;
+
+/**
+ * Enumeration identifies maximum number of uplink MIMO layers values.
+ */
+typedef enum
+{
+    NRRC_MAX_MIMO_LAYERS_UL1       = 0,
+    NRRC_MAX_MIMO_LAYERS_UL2       = 1,
+    NRRC_MAX_MIMO_LAYERS_UL4       = 2
+} nrrc_max_mimo_layers_ul_enum;
+
+/* MSG_ID_TMC_NRRC_ASSISTANCE_INFO_SUPPORT_IND */
+typedef struct
+{
+    LOCAL_PARA_HDR
+
+    kal_bool                       is_supported;
+} tmc_nrrc_assistance_info_support_ind_struct;
+
+/* MSG_ID_TMC_NRRC_ASSISTANCE_INFO_SEND_REQ */
+typedef struct
+{
+    LOCAL_PARA_HDR
+
+    kal_bool                       is_scells_reduction_preferred;
+    kal_uint8                      max_scells_dl;
+    kal_uint8                      max_scells_ul;
+
+    kal_bool                       is_aggregated_bw_fr1_reduction_preferred;
+    kal_uint16                     max_aggregated_bw_fr1_dl;
+    kal_uint16                     max_aggregated_bw_fr1_ul;
+
+    kal_bool                       is_aggregated_bw_fr2_reduction_preferred;
+    kal_uint16                     max_aggregated_bw_fr2_dl;
+    kal_uint16                     max_aggregated_bw_fr2_ul;
+
+    kal_bool                       is_mimo_layers_fr1_reduction_preferred;
+    nrrc_max_mimo_layers_dl_enum   max_mimo_layers_bw_fr1_dl;
+    nrrc_max_mimo_layers_ul_enum   max_mimo_layers_bw_fr1_ul;
+
+    kal_bool                       is_mimo_layers_fr2_reduction_preferred;
+    nrrc_max_mimo_layers_dl_enum   max_mimo_layers_bw_fr2_dl;
+    nrrc_max_mimo_layers_ul_enum   max_mimo_layers_bw_fr2_ul;
+} tmc_nrrc_assistance_info_send_req_struct;
+
+/* MSG_ID_TMC_NRRC_ASSISTANCE_INFO_SEND_CNF */
+typedef struct
+{
+    LOCAL_PARA_HDR
+
+    kal_bool                       success;
+} tmc_nrrc_assistance_info_send_cnf_struct;
+
+/* MSG_ID_TMC_NRRC_ASSISTANCE_INFO_SENDING_ALLOWED_IND */
+typedef struct
+{
+    LOCAL_PARA_HDR
+} tmc_nrrc_assistance_info_sending_allowed_ind_struct;
+
+/* MSG_ID_NRRC_TMC_NO_OVERHEATING_IND */
+typedef struct
+{
+    LOCAL_PARA_HDR
+} nrrc_tmc_no_overheating_ind_struct;
+
+/********************************************
+ *                VARIABLES                 *
+ ********************************************/
+
+
+/********************************************
+ *           FUNCTION DECLARATIONS          *
+ ********************************************/
+
+
+#endif /* TMC_NRRC_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/tmc_struct.h b/mcu/interface/middleware/hif/tmc_struct.h
new file mode 100644
index 0000000..c7cbaed
--- /dev/null
+++ b/mcu/interface/middleware/hif/tmc_struct.h
@@ -0,0 +1,504 @@
+/*****************************************************************************
+*  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) 2015
+*
+*  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:
+ * ---------
+ *   tmc_struct.h
+ *
+ * Project:
+ * --------
+ *   UMOLY
+ *
+ * Description:
+ * ------------
+ *   Thermal Management Controller ILM structure and interface definition.
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __INC_TMC_STRUCT_H
+#define __INC_TMC_STRUCT_H
+
+#include "kal_public_defs.h"
+
+/* Macro & Enum definition for Gen97 */
+#define MAX_SUPPORTED_CC_NB  5
+#define MAX_BAND_NB          MAX_SUPPORTED_CC_NB /* max. supported band number at same time should be algin max supported CC number */
+#define MAX_CELL_NB          8
+#define TMC_CTRL_MAX_CG_NUM  2
+
+/* Define invalid value */
+#define INVALID_SUPPORTED_CC_INDEX  MAX_SUPPORTED_CC_NB
+#define INVALID_CELL_INDEX          0xFF
+#define INVALID_BAND_INDEX          0
+#define TMC_INVALID_NW_STATUS_ID    0xFF
+
+typedef enum tmc_ctrl_cg_enum {
+    TMC_CTRL_CG_NA,     /* none */
+    TMC_CTRL_CG_MCG,    /* refer as MCG */
+    TMC_CTRL_CG_SCG     /* refer as SCG */
+} tmc_ctrl_cg_enum;
+
+typedef enum tmc_ctrl_cmd_enum {
+    TMC_CTRL_CMD_THROTTLING = 0,
+    TMC_CTRL_CMD_CA_CTRL,
+    TMC_CTRL_CMD_PA_CTRL,
+    TMC_CTRL_CMD_COOLER_LV,
+    TMC_CTRL_CMD_CELL,            /* MD internal use : refer as del_cell */
+    TMC_CTRL_CMD_BAND,            /* MD internal use : refer as del_band */
+    TMC_CTRL_CMD_INTER_BAND_OFF,  /* MD internal use : similar to PA_OFF on Gen95 */
+    TMC_CTRL_CMD_CA_OFF,          /* MD internal use : similar to CA_OFF on Gen95 */
+    TMC_CTRL_CMD_SCG_OFF,         /* Fall back to 4G */
+    TMC_CTRL_CMD_SCG_ON,          /* Enabled 5G */
+    TMC_CTRL_CMD_TX_POWER,
+    TMC_CTRL_CMD_LOW_POWER_IND,
+    TMC_CTRL_CMD_SELF_CC_CTRL,
+    TMC_CTRL_CMD_DEFAULT
+} tmc_ctrl_cmd_enum;
+
+typedef enum tmc_ctrl_result_enum {
+    TMC_CTRL_RESULT_SUCCESS = 0,
+    TMC_CTRL_RESULT_STATUS_IND_ID_MISMATCH,
+    TMC_CTRL_RESULT_MAC_RESET_ONGOING,
+    TMC_CTRL_RESULT_FAIL_INCORRECT_CMD,
+    TMC_CTRL_RESULT_REJECT,
+    TMC_CTRL_RESULT_OTHERS
+} tmc_ctrl_result_enum;
+
+typedef enum tmc_ctrl_nw_status_enum {
+    TMC_CTRL_STATUS_SESSION_ESTABLISH = 0,
+    TMC_CTRL_STATUS_UPDATE,
+    TMC_CTRL_STATUS_SPCELL_CHANGE,
+    TMC_CTRL_STATUS_OTHERS
+} tmc_ctrl_nw_status_enum;
+
+typedef enum tmc_throt_ctrl_enum {
+    TMC_THROT_ENABLE_IMS_ENABLE = 0,
+    TMC_THROT_ENABLE_IMS_DISABLE,
+    TMC_THROT_DISABLE,
+} tmc_throt_ctrl_enum;
+
+typedef enum tmc_ca_ctrl_enum {
+    TMC_CA_ON = 0, /* leave thermal control */
+    TMC_CA_OFF,
+} tmc_ca_ctrl_enum;
+
+typedef enum tmc_pa_ctrl_enum {
+    TMC_PA_ALL_ON = 0, /* leave thermal control */
+    TMC_PA_OFF_1PA,
+} tmc_pa_ctrl_enum;
+
+typedef enum tmc_cc_ctrl_enum {
+    TMC_SELF_CC_CTRL_ENABLED = 0, /* step by step remove cc */
+    TMC_SELF_CC_CTRL_ENABLED_MCG_CA_OFF,
+    TMC_SELF_CC_CTRL_ENABLED_SCG_CA_OFF,
+    TMC_SELF_CC_CTRL_ENABLED_ALL_CA_OFF,
+    TMC_SELF_CC_CTRL_ENABLED_SCG_OFF,
+    TMC_SELF_CC_CTRL_ENABLED_MCG_CA_OFF_SCG_OFF,
+    TMC_SELF_CC_CTRL_ENABLED_LTE_ONLY,
+    TMC_SELF_CC_CTRL_DISABLED,
+} tmc_cc_ctrl_enum;
+
+typedef enum tmc_cooler_lv_ctrl_enum {
+    TMC_COOLER_LV_ENABLE = 0,
+    TMC_COOLER_LV_DISABLE,
+} tmc_cooler_lv_ctrl_enum;
+
+typedef enum tmc_cooler_lv_enum {
+    TMC_COOLER_LV0 = 0,
+    TMC_COOLER_LV1,
+    TMC_COOLER_LV2,
+    TMC_COOLER_LV3,
+    TMC_COOLER_LV4,
+    TMC_COOLER_LV5,
+    TMC_COOLER_LV6,
+    TMC_COOLER_LV7,
+    TMC_COOLER_LV8,
+    TMC_COOLER_MAX
+} tmc_cooler_lv_enum;
+
+typedef enum tmc_nw_stat_enum {
+    TMC_NW_STAT_MCG = 0,
+    TMC_NW_STAT_SCG,
+    TMC_NW_STAT_MAX_NUM
+} tmc_nw_stat_enum;
+
+typedef enum tmc_ctrl_nl1_frq_enum {
+    TMC_NR_FRE_FR1 = 0,
+    TMC_NR_FRE_FR2,
+    TMC_NR_FRE_MAX_NUM
+} tmc_ctrl_nl1_frq_enum;
+
+typedef enum tmc_tx_pwr_event_enum {
+    TMC_TW_PWR_VOLTAGE_LOW_EVENT = 0,
+    TMC_TW_PWR_LOW_BATTERY_EVENT,
+    TMC_TW_PWR_OVER_CURRENT_EVENT,
+    TMC_TW_PWR_REDUCE_OTHER_MAX_TX_EVENT, /* reserved for reduce 2G/3G/4G/C2K max TX power for certain value */
+    TMC_TW_PWR_REDUCE_NR_MAX_TX_EVENT,    /* reserved for reduce 5G max TX power for certain value */
+    TMC_TW_PWR_EVENT_MAX_NUM
+} tmc_lpower_event_enum;
+
+typedef enum tmc_tx_pwr_status_lv_enum {
+    TMC_TX_PWR_STATUS_LV0 = 0,
+    TMC_TX_PWR_STATUS_LV1,
+    TMC_TX_PWR_STATUS_LV2,
+    TMC_TX_PWR_STATUS_MAX
+} tmc_tx_pwr_status_lv_enum;
+
+typedef enum tmc_overheated_rat_enum {
+    TMC_OVERHEATED_LTE = 0,
+    TMC_OVERHEATED_NR,
+    TMC_OVERHEATED_NA,
+    TMC_OVERHEATED_MAX
+} tmc_overheated_rat_enum;
+
+typedef enum tmc_cooler_tbl_enum {
+    TMC_UL_THROTTLE_COOLER = 0,
+    TMC_OTHER_RAT_REDUCE_TX_COOLER,
+    TMC_NR_REDUCE_TX_COOLER,
+    TMC_CC_CONTROL_COOLER,
+    TMC_SW_SHUTDOWN_COOLER,
+    TMC_FLIHT_MODE_COOLER,
+    TMC_MAX_COOLER
+} tmc_cooler_tbl_enum;
+
+typedef enum tmc_ctrl_req_enum {
+    TMC_CTRL_REQ_SET_ACTUATOR = 0,
+    TMC_CTRL_REQ_SET_COOLER,
+    TMC_CTRL_REQ_MAX_NUM
+} tmc_ctrl_req_enum;
+
+typedef enum tmc_req_result_enum {
+    TMC_RESULT_SUCCESS,
+    TMC_RESULT_FAILED,
+    TMC_RESULT_UNSUPPORTED_LV,
+    TMC_RESULT_UNSUPPORTED_ACTUATOR_ID,
+    TMC_RESULT_L5_ACTION_SW_SHUTDOWN_ENABLED,
+    TMC_RESULT_L5_ACTION_SW_SHUTDOWN_DISABLED,
+    TMC_RESULT_L5_ACTION_FLIGHT_MODE_ENABLED,
+    TMC_RESULT_L5_ACTION_FLIGHT_MODE_DISABLED,
+    TMC_RESULT_MAX
+} tmc_req_result_enum;
+
+typedef enum tmc_ctrl_low_pwr_enum {
+    TMC_CTRL_LOW_POWER_LOW_BATTERY_EVENT = 0,  /* battery less than threshold (ex : 20%) */
+    TMC_CTRL_LOW_POWER_RECHARGE_BATTERY_EVENT, /* battery recharge over threshold (ex : 25%) */
+    TMC_CTRL_LOW_POWER_MAX
+} tmc_ctrl_low_pwr_enum;
+
+typedef enum tmc_req_reason_enum {
+    TMC_OVERHEATED_START = 0,
+    TMC_OVERHEATED_END,
+    TMC_LOW_POWER,
+    TMC_RECHARGE,
+    TMC_REQ_REASON_MAX
+} tmc_req_reason_enum;
+
+/* Structure definition */
+typedef struct tmc_ctrl_cell_rt_info_struct {
+    kal_uint32                      dl_throughput;
+    kal_uint32                      ul_throughput;
+    kal_uint8                       dl_bandwidth;
+    kal_uint8                       ul_bandwidth;
+} tmc_ctrl_cell_rt_info_struct;
+
+typedef struct tmc_ctrl_cell_info_struct {
+    kal_uint8                       cell_idx;
+    kal_bool                        is_specll;
+    kal_bool                        is_DLonly;
+} tmc_ctrl_cell_info_struct;
+
+typedef struct tmc_ctrl_band_info_struct {
+    kal_uint8                       band_id;
+    kal_uint8                       cell_info_idx[MAX_SUPPORTED_CC_NB];
+} tmc_ctrl_band_info_struct;
+
+typedef struct tmc_ctrl_cg_info_struct {
+    tmc_ctrl_cg_enum                cg_type;
+    kal_uint8                       band_num;
+    tmc_ctrl_band_info_struct       band[MAX_BAND_NB];
+    tmc_ctrl_cell_info_struct       cell[MAX_SUPPORTED_CC_NB];
+    tmc_ctrl_cell_rt_info_struct    cell_info[MAX_CELL_NB];
+} tmc_ctrl_cg_info_struct;
+
+typedef struct tmc_emac_nw_status_struct {
+    kal_uint8                       status_ind_id;
+    tmc_ctrl_nw_status_enum         status_cause;
+    tmc_ctrl_cg_info_struct         cell_group[TMC_CTRL_MAX_CG_NUM];
+    kal_uint8                       total_cell;
+    kal_uint8                       sim_idx;
+} tmc_emac_nw_status_struct;
+
+typedef struct tmc_emac_nw_status_ind_struct {
+    LOCAL_PARA_HDR
+    tmc_emac_nw_status_struct       nw_status;
+} tmc_emac_nw_status_ind_struct;
+
+typedef struct tmc_emac_thermal_control_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint8                       status_ind_id;
+    tmc_ctrl_cmd_enum               ctrl_cmd;
+    tmc_ctrl_cg_enum                cg_type;
+    kal_uint8                       band_num;
+    kal_uint8                       forbidden_band[MAX_BAND_NB];
+    kal_uint8                       cell_num;
+    kal_uint32                      forbidden_cell_bitmap;
+} tmc_emac_thermal_control_req_struct;
+
+typedef struct tmc_emac_thermal_control_cnf_struct {
+    LOCAL_PARA_HDR
+    tmc_ctrl_result_enum            result;
+    tmc_emac_nw_status_struct       nw_status;
+} tmc_emac_thermal_control_cnf_struct;
+
+typedef struct tmc_nmac_nw_status_struct{
+    kal_uint8                       status_ind_id;
+    tmc_ctrl_nw_status_enum         status_cause;
+    tmc_ctrl_cg_info_struct         cell_group[TMC_CTRL_MAX_CG_NUM];
+    kal_uint8                       total_cell;
+    kal_uint8                       sim_idx;
+}tmc_nmac_nw_status_struct;
+
+typedef struct tmc_nmac_nw_status_ind_struct{
+    LOCAL_PARA_HDR
+    tmc_nmac_nw_status_struct       nw_status;
+} tmc_nmac_nw_status_ind_struct;
+
+typedef struct tmc_nmac_thermal_control_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint8                       status_ind_id;
+    tmc_ctrl_cmd_enum               ctrl_cmd;
+    tmc_ctrl_cg_enum                cg_type;
+    kal_uint8                       band_num;
+    kal_uint8                       forbidden_band[MAX_BAND_NB];
+    kal_uint8                       cell_num;
+    kal_uint32                      forbidden_cell_bitmap;
+} tmc_nmac_thermal_control_req_struct;
+
+typedef struct tmc_nmac_thermal_control_cnf_struct {
+    LOCAL_PARA_HDR
+    tmc_ctrl_result_enum            result;
+    tmc_nmac_nw_status_struct       nw_status;
+} tmc_nmac_thermal_control_cnf_struct;
+
+typedef struct tmc_ctrl_config
+{
+    kal_uint8  ctrl_cmd;  /* tmc_ctrl_cmd_enum */
+    union {
+        struct tmc_throttling {
+            kal_uint8  thrott_ctrl; /* tmc_throt_ctrl_enum */
+            kal_uint8  active_period_100ms;
+            kal_uint8  suspend_period_100ms;
+        } tmc_throttling;
+
+        struct tmc_ca_ctrl {
+            kal_uint8  ca_ctrl;    /* tmc_ca_ctrl_enum */
+            kal_uint8  reserved1;
+            kal_uint8  reserved2;
+        } tmc_ca_ctrl;
+
+        struct tmc_pa_ctrl {
+            kal_uint8  pa_ctrl;    /* tmc_pa_ctrl_enum */
+            kal_uint8  reserved1;
+            kal_uint8  reserved2;
+        } tmc_pa_ctrl;
+
+        struct tmc_cooler_lv {
+            kal_uint8  enable;         /* tmc_cooler_lv_ctrl_enum */
+            kal_uint8  cooler_lv;      /* tmc_cooler_lv_enum */
+            kal_uint8  overheated_rat; /* tmc_overheated_rat_enum */
+        } tmc_cooler_lv;
+
+        struct tmc_tx_power {
+            kal_uint8  status;            /* tmc_tx_pwr_status_lv_enum */
+            kal_uint8  event;             /* tmc_tx_pwr_event_enum */
+            kal_uint8  reduce_max_tx_pwr; /* reserved for reduce max tx_pwer value (unit : 1/8 db) */
+        } tmc_tx_power;
+
+        struct tmc_cc_ctrl {
+            kal_uint8  cc_ctrl;         /* tmc_cc_ctrl_enum */
+            kal_uint8  overheated_rat;  /* tmc_overheated_rat_enum */
+            kal_uint8  reserved1;
+        } tmc_cc_ctrl;
+
+        struct tmc_low_power {
+            kal_uint8  event;	/* tmc_ctrl_low_pwr_enum */
+            kal_uint8  reserved1;
+            kal_uint8  reserved2;
+        } tmc_low_power;
+    } u;
+} tmc_ctrl_config;
+
+typedef struct tmc_nw_stat_struct {
+    module_type               mod_id;
+    tmc_emac_nw_status_struct nw_stat;
+} tmc_nw_stat_struct;
+
+typedef struct tmc_control_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 ap_req_cmd;
+} tmc_control_req_struct;
+
+typedef struct tmc_nl1_nw_status_ind_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 max_dl_bw[TMC_NR_FRE_MAX_NUM];
+    kal_uint32 max_dl_mimo_layer[TMC_NR_FRE_MAX_NUM];
+    kal_uint32 max_ul_bw[TMC_NR_FRE_MAX_NUM];
+    kal_uint32 max_ul_mimo_layer [TMC_NR_FRE_MAX_NUM];
+} tmc_nl1_nw_status_ind_struct;
+
+typedef struct tmc_lv_cfg {
+    kal_uint32 zone_id;
+    kal_uint32 user_impact;
+    kal_uint32 efficiency;
+    kal_uint32 value1;
+    kal_uint32 value2;
+} tmc_lv_cfg;
+
+typedef struct tmc_lv_tbl {
+    tmc_lv_cfg lv_cfg[TMC_COOLER_MAX];
+} tmc_lv_tbl;
+
+typedef struct tmc_ctrl_req_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 status_id;
+    tmc_ctrl_req_enum ctrl_cmd;
+    union {
+        struct {
+            kal_uint32 actuator_id;
+            kal_uint32 lv;
+        } tmc_actuator_cfg;
+
+        struct {
+            tmc_ctrl_config tmc_ctrl_req;
+        } tmc_cooler_cfg;
+    } u;
+} tmc_ctrl_req_struct;
+
+typedef struct tmc_ctrl_rsp_struct {
+    LOCAL_PARA_HDR
+    kal_uint32 status_id;
+    tmc_req_result_enum result;
+} tmc_ctrl_rsp_struct;
+
+typedef struct tmc_l4bpwr_battery_status_req_struct {
+    LOCAL_PARA_HDR
+    kal_bool is_low_battery;
+} tmc_l4bpwr_battery_status_req_struct;
+
+/*
+ * Bitmap for tmc_emac_thermal_control_req enhance functions.
+ * Need to sync with WCT/SE3/PS2 YK.Liu before modification.
+ */
+#define TMC_ENHANCE_FUNC_DISABLE_CA             0x00000001
+#define TMC_ENHANCE_FUNC_TX_POWER_BACKOFF       0x00000002
+
+/*
+ * Local parameter structure for MSG_ID_TMC_EMAC_THERMAL_CONTROL_REQ for Gen93
+ */
+typedef struct
+{
+    LOCAL_PARA_HDR
+#if defined(__MD93__)
+    kal_bool     overheat_flg;    /* TMC notify mobile phone temperature is too high, need to cool down */
+    kal_uint8    enhance_func_bitmap;
+#else
+    tmc_ctrl_config tmc_ctrl_cfg;
+#endif
+} tmc_emac_thermal_control_req;
+
+/*------------------------------------------------------------------------------
+ * DHL logging structure
+ *----------------------------------------------------------------------------*/
+//typedef tmc_emac_thermal_control_req tmc_emac_thermal_control_req_struct;
+
+#endif /* __INC_TMC_STRUCT_H */
diff --git a/mcu/interface/middleware/hif/ufpm_em_struct.h b/mcu/interface/middleware/hif/ufpm_em_struct.h
new file mode 100644
index 0000000..6f2a4b5
--- /dev/null
+++ b/mcu/interface/middleware/hif/ufpm_em_struct.h
@@ -0,0 +1,72 @@
+/*!
+ *  @file ufpm_struct.h
+ *  @author Bo-Kai Huang <bo-kai.haung@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides main definitions of usbcore
+ */
+
+#ifndef _UFPM_EM_STRUCT_H
+#define _UFPM_EM_STRUCT_H
+
+#include "ufpm_struct.h"
+
+/**************************************
+ * UFPM ENUM and Types
+ **************************************/
+
+typedef ufpm_enable_md_func_req_t       ufpm_enable_md_fast_path_req_struct;
+typedef ufpm_md_fast_path_common_req_t  ufpm_disable_md_fast_path_req_struct;
+typedef ufpm_md_fast_path_common_req_t  ufpm_deactivate_md_fast_path_req_struct;
+typedef ufpm_activate_md_func_req_t     ufpm_activate_md_fast_path_req_struct;
+typedef ufpm_md_fast_path_common_rsp_t  ufpm_enable_md_fast_path_rsp_struct;
+typedef ufpm_md_fast_path_common_rsp_t  ufpm_disable_md_fast_path_rsp_struct;
+typedef ufpm_deactivate_md_func_rsp_t   ufpm_deactivate_md_fast_path_rsp_struct;
+typedef ufpm_md_fast_path_common_rsp_t  ufpm_activate_md_fast_path_rsp_struct;
+typedef ufpm_notify_md_bus_event_req_t  ufpm_notify_md_bus_event_req_struct;
+typedef ufpm_md_fast_path_common_rsp_t  ufpm_notify_md_bus_event_rsp_struct;
+typedef ufpm_send_md_ep0_msg_t          ufpm_send_md_usb_ep0_req_struct;
+typedef ufpm_send_ap_ep0_msg_t          ufpm_send_md_usb_ep0_rsp_struct;
+typedef ufpm_send_md_ep0_msg_t          ufpm_send_md_usb_ep0_ind_struct;
+typedef ufpm_send_ap_ep0_msg_t          ufpm_send_ap_usb_ep0_ind_struct;
+
+
+typedef struct _ufpm_em_dump_ctx_struct {
+    LOCAL_PARA_HDR
+    ufpm_t ufpm_task_ctx;
+} ufpm_em_dump_ctx_struct;
+
+#endif  // _UFPM_MAIN_H
+
diff --git a/mcu/interface/middleware/hif/ufpm_enum.h b/mcu/interface/middleware/hif/ufpm_enum.h
new file mode 100644
index 0000000..d32d3dd
--- /dev/null
+++ b/mcu/interface/middleware/hif/ufpm_enum.h
@@ -0,0 +1,84 @@
+/*!
+ *  @file ufpm_enum.h
+ *  @author Bo-Kai Huang <bo-kai.haung@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides main definitions of usbcore
+ */
+
+#ifndef _UFPM_ENUM_H
+#define _UFPM_ENUM_H
+
+#include "hif_mw_msgid.h"
+#include "kal_public_api.h"
+
+/**************************************
+ * UFPM ENUM and Types
+ **************************************/
+
+// UFPM state machine 
+typedef enum _ufpm_func_state {
+    UFPM_FUNC_SM_UNINIT    =   0,
+    UFPM_FUNC_SM_DEACTIVATE,
+    UFPM_FUNC_SM_ACTIVATE,
+} ufpm_func_state_e;
+
+typedef enum _ufpm_usb_state {
+    UFPM_USB_SM_RESET   =   0,
+    UFPM_USB_SM_CONFIG,
+} ufpm_usb_state_e;
+
+// UFPM function events
+typedef enum ufpm_usbclass_notify {
+    UFPM_USBCLASS_NOTIFY_NONEED =   0,
+    UFPM_USBCLASS_NOTIFY_TO_RESET,
+    UFPM_USBCLASS_NOTIFY_TO_DETACHED,
+    UFPM_USBCLASS_NOTIFY_TO_CONFIG,
+} ufpm_usbclass_notify_e;
+
+typedef enum _ufpm_func_mode {
+    UFPM_FUNC_MODE_TETHER   =   0,
+    UFPM_FUNC_MODE_LOG,
+    UFPM_FUNC_MODE_MAX_NUM,
+} ufpm_func_mode_e;
+
+typedef enum _ufpm_bus_state {
+    UFPM_BUS_STATE_SUSPEND  =   0,
+    UFPM_BUS_STATE_RESUME,
+    UFPM_BUS_STATE_RESET,
+} ufpm_bus_state_e;
+
+#endif  // _UFPM_ENUM_H
+
diff --git a/mcu/interface/middleware/hif/ufpm_if.h b/mcu/interface/middleware/hif/ufpm_if.h
new file mode 100644
index 0000000..e6db9b3
--- /dev/null
+++ b/mcu/interface/middleware/hif/ufpm_if.h
@@ -0,0 +1,47 @@
+/*!
+ *  @file ufpm_if.h
+ *  @author Bo-Kai Huang <bo-kai.haung@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides interface of nmu ( network management unit )
+ */
+
+#ifndef _UFPM_IF_H
+#define _UFPM_IF_H
+
+kal_bool ufpm_dhl_query_support();
+
+#endif  // _UFPM_IF_H
+
diff --git a/mcu/interface/middleware/hif/ufpm_struct.h b/mcu/interface/middleware/hif/ufpm_struct.h
new file mode 100644
index 0000000..59354eb
--- /dev/null
+++ b/mcu/interface/middleware/hif/ufpm_struct.h
@@ -0,0 +1,241 @@
+/*!
+ *  @file ufpm_struct.h
+ *  @author Bo-Kai Huang <bo-kai.haung@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides main definitions of usbcore
+ */
+
+#ifndef _UFPM_STRUCT_H
+#define _UFPM_STRUCT_H
+
+#include "hif_mw_msgid.h"
+#include "kal_public_api.h"
+#include "ufpm_enum.h"
+#include "ipc_msgsvc_msgid.h"
+#include "ccci_ipc_if.h"
+#include "mw_sap.h"
+#include "ufpm_usb_struct.h"
+
+#define UFPM_USB_MAP_MAX_SIZE 8
+
+/**************************************
+ * UFPM ENUM and Types
+ **************************************/
+typedef union _ufpm_func_activation_info {
+    tethering_activate_meta_info_t tethering_info;
+    logging_activate_meta_info_t logging_info;
+} ufpm_func_activation_info_t;
+
+typedef union _ufpm_func_deactivation_info {
+    tethering_deactivate_meta_info_t tethering_info;
+    logging_deactivate_meta_info_t logging_info;
+} ufpm_func_deactivation_info_t;
+
+typedef struct _ufpm_usb_property {
+    kal_bool isSupport;
+    ufpm_func_state_e state;
+    ufpm_usb_mapping_t mapTable[UFPM_USB_MAP_MAX_SIZE];
+    ufpm_func_activation_info_t activate_meta_info;
+    ufpm_func_deactivation_info_t deactivate_meta_info;
+} ufpm_usb_property_t;
+
+typedef struct _ufpm_mpu_info {
+    kal_uint8 apUsbDomain;                                      // AP USB MPU domain ID
+    kal_uint8 mdCldmaDomain;                                    // MD CLDMA MPU domain ID
+    kal_uint8 reserved[6];
+    kal_uint64 memBank0BaseAddr;                                // Memory bank0 base address
+    kal_uint64 memBank0Size;                                    // Memory bank0 size
+    kal_uint64 memBank4BaseAddr;                                // Memory bank4 base address
+    kal_uint64 memBank4Size;                                    // Memory bank4 size
+} ufpm_mpu_info_t;
+
+typedef struct _ufpm_md_fast_path_common_req {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 reserved[3];
+} ufpm_md_fast_path_common_req_t;
+
+typedef struct _ufpm_md_fast_path_common_rsp {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 result; // bool
+    kal_uint8 reserved[2];
+} ufpm_md_fast_path_common_rsp_t;
+
+typedef struct _ufpm_md_fast_path_common_ind {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 reserved[3];
+} ufpm_md_fast_path_common_ind_t;
+
+typedef struct _ufpm_notify_md_bus_event_req {
+    LOCAL_PARA_HDR
+    kal_uint8 state;
+    kal_uint8 reserved[3];
+} ufpm_notify_md_bus_event_req_t;
+
+typedef struct _ufpm_activate_md_func_req {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 address;                                          // USB address
+    kal_uint8 configuration;                                    // USB configuraton number
+    kal_uint8 speed;                                            // USB 2.0/3.0
+    ufpm_usb_mapping_t ap_usb_map[UFPM_USB_MAP_MAX_SIZE];       // AP released IF/EP
+    tethering_activate_meta_info_t tethering_meta_info;         // tethering meta data
+    logging_activate_meta_info_t logging_meta_info;             // logging meta data
+} ufpm_activate_md_func_req_t;
+
+typedef struct _ufpm_enable_md_func_req {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 version;
+    kal_uint8 reserved[2];
+    ufpm_mpu_info_t mpuInfo;
+} ufpm_enable_md_func_req_t;
+
+typedef struct _ufpm_send_md_ep0_msg {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 reserved[3];
+    kal_uint8 pBuffer[1024]; //hifusb_setup_packet_t packet;
+} ufpm_send_md_ep0_msg_t;
+
+typedef struct _ufpm_enable_md_func_rsp {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 result; // bool
+    kal_uint8 version;
+    kal_uint8 reserved;
+} ufpm_enable_md_func_rsp_t;
+
+typedef struct _ufpm_deactivate_md_func_rsp {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 result; // bool
+    kal_uint8 reserved[2];
+    tethering_deactivate_meta_info_t tethering_meta_info;
+    logging_deactivate_meta_info_t logging_meta_info;
+} ufpm_deactivate_md_func_rsp_t;
+
+typedef struct _ufpm_t {
+    // USB properties
+    ufpm_usb_property_t ufpm_usb_property[UFPM_FUNC_MODE_MAX_NUM];
+
+    // FSM for USB data path
+    ufpm_usb_state_e ufpm_usb_sm;
+
+    // USB bus state
+    ufpm_bus_state_e ufpm_bus_state;
+
+    // MPU information
+    ufpm_mpu_info_t ufpm_mpu_info;
+
+    // USB EP cache table for mapping speed-up. ufpm_ep_mapping_cache_tlb[0][i] for EP IN, ufpm_ep_mapping_cache_tlb[1][i] for EP OUT
+    kal_uint8 ufpm_ep_mapping_cache_tlb[2][UFPM_USB_MAP_MAX_SIZE];
+
+    // L4C MSG flag
+    kal_bool is_l4c_msg;
+
+    // L4C MSG source ID
+    kal_uint8 l4c_src_id;
+
+} ufpm_t;
+
+/**************************************
+ * L4C and UFPM Structure
+ **************************************/
+typedef struct _l4c_ufpm_activate_md_fast_path_req {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 src_id; // l4c source ID
+    kal_uint8 reserved[2];
+} l4c_ufpm_activate_md_fast_path_req_struct;
+
+typedef struct _l4c_ufpm_enable_md_fast_path_req {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 src_id; // l4c source ID
+    kal_uint8 reserved[2];
+} l4c_ufpm_enable_md_fast_path_req_struct;
+
+typedef struct _l4c_ufpm_deactivate_md_fast_path_req {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 src_id; // l4c source ID
+    kal_uint8 reserved[2];
+} l4c_ufpm_deactivate_md_fast_path_req_struct;
+
+typedef struct _l4c_ufpm_disable_md_fast_path_req {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 src_id; // l4c source ID
+    kal_uint8 reserved[2];
+} l4c_ufpm_disable_md_fast_path_req_struct;
+
+typedef struct _l4c_ufpm_deactivate_md_fast_path_cnf{
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 result; // bool
+    kal_uint8 src_id; // l4c source ID
+    kal_uint8 reserved[1];
+} l4c_ufpm_deactivate_md_fast_path_cnf_struct;
+
+typedef struct _l4c_ufpm_activate_md_fast_path_cnf{
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 result; // bool
+    kal_uint8 src_id; // l4c source ID
+    kal_uint8 reserved[1];
+} l4c_ufpm_activate_md_fast_path_cnf_struct;
+
+typedef struct _l4c_ufpm_disable_md_fast_path_cnf{
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 result; // bool
+    kal_uint8 src_id; // l4c source ID
+    kal_uint8 reserved[1];
+} l4c_ufpm_disable_md_fast_path_cnf_struct;
+
+typedef struct _l4c_ufpm_enable_md_fast_path_cnf{
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 result; // bool
+    kal_uint8 src_id; // l4c source ID
+    kal_uint8 reserved[1];
+} l4c_ufpm_enable_md_fast_path_cnf_struct;
+
+#endif  // _UFPM_STRUCT_H
+
diff --git a/mcu/interface/middleware/hif/ufpm_usb_struct.h b/mcu/interface/middleware/hif/ufpm_usb_struct.h
new file mode 100644
index 0000000..f0bf6e6
--- /dev/null
+++ b/mcu/interface/middleware/hif/ufpm_usb_struct.h
@@ -0,0 +1,124 @@
+/*!
+ *  @file ufpm_struct.h
+ *  @author Bo-Kai Huang <bo-kai.haung@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides main definitions of usbcore
+ */
+
+#ifndef _UFPM_USB_STRUCT_H
+#define _UFPM_USB_STRUCT_H
+
+#include "hif_mw_msgid.h"
+#include "kal_public_api.h"
+#include "ipc_msgsvc_msgid.h"
+#include "mw_sap.h"
+#include "ufpm_enum.h"
+
+/**************************************************
+ * Tehtering RNDIS Data Structure
+ **************************************************/
+typedef struct _tethering_net_stats_s {
+    kal_uint64 rx_packets;      // Total packets received
+    kal_uint64 tx_packets;      // Total packets transmitted
+    kal_uint64 rx_errors;       // Bad packets received
+    kal_uint64 tx_errors;       // Packet transmit problems
+    kal_uint64 rx_dropped;      // No space in Linux buffers
+    kal_uint64 tx_dropped;      // No space available in Linux
+    kal_uint64 rx_frame_errors; // Recv'd frame alignment error
+} tethering_net_stats_t;
+
+typedef struct _tethering_activate_meta_info {
+    kal_uint32 init_msg_max_transfer_size;
+    kal_uint32 init_cmplt_max_packets_per_transfer;
+    kal_uint32 init_cmplt_max_transfer_size;
+    kal_uint32 init_cmplt_packet_alignment_factor;
+    kal_uint8 host_mac_addr[6];
+    kal_uint8 reserved1[2];
+    kal_uint8 device_mac_addr[6];
+    kal_uint8 reserved2[2];
+    tethering_net_stats_t net_stats;
+} tethering_activate_meta_info_t;
+
+typedef struct _tethering_deactivate_meta_info_t {
+    tethering_net_stats_t net_stats;
+} tethering_deactivate_meta_info_t;
+
+/**************************************************
+ * Logging ACM Data Structure
+ **************************************************/
+
+typedef struct _logging_activate_meta_info {
+    kal_uint8 reserved1[8];  
+} logging_activate_meta_info_t;
+
+typedef struct _logging_deactivate_meta_info_t {
+    kal_uint8 reserved1[8];
+} logging_deactivate_meta_info_t;
+
+
+/***************************************************
+ * UFPM Function Common Data Structure
+ ***************************************************/
+#if 0 
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+
+#define EP0_MSG_DATA_BUF_SIZE  1024
+#define EP0_MSG_INTR_BUF_SIZE  64
+typedef struct _ufpm_send_ap_ep0_msg {
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_uint8 reserved[3];
+    kal_uint32 ep0_data_len;
+    kal_uint8 ep0Buffer[EP0_MSG_DATA_BUF_SIZE];
+    kal_uint32 int_data_len;
+    kal_uint8 intBuffer[EP0_MSG_INTR_BUF_SIZE];
+} ufpm_send_ap_ep0_msg_t;
+
+typedef struct _ufpm_usb_mapping {
+    kal_uint8 type;
+    kal_uint8 map;
+    kal_uint16 maxPktSize;  // Max packet size of the endpoint
+    kal_uint32 queue_config;    // QMU queue configuration for MD USB driver
+    kal_uint8 fifo_n;
+} ufpm_usb_mapping_t;
+
+#endif  // _UFPM_USB_H
+
diff --git a/mcu/interface/middleware/hif/usbc_custom.h b/mcu/interface/middleware/hif/usbc_custom.h
new file mode 100644
index 0000000..24e9291
--- /dev/null
+++ b/mcu/interface/middleware/hif/usbc_custom.h
@@ -0,0 +1,344 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *    usbc_custom.h
+ *
+ * Project:
+ * --------
+ *   MOLY
+ *
+ * Description:
+ * ------------
+ *    This file intends for usb customization parameter definition
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *============================================================================
+ *             HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+#ifndef _USBC_CUSTOM_H_
+#define _USBC_CUSTOM_H_
+
+#include "usbc_custom_def.h"
+#include "kal_general_types.h"
+
+/*     
+       Sample Diagram to illustrate the combination of USB Dev Param
+
+       USB Dev Param
+             |
+             |-- USB Mode 1 (MSD)
+             |      |
+             |      |-- USB Cfg1
+             |             |
+             |             |-- USB class 1 (MS)
+             |
+             |-- USB Mode 2
+             |     ...
+             |
+             |-- USB Mode 3
+             |      |
+             |      |-- USB Cfg 1
+             |      |      |
+             |      |      |-- USB class 1 (MS)
+             |      |      |         
+             |      |      |-- USB class 2 (ACM2)
+             |      |      |
+             |      |      |-- USB class 3 (RNDIS)
+             |      |
+             |      |-- USB Cfg 2
+             |      |
+             |      |-- USB Cfg 3
+             |
+             |-- USB Mode 4
+             |
+             |-- USB Mode 5
+             ...
+                     
+ */
+
+#define USB_MAX_CLASS_NUM          16
+#define USB_MAX_CFG_NUM            8
+
+
+typedef enum {
+    USB_OS_WIN8 = 0,
+    USB_OS_WIN,  // non-win8 windows
+    USB_OS_LINUX,
+    USB_OS_MAC,
+    USB_OS_OTHERS,
+
+    USB_OS_NUM
+} usb_os_type_e;
+
+typedef enum {
+    USB_CLASS_MS = 0,
+#ifdef __USB_ACM_SUPPORT__
+    USB_CLASS_ACM1,  /* 1T1R, 1 interface */
+    USB_CLASS_ACM2,  /* 2T1R, 2 interface, IAD */
+    USB_CLASS_ACM3,  /* 2T1R, 1 interface */
+#endif
+#ifdef __USB_MBIM_SUPPORT__
+    USB_CLASS_MBIM,
+#endif
+#ifdef __USB_RNDIS_SUPPORT__
+    USB_CLASS_RNDIS,
+#endif
+#ifdef __USB_ECM_SUPPORT__
+    USB_CLASS_ECM,
+#endif
+    USB_CLASS_ADB,
+    USB_CLASS_NUM
+} usb_class_type_e;
+
+typedef enum{
+	USB_CLASS_OWNER_MD = 0,
+	USB_CLASS_OWNER_AP,
+	USB_CLASS_OWNER_NONE,
+	USB_CLASS_OWNER_NUM
+}usb_class_owner_e;
+
+typedef enum{
+    USB_NETWORK_CLASS_RNDIS = 0,
+    USB_NETWORK_CLASS_MBIM,
+    USB_NETWORK_CLASS_ECM,
+    USB_NETWORK_CLASS_MAX
+}usb_network_class_type_e;
+
+// definition for double FIFO enabling of bulk endpoint
+#define USB_CLASS_GET_DATA_IN_FIFO_N(n) (n & 0xf)
+#define USB_CLASS_GET_DATA_OUT_FIFO_N(n) ((n & 0xf0) >> 4)
+
+#define USB_MODE_MORPHING_CFG1	1
+#define USB_MODE_MORPHING_CFG2	2
+
+typedef struct {
+    kal_uint32             class_num;
+    usb_class_type_e       class_type[USB_MAX_CLASS_NUM];
+    /* device mapping for each function. ex. ACM->port, RNDIS/MBIM->network interface id */
+    void                   *class_ctxt[USB_MAX_CLASS_NUM];
+
+    /* The 8-bit is used to describe the num of Bulk FIFO, [0...3]IN, [4..7]OUT. */
+    kal_uint8              bulk_fifo_n[USB_MAX_CLASS_NUM];
+	/*usb port ownership, 0 for modem, 1 for AP, ...*/
+	usb_class_owner_e      class_owner[USB_MAX_CLASS_NUM];
+} usb_cfg_param_t;
+
+typedef struct {
+    kal_uint16             vendor_id;          /* idVendor */
+    kal_uint16             product_id;         /* idProduct */
+    kal_uint8              device_class;       /* bDeviceClass */
+    kal_uint8              device_sub_class;   /* bDeviceSubClass */
+    kal_uint8              device_protocol;    /* bDeviceProtocol */
+    kal_uint8              cfg_num;
+    usb_cfg_param_t        cfg_param[USB_MAX_CFG_NUM];
+    usb_mode_owner_e       mode_owner;
+    kal_uint32             mode_index;
+} usb_mode_param_t;
+
+/* custom parameter for usb device */
+typedef struct {
+    kal_uint16             bcd_device;         /* bcdDevice */
+    kal_uint16             *manufacture_string;
+    kal_uint8              manufacture_string_size;
+    kal_uint16             *product_string;
+    kal_uint8              product_string_size;
+    kal_uint16             *serial_number;
+    kal_uint8              serial_number_size;
+    kal_uint8              morphing_sub_id;
+    usb_mode_param_t       mode_param[USB_MODE_MAX];
+    /* USB Mode which each USB OS corresponds to */
+    usb_mode_e             usb_mode[USB_OS_NUM];
+} usb_dev_param_t;
+
+typedef struct {
+    usb_class_type_e class_type;
+    kal_uint32 uart_port;
+    kal_uint32 bulk_fifo_n;
+    usb_class_owner_e  class_owner;
+} usb_current_cfg_param_t;
+
+/* custom parameter for each class type */
+typedef struct
+{
+    kal_uint16             *interface_string;
+    kal_uint8              interface_string_size;
+} usb_class_acm1_param_t;
+
+typedef struct
+{
+    kal_uint16             *comm_interface_string;
+    kal_uint8              comm_interface_string_size;
+    kal_uint16             *data_interface_string;
+    kal_uint8              data_interface_string_size;
+    kal_uint16             *iad_string;
+    kal_uint8              iad_string_size;
+} usb_class_acm2_param_t;
+
+typedef struct
+{
+    kal_uint16             *interface_string;
+    kal_uint8              interface_string_size;
+} usb_class_acm3_param_t;
+
+typedef struct
+{
+    kal_uint16             *comm_interface_string;
+    kal_uint8              comm_interface_string_size;
+    kal_uint16             *null_data_interface_string;
+    kal_uint8              null_data_interface_string_size;
+    kal_uint16             *data_interface_string;
+    kal_uint8              data_interface_string_size;
+    kal_uint16             *iad_string;
+    kal_uint8              iad_string_size;
+} usb_class_mbim_param_t;
+
+typedef struct
+{
+    kal_uint16             *comm_interface_string;
+    kal_uint8              comm_interface_string_size;
+    kal_uint16             *data_interface_string;
+    kal_uint8              data_interface_string_size;
+    kal_uint16             *iad_string;
+    kal_uint8              iad_string_size;
+} usb_class_rndis_param_t;
+
+typedef struct
+{
+    kal_uint16             *comm_interface_string;
+    kal_uint8              comm_interface_string_size;
+    kal_uint16             *null_data_interface_string;
+    kal_uint8              null_data_interface_string_size;    
+    kal_uint16             *data_interface_string;
+    kal_uint8              data_interface_string_size;
+    kal_uint16             *iad_string;
+    kal_uint8              iad_string_size;
+    kal_uint16             *mac_addr_string[3];// max is 3
+    kal_uint8              mac_addr_string_size[3];// max is 3
+} usb_class_ecm_param_t;
+
+typedef struct
+{
+    kal_uint16             *interface_string;
+    kal_uint8              interface_string_size;
+} usb_class_adb_param_t;
+
+typedef struct
+{
+    kal_uint16             *interface_string;
+    kal_uint8              interface_string_size;
+} usb_class_ms_param_t;
+
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+
+/* get parameter function pointer */
+typedef const usb_dev_param_t*           (*usb_get_device_param_f)(void);
+
+#if 0
+/* under construction !*/
+#endif
+typedef const usb_class_ms_param_t*     (*usb_get_ms_param_f)(void);
+
+typedef const usb_class_acm1_param_t*    (*usb_get_acm1_param_f)(void);
+typedef const usb_class_acm2_param_t*    (*usb_get_acm2_param_f)(void);
+typedef const usb_class_acm3_param_t*    (*usb_get_acm3_param_f)(void);
+typedef const usb_class_mbim_param_t*    (*usb_get_mbim_param_f)(void);
+typedef const usb_class_rndis_param_t*   (*usb_get_rndis_param_f)(void);
+typedef const usb_class_ecm_param_t*     (*usb_get_ecm_param_f)(void);
+typedef const usb_class_adb_param_t*     (*usb_get_adb_param_f)(void);
+
+/* get parameter functions*/
+typedef struct 
+{
+    usb_get_device_param_f       get_device_param_func;
+    usb_get_ms_param_f           get_ms_param_func;
+    usb_get_acm1_param_f         get_acm1_param_func;
+    usb_get_acm2_param_f         get_acm2_param_func;
+    usb_get_acm3_param_f         get_acm3_param_func;
+    usb_get_mbim_param_f         get_mbim_param_func;
+    usb_get_rndis_param_f        get_rndis_param_func;
+    usb_get_ecm_param_f          get_ecm_param_func;    
+    usb_get_adb_param_f          get_adb_param_func;
+} usb_custom_func_t;
+
+
+extern const usb_custom_func_t* usb_get_custom_func(void);
+void usb_register_mode_param(usb_mode_param_t *mode_param);
+void usb_replace_mode_param(usb_mode_param_t *mode_param, kal_uint8 index);
+void usb_mode_qeznk_register();
+void usb_mode_inusj_register();
+void usb_mode_ufpm_register();
+void usb_mode_base_register();
+void usb_mode_customization_register();
+void usb_mode_replace_metadbg_mode(kal_uint8 index);
+void usb_mode_factory_register();
+kal_uint16 usb_get_factory_mode_pid();
+kal_bool usb_get_factory_mode_support();
+usb_network_class_type_e usbc_get_network_type();
+
+
+#endif /* _USBC_CUSTOM_H_ */
+
diff --git a/mcu/interface/middleware/hif/usbosd.h b/mcu/interface/middleware/hif/usbosd.h
new file mode 100644
index 0000000..39b98bf
--- /dev/null
+++ b/mcu/interface/middleware/hif/usbosd.h
@@ -0,0 +1,66 @@
+/*!
+ *  @file usbosd.h
+ *  @author Quentin Li <quentin.li@mediatek.com>
+ *  @version 1.0
+ *  @section LICENSE
+ *
+ *  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) 2005
+ *
+ *  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).
+ *
+ *  @section DESCRIPTION
+ *  This file provides definitions of osd API
+ */
+
+#ifndef _USBOSD_H
+#define _USBOSD_H
+
+#define VENDOR_CODE_1	0x66
+#define VENDOR_CODE_2	0x99
+
+enum {
+	OSD_UNKNOWN = 0,	// Unknown OS, retry OSD until max. retry count
+	OSD_WIN_XP_WO_DRV,	// Win XP OS with host driver
+	OSD_WIN_XP_W_DRV,	// Win XP OS without host driver
+	OSD_WIN_VISTA,		// Win Vista OS
+	OSD_WIN_7,			// Win 7 OS
+	OSD_WIN_8,			// Win 8/8.1 OS
+	OSD_LINUX,			// Linux OS
+	OSD_MAC,			// Mac OS
+};
+
+kal_uint32 get_host_os_type(void);
+
+void osd_retry_require_check(void);
+
+void update_host_os_type(kal_uint32 new_os_type);
+
+kal_bool osd_setup(void);
+
+#endif  // _USBIDLE_MAIN_H
diff --git a/mcu/interface/middleware/kpalv/kpalv_struct.h b/mcu/interface/middleware/kpalv/kpalv_struct.h
new file mode 100644
index 0000000..d8bab03
--- /dev/null
+++ b/mcu/interface/middleware/kpalv/kpalv_struct.h
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ *  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) 2012
+ *
+ *  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:
+ * ---------
+ *   kpalv_struct.h
+ *
+ * Project:
+ * --------
+ *   
+ *
+ * Description:
+ * ------------
+ *  Keep alive global structure definition
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ * ==========================================================================
+ * $Log$
+ *
+ *
+ *
+ ****************************************************************************/
+
+#ifndef __INC_KPALV_STRUCT_H
+#define __INC_KPALV_STRUCT_H
+
+#include "kal_general_types.h"
+#include "kal_public_defs.h"
+
+/** MAX KEEPALIVE CONN TRACK BY MD */
+#define KPALV_MAX_KEEP_ALIVE_CONN       2
+
+#define KPALV_IPV4_ADDR_LEN        4
+#define KPALV_IPV6_ADDR_LEN       16
+/*
+ * KPALV iptype enum
+ */
+typedef enum _kpalv_req_ip_type_e {
+    KPALV_REQ_IPTYPE_IPV4TCP,
+    KPALV_REQ_IPTYPE_IPV4UDP,
+    KPALV_REQ_IPTYPE_IPV6TCP,
+    KPALV_REQ_IPTYPE_IPV6UDP,
+} kpalv_req_ip_type_e;
+
+/*
+ * KPALV at cmd req enum
+ */
+typedef enum _kpalv_at_req_type_e {
+    KPALV_REQ_DISABLE,
+    KPALV_REQ_ENABLE,
+    KPALV_REQ_QUERY,
+    KPALV_REQ_INVALID,
+} kpalv_at_req_type_e;
+
+/*
+ * KPALV conn state enum
+ */
+typedef enum _kpalv_md_kpalive_state_e {
+    KPALV_MD_KEEPALIVE_STATE_ACTIVE,
+    KPALV_MD_KEEPALIVE_STATE_INACTIVE,
+    KPALV_MD_KEEPALIVE_STATE_PENDING
+} kpalv_md_kpalive_state_e;
+
+/*
+ * Local parameter structure for MSG_ID_ATP_KPALV_KEEPALIVE_REQ.
+ */
+typedef struct _atp_kpalv_keepalive_enable_req_struct_t {
+    LOCAL_PARA_HDR
+    kpalv_at_req_type_e     req_type;
+    kpalv_req_ip_type_e     ip_type;
+    kal_uint32              netif_id;
+    kal_uint8               src_ipv4_addr[KPALV_IPV4_ADDR_LEN];
+    kal_uint8               dst_ipv4_addr[KPALV_IPV4_ADDR_LEN];
+    kal_uint8               src_ipv6_addr[KPALV_IPV6_ADDR_LEN];
+    kal_uint8               dst_ipv6_addr[KPALV_IPV6_ADDR_LEN];
+    kal_uint16              src_port;
+    kal_uint16              dst_port;
+    kal_uint16              idle_time;                              /**< in sec */
+    kal_uint16              probe_interval;                         /**< in sec */
+    kal_uint8               retry_cnt;                              /**< retry count */
+    kal_uint8               conn_id;                                /**< for disable req */
+    kal_bool                parsing_result;
+} atp_kpalv_keepalive_req_struct_t;
+
+/*
+ * Local parameter structure for MSG_ID_ATP_KPALV_KEEPALIVE_CNF.
+ */
+typedef struct _atp_kpalv_keepalive_cnf_struct_t {
+    LOCAL_PARA_HDR
+    kal_bool        result;
+    kal_bool        is_ap_disable_rsp; /**< ap requested to disable keep-alive */
+    kal_uint8       conn_id;
+    kal_uint8       status;
+} atp_kpalv_keepalive_cnf_struct_t;
+
+/*
+ * Local parameter structure for MSG_ID_ATP_KPALV_CONNECTION_STATUS_IND.
+ */
+typedef struct _atp_kpalv_connection_status_ind_struct_t {
+    LOCAL_PARA_HDR
+    kal_uint8       conn_id;
+    kal_uint8       status;
+} atp_kpalv_connection_status_ind_struct_t;
+
+
+typedef atp_kpalv_keepalive_req_struct_t atp_kpalv_keepalive_req_struct;
+typedef atp_kpalv_connection_status_ind_struct_t atp_kpalv_connection_status_ind_struct;
+typedef atp_kpalv_keepalive_cnf_struct_t atp_kpalv_keepalive_cnf_struct;
+#endif /* __INC_KPALV_STRUCT_H */
+
diff --git a/mcu/interface/middleware/media/med_struct.h b/mcu/interface/middleware/media/med_struct.h
new file mode 100644
index 0000000..7f2f276
--- /dev/null
+++ b/mcu/interface/middleware/media/med_struct.h
@@ -0,0 +1,741 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   med_struct.h
+ *
+ * Project:
+ * --------
+ *   Maui
+ *
+ * Description:
+ * ------------
+ *   This file includes primary global variables of media task.
+ *
+ * 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!
+ *
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+//kmoly
+#ifndef _MED_STRUCT_H
+#define _MED_STRUCT_H
+
+#include "kal_general_types.h"
+#include "kal_public_api.h"
+
+#define MAX_MEDIA_FILE_NAME 512
+
+#define WB_SPEECH_FIR_COEFF_NUM 90
+#define SPEECH_FIR_COEFF_NUM 45
+#define MELODY_FIR_COEFF_NUM 25
+#define AUDIO_COMP_COEFF_NUM 45
+
+#define EMSD_DATA_LEN 140
+
+
+/* start up */
+typedef struct
+{
+    LOCAL_PARA_HDR
+}
+med_startup_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 result;
+}
+med_startup_cnf_struct;
+
+
+typedef void (*media_in_proc_call_type) (kal_uint32 arg1, void *arg2);
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    media_in_proc_call_type func;
+    kal_uint32 func_arg1;
+    void *func_arg2;
+}
+media_in_proc_call_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint32 result;
+    void *result_p;
+}
+media_in_proc_call_cnf_struct;
+
+/* audio */
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_uint8 mode;
+}
+media_aud_set_audio_mode_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_uint16 cause;
+}
+media_aud_set_audio_mode_cnf_struct;
+
+typedef struct
+{
+    kal_uint8 mode;
+    kal_uint8 melody[7];
+    kal_uint8 sound[7];
+    kal_uint8 keytone[7];
+    kal_uint8 speech[7];
+    kal_uint8 mic[7];
+    kal_uint8 sidetone;
+    kal_uint8 max_melody_volume_gain;
+    kal_uint8 melody_volume_gain_step;
+    kal_uint8 tv_out_volume_gain[7];
+}
+audio_profile_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool update_nvram;
+    audio_profile_struct audio_profile;
+}
+media_aud_set_audio_profile_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_uint16 cause;
+}
+media_aud_set_audio_profile_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_uint8 mode;
+}
+media_aud_get_audio_profile_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    audio_profile_struct audio_profile;
+}
+media_aud_get_audio_profile_cnf_struct;
+
+typedef struct
+{
+    kal_int16 coeff[6][WB_SPEECH_FIR_COEFF_NUM];
+}
+audio_wb_speech_fir_struct;
+
+typedef struct
+{
+    kal_int16 param[8][16];
+}
+audio_wb_speech_mode_struct;
+
+typedef struct
+{
+    kal_int16 speech_input_FIR_coeffs[6][SPEECH_FIR_COEFF_NUM];
+    kal_int16 speech_output_FIR_coeffs[6][SPEECH_FIR_COEFF_NUM];
+    kal_uint16 selected_FIR_output_index;
+    kal_uint16 speech_common_para[12];
+    kal_uint16 speech_mode_para[8][16];
+    kal_uint16 speech_volume_para[3][7][4];
+    kal_uint16 max_swing;
+    kal_int16 Melody_FIR_Coeff_Tbl[MELODY_FIR_COEFF_NUM];
+    kal_int16 audio_compensation_coeff[3][AUDIO_COMP_COEFF_NUM]; /* LOUDSPEAKER/EARPHONE/LOUDSPEAKER_RINGTONE */
+}
+audio_param_struct;
+
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool update_nvram;
+    audio_param_struct audio_param;
+}
+media_aud_set_audio_param_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_uint16 cause;
+}
+media_aud_set_audio_param_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+}
+media_aud_get_audio_param_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    audio_param_struct audio_param;
+}
+media_aud_get_audio_param_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool update_nvram;
+    audio_wb_speech_fir_struct fir_param;
+}
+media_aud_set_audio_wb_input_fir_param_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_uint16 cause;
+}
+media_aud_set_audio_wb_input_fir_param_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool update_nvram;
+    audio_wb_speech_fir_struct fir_param;
+}
+media_aud_set_audio_wb_output_fir_param_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_uint16 cause;
+}
+media_aud_set_audio_wb_output_fir_param_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool update_nvram;
+    audio_wb_speech_mode_struct mode;
+}
+media_aud_set_audio_wb_mode_param_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_uint16 cause;
+}
+media_aud_set_audio_wb_mode_param_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+}
+media_aud_get_audio_wb_input_fir_param_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    audio_wb_speech_fir_struct fir_param;
+}
+media_aud_get_audio_wb_input_fir_param_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+}
+media_aud_get_audio_wb_output_fir_param_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    audio_wb_speech_fir_struct fir_param;
+}
+media_aud_get_audio_wb_output_fir_param_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+}
+media_aud_get_audio_wb_mode_param_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    audio_wb_speech_mode_struct fir_param;
+}
+media_aud_get_audio_wb_mode_param_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_uint8 volume_type;
+}
+media_aud_get_volume_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_uint8 volume_type;
+    kal_uint8 volume;
+}
+media_aud_get_volume_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 audio_type;
+    kal_uint8 device;
+}
+media_aud_set_device_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 result;
+}
+media_aud_set_device_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint64 volume;      /* volume data */
+    kal_uint8 audio_type;   /* volume type */
+    kal_uint8 aux_volume;   /* no use */
+    kal_uint8 mode;         /* no use */
+    kal_bool apply;         /* use for media type only */
+    kal_bool blocking;
+}
+media_aud_set_volume_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 result;
+}
+media_aud_set_volume_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool monitor; /* KAL_TRUE: open monitor, KAL_FALSE: close monitor */
+}
+media_aud_emsd_monitor_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_bool cause_present;
+    kal_uint8 cause;
+}
+media_aud_emsd_monitor_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_uint8 data[EMSD_DATA_LEN];
+}
+media_aud_emsd_set_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_bool cause_present;
+    kal_uint8 cause;
+}
+media_aud_emsd_set_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+}
+media_aud_emsd_push_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_bool cause_present;
+    kal_uint8 cause;
+}
+media_aud_emsd_push_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+}
+media_aud_emsd_pull_ind_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_bool result;
+    kal_bool cause_present;
+    kal_uint8 cause;
+}
+media_aud_emsd_hack_ind_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+}
+media_aud_emsd_lack_ind_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+}
+media_aud_emsd_sync_ind_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool monitor; /* KAL_TRUE: open monitor, KAL_FALSE: close monitor */
+}
+media_aud_emsd_psap_monitor_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_bool cause_present;
+    kal_uint8 cause;
+}
+media_aud_emsd_psap_monitor_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+}
+media_aud_emsd_psap_pull_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_bool result;
+    kal_bool cause_present;
+    kal_uint8 cause;
+}
+media_aud_emsd_psap_pull_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 data[EMSD_DATA_LEN];
+}
+media_aud_emsd_psap_data_ind_struct;
+
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint64 volume;
+    kal_uint16 identifier;
+    kal_uint8 audio_id;
+    kal_uint8 play_style;
+    kal_uint8 output_path;
+}
+media_aud_play_by_id_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 result;
+}
+media_aud_play_by_id_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 audio_id;
+}
+media_aud_stop_by_id_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 result;
+}
+media_aud_stop_by_id_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint64 volume;
+    /* set both start_offset and end_offset to 0 for backward compatible */
+    kal_uint32 start_offset;    /* 0 : file begining */
+    kal_uint32 end_offset;      /* 0 or file data len-1: file end */
+    void* cache_p;              /* cache */
+    kal_wchar file_name[MAX_MEDIA_FILE_NAME];
+    kal_uint16 identifier;
+    kal_uint8 src_id;
+    kal_uint8 play_style;
+    kal_uint8 output_path;
+}
+media_aud_play_by_file_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_uint8 result;
+}
+media_aud_play_by_file_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+}
+media_aud_stop_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_uint8 result;
+}
+media_aud_stop_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint64 volume;
+    const kal_uint8 *melody;
+    kal_uint32 len;
+    kal_uint32 start_offset;
+    kal_uint32 end_offset;
+    kal_uint16 identifier;
+    kal_uint8 src_id;
+    kal_uint8 format;
+    kal_uint8 play_style;
+    kal_uint8 output_path;
+    kal_uint8 blocking;
+}
+media_aud_play_by_string_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_uint8 result;
+}
+media_aud_play_by_string_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+}
+media_aud_stop_by_string_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 src_id;
+    kal_uint8 result;
+}
+media_aud_stop_by_string_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint16 identifier;
+    kal_uint8 result;
+}
+media_aud_play_finish_ind_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 device;
+    kal_bool mute;
+}
+media_aud_mute_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 result;
+}
+media_aud_mute_cnf_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_int16 input_idx;
+    kal_int16 output_idx;
+}
+media_aud_sp_set_fir_coeff_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 mode;
+    kal_bool is_with_param;
+    kal_uint16 param[16];
+    kal_uint16 wb_param[16];
+}
+media_aud_sp_set_enhance_mode_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_bool speech_on;
+    kal_uint8 rat_mode;
+}
+meida_aud_sp_set_mode_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8 result;
+}
+media_aud_sp_set_mode_cnf_struct;
+
+#ifndef L4_NOT_PRESENT
+
+#include "device.h"
+
+typedef struct
+{
+    kal_uint8 volume_gain[MAX_VOL_CATE][MAX_VOL_TYPE][MAX_VOL_LEVEL];
+    kal_uint8 volume[MAX_VOL_CATE][MAX_VOL_TYPE];
+    kal_uint8 max_melody_volume_gain[MAX_VOL_CATE + 1];
+    kal_uint8 melody_volume_gain_step[MAX_VOL_CATE + 1];
+    kal_uint8 tv_out_volume_gain[MAX_VOL_LEVEL];
+} custom_acoustic_struct;
+#endif
+
+#endif /* _MED_STRUCT_H */
diff --git a/mcu/interface/middleware/meta/ft_msg.h b/mcu/interface/middleware/meta/ft_msg.h
new file mode 100644
index 0000000..1029d30
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg.h
@@ -0,0 +1,1438 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of FT task
+ *
+ * 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!
+ * 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!
+ *
+ * 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!
+ * 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!
+ * 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!
+ *
+ * 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!
+ * 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!
+ * 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!
+ *
+ * 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!
+ * 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!
+ * 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!
+ *
+ * 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!
+ * 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!
+ * 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!
+ *
+ * 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!
+ * 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!
+ * 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!
+ * 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!
+ * 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 FT_MSG_H
+#define FT_MSG_H
+
+
+#include "kal_public_api.h"
+#ifndef L1_SIM
+#include "med_struct.h"
+#include "fs_type.h"
+#endif // #ifndef L1_SIM
+#include "kal_general_types.h"
+#include "ft_msg_common.h"
+
+/*******************************************************************************
+*
+*  Message structures defined for NVRAM Interface
+*
+*******************************************************************************/
+#ifndef L1_SIM
+typedef struct {
+   FT_HDR
+   kal_uint32	dummy;
+} FT_NVRAM_GET_DISK_INFO_REQ;
+
+typedef struct {
+   FT_HDR
+   kal_uint8	status;
+   kal_uint32	diskfilesize;
+   kal_uint32	freespace;
+   kal_uint32	overhead;
+} FT_NVRAM_GET_DISK_INFO_CNF;
+
+typedef struct
+{
+   FT_HDR
+   kal_uint8       poweron_mode;
+}ft_nvram_startup_req_struct_T;
+
+typedef struct
+{
+   FT_HDR
+   kal_uint8       status;
+}ft_nvram_startup_cnf_struct_T;
+
+typedef struct
+{
+   FT_HDR
+   kal_uint8       reset_category;
+   kal_uint16      file_idx;
+}ft_nvram_reset_req_struct_T;
+
+typedef struct
+{
+   FT_HDR
+   kal_uint8       status;
+}ft_nvram_reset_cnf_struct_T;
+
+/********************************************
+* Generic Primitives for READ/WRITE NVRAM
+********************************************/
+typedef struct
+{
+   FT_HDR
+   kal_uint16      file_idx;
+   kal_uint16      para;
+   kal_uint8       status; 
+} ft_nvram_read_cnf_struct_T;
+
+typedef struct
+{
+   FT_HDR
+   kal_uint16      file_idx;
+   kal_uint16      para;
+   kal_uint8       ciphered_data_valid;
+   kal_uint8       ciphered_data[4];
+} ft_nvram_read_req_struct_T;
+
+typedef struct
+{
+   FT_HDR
+   kal_uint16      file_idx;
+   kal_uint16      para;
+   kal_uint16      rec_amount;         /*  total record to read */
+   kal_uint8       *buffer;            /*  buffer to fill in data */
+   kal_uint32      buf_size;           /*  buffer size */
+
+} ft_nvram_read_sm_req_struct_T;
+
+
+typedef struct
+{
+   FT_HDR
+   kal_uint16      file_idx;
+   kal_uint16      para;
+   kal_uint8       status;
+} ft_nvram_write_cnf_struct_T;
+
+typedef struct
+{
+   FT_HDR
+   kal_uint16      file_idx;
+   kal_uint16      para;
+   kal_uint8       msg_num;
+   kal_uint8       msg_idx;
+} ft_nvram_write_req_struct_T;
+
+typedef struct {
+	FT_HDR
+	kal_uint8		lock_en;
+} ft_nvram_lock_req_struct_T;
+
+typedef struct {
+	FT_HDR
+	kal_uint8		status;
+} ft_nvram_lock_cnf_struct_T;
+  
+/*******************************************************************************
+*
+*  Message structures defined for BaseBand Interface
+*
+*******************************************************************************/
+typedef enum
+{
+     FT_MT_UNKNOWN =0,
+     FT_MT6305,
+     FT_MT6318,
+     FT_MT6326,
+     FT_PMIC_END
+}ft_PMICType;
+
+typedef enum
+{
+	FT_BaseBandReg = 0,
+	FT_PMICReg	
+}ft_RegisterType;
+typedef struct
+{
+  FT_HDR
+  kal_uint32            addr;
+} ft_RegisterRead_req_T;
+
+typedef struct
+{
+  FT_HDR
+  kal_uint16            value;
+  kal_uint8             status;
+} ft_RegisterRead_cnf_T;
+
+typedef struct
+{
+  FT_HDR
+  kal_uint32            addr;
+  kal_uint16            value;
+} ft_RegisterWrite_req_T;
+
+typedef struct
+{
+  FT_HDR
+  kal_uint8             status;
+} ft_RegisterWrite_cnf_T;
+typedef struct
+{
+  FT_HDR
+  kal_uint32            addr;
+} ft_PMICRegisterRead_req_T;
+typedef struct
+{
+  FT_HDR
+  kal_uint16            value;
+  kal_uint8             status;
+} ft_PMICRegisterRead_cnf_T;
+typedef struct
+{
+  FT_HDR
+  kal_uint32            addr;
+  kal_uint16            value;
+} ft_PMICRegisterWrite_req_T;
+typedef struct
+{
+  FT_HDR
+  kal_uint8             status;
+} ft_PMICRegisterWrite_cnf_T;
+
+typedef struct
+{
+  FT_HDR
+  kal_uint8             Sel;
+  kal_uint16            Meacount; 
+} ft_FtADC_GetMeaData_req_T;
+typedef struct
+{
+  FT_HDR
+  kal_uint32            value;
+  kal_uint8             status;
+} ft_FtADC_GetMeaData_cnf_T;
+
+/*******************************************************************************
+*
+*  Message structures defined for FAT Interface
+*
+*******************************************************************************/
+
+#define FT_FAT_ERR_PATH_TOO_LONG	-500
+#define FT_FAT_ERR_PATH_RESTRICTION	-501
+#define FT_FAT_ERR_DIR_NOT_EXIST	-502
+#define FT_FAT_ERR_ACTION_NOT_SUPPORT - 503
+
+typedef enum {
+	 FT_FAT_OP_OPEN = 1
+	,FT_FAT_OP_READ = 2
+	,FT_FAT_OP_WRITE = 4
+	,FT_FAT_OP_CLOSE = 8
+	,FT_FAT_OP_FILESIZE
+	,FT_FAT_OP_DELETE
+	,FT_FAT_OP_MOVE
+	,FT_FAT_OP_FIND_FILE
+	,FT_FAT_OP_FIND_FILE_RECURSIVE
+	,FT_FAT_OP_FIND_DIR_RECURSIVE
+	,FT_FAT_OP_GET_DISK_INFO
+	,FT_FAT_OP_RMDIR
+	,FT_FAT_OP_GET_DRIVE_TYPE
+	,FT_FAT_OP_END
+}FT_FAT_OP;
+
+typedef struct
+{
+	FT_HDR
+	FT_FAT_OP	fat_op;
+	FS_HANDLE	fs_handle;
+	kal_int32	offset;
+	kal_uint8	last_frame;
+	kal_int32	status;
+
+}FT_FAT_OPERATION;
+
+typedef struct {
+	kal_uint32	Type;
+	kal_uint32	SectorsPerCluster;
+	kal_uint32	TotalClusters;
+	kal_uint32	FreeClusters;
+}FT_FAT_DiskInfo_T;
+
+typedef struct {
+	kal_int32	filesize;
+}FT_FAT_FILESIZE;
+#endif // #ifndef L1_SIM
+/*******************************************************************************
+*
+*  Message structures defined for Version Info Interface
+*
+*******************************************************************************/
+
+typedef struct {
+	FT_HDR
+}FT_VER_INFO_REQ;
+
+typedef struct {
+	FT_HDR
+	kal_uint8	bb_chip[64];
+	kal_uint8	eco_ver[4];
+	kal_uint8	dsp_fw[64];
+	kal_uint8	dsp_patch[64];
+	kal_uint8	sw_ver[64];
+	kal_uint8	hw_ver[64];
+	kal_uint8	melody_ver[64];
+	kal_uint8	sw_flavor[64];
+}FT_VER_INFO_CNF;
+
+/*******************************************************************************
+*
+*  Message structures defined for ready confirm
+*
+*******************************************************************************/
+
+typedef struct {
+	FT_HDR
+	kal_uint32		dummy;		// extend alignment to 4 bytes
+}FT_IS_ALIVE_REQ;
+
+typedef struct {
+	FT_HDR
+	kal_uint32		dummy;		// extend alignment to 4 bytes
+}FT_IS_ALIVE_CNF;
+
+
+/*******************************************************************************
+*
+*  Message structures defined for SLA
+*
+*******************************************************************************/
+
+typedef struct {
+	FT_HDR
+	kal_uint32		dummy;		// extend alignment to 4 bytes
+}FT_GET_SLA_STATUS_REQ;
+
+typedef struct {
+	FT_HDR
+	kal_uint16		sla_config;
+    kal_uint16      sla_verified;
+}FT_GET_SLA_STATUS_CNF;
+
+typedef struct {
+	FT_HDR
+	kal_uint32      sla_ver_from_pc;
+}FT_CHECK_SLA_VER_REQ;
+
+typedef struct {
+	FT_HDR
+	kal_uint32      status;
+}FT_CHECK_SLA_VER_CNF;
+
+#define RND_BUF_LEN	    16
+typedef struct {
+	FT_HDR
+	kal_uint8       rand_num[RND_BUF_LEN];
+    kal_uint32      rand_num_len;
+    kal_uint8       cust_para[256];
+    kal_int32       status;
+}FT_GET_SLA_PARA_CNF;
+
+typedef struct {
+	FT_HDR
+	kal_uint8	encrypted[256];
+    kal_uint32  encrypted_len;
+}FT_VERIFY_SLA_RND_REQ;
+
+typedef struct {
+	FT_HDR
+    kal_int32	status;
+}FT_VERIFY_SLA_RND_CNF;
+
+typedef struct {
+	FT_HDR
+    kal_uint16	deniedMsgId;
+    kal_uint32	status;
+}FT_DENIED_MSG_ID_CNF;
+
+/*******************************************************************************
+*
+*  Message structures defined for power off command
+*
+*******************************************************************************/
+#ifndef L1_SIM
+typedef struct {
+	FT_HDR
+	kal_uint32		dummy;			// extend alignment to 4 bytes
+}FT_POWER_OFF_REQ;
+#endif // #ifndef L1_SIM
+/*******************************************************************************
+*
+*  Message structures defined for checking META_DLL version 
+*
+*******************************************************************************/
+
+typedef struct {
+	FT_HDR
+	kal_uint32		meta_ver_from_pc;
+	kal_uint8		dummy[256];
+}FT_CHECK_META_VER_REQ;
+
+typedef struct {
+	FT_HDR
+	kal_uint32		meta_ver_required_by_target;
+	kal_uint8		dummy[256];
+}FT_CHECK_META_VER_CNF;
+#ifndef L1_SIM
+typedef struct {
+  LOCAL_PARA_HDR
+  kal_uint8 lid_count;
+}ft_cal_data_add_one_req_struct;
+
+typedef struct {
+  LOCAL_PARA_HDR
+  kal_uint8 status;
+}ft_cal_data_add_one_cnf_struct;
+
+typedef struct {
+    kal_uint16 lid;
+    kal_uint16 rid;
+}FT_CAL_DATA_CHECK_REQ_T;
+#endif // #ifndef L1_SIM
+
+/*******************************************************************************
+*
+*  Message structures defined for L4 AT command Interface
+*
+*******************************************************************************/
+
+typedef struct {
+	FT_HDR
+	kal_uint32		type;	
+}FT_L4_ATCMD_REQ;
+
+typedef struct {
+	FT_HDR
+	kal_uint32		type;
+	kal_uint32             status;
+}FT_L4_ATCMD_CNF;
+#ifndef L1_SIM
+#include "ft_msg_fta.h"
+#include "ft_msg_ftc.h"
+#include "ft_msg_misc.h"
+#include "ft_msg_misc_ex.h"
+#endif // #ifndef L1_SIM
+#include "ft_msg_util.h"
+#include "ft_msg_l1rf.h"
+#include "ft_msg_ul1rf.h"
+#include "ft_msg_lterf.h"
+#include "ft_msg_mmrf.h"
+#endif
+
diff --git a/mcu/interface/middleware/meta/ft_msg_common.h b/mcu/interface/middleware/meta/ft_msg_common.h
new file mode 100644
index 0000000..732f18e
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_common.h
@@ -0,0 +1,329 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_common.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Common definition for META commnuication
+ *
+ * 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!
+ * 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 _FT_MSG_COMMON_H_
+#define _FT_MSG_COMMON_H_
+#include "kal_public_api.h"
+typedef enum
+{
+  /* RF */
+  FT_RF_TEST_REQ_ID = 0                       ,/*0*/
+  FT_RF_TEST_CNF_ID                           ,
+  /* BaseBand */
+  FT_REG_READ_ID                              ,
+  FT_REG_READ_CNF_ID                          ,
+  FT_REG_WRITE_ID                             ,
+  FT_REG_WRITE_CNF_ID                         ,/*5*/
+  FT_ADC_GETMEADATA_ID                        ,
+  FT_ADC_GETMEADATA_CNF_ID                    ,
+  /* test alive */
+  FT_IS_ALIVE_REQ_ID                          ,
+  FT_IS_ALIVE_CNF_ID                          ,
+  /* power off */
+  FT_POWER_OFF_REQ_ID                         ,/*10*/
+  /* unused */
+  FT_RESERVED04_ID                            ,
+  /* required META_DLL version */
+  FT_CHECK_META_VER_REQ_ID                    ,
+  FT_CHECK_META_VER_CNF_ID                    ,
+  /* utility command */
+  FT_UTILITY_COMMAND_REQ_ID                   ,
+  FT_UTILITY_COMMAND_CNF_ID                   ,/*15*/
+  /* for NVRAM */
+  FT_NVRAM_GET_DISK_INFO_REQ_ID               ,
+  FT_NVRAM_GET_DISK_INFO_CNF_ID               ,
+  FT_NVRAM_RESET_REQ_ID                       ,
+  FT_NVRAM_RESET_CNF_ID                       ,
+  FT_NVRAM_LOCK_CNF_ID                        ,/*20*/
+  FT_NVRAM_LOCK_REQ_ID                        ,
+  FT_NVRAM_READ_REQ_ID                        ,
+  FT_NVRAM_READ_CNF_ID                        ,
+  FT_NVRAM_WRITE_REQ_ID                       ,
+  FT_NVRAM_WRITE_CNF_ID                       ,/*25*/
+  /* FAT */
+  FT_FAT_OPERATION_ID = 26                    ,/* 26 ~ 40 */
+  /* L4 Audio */
+  FT_L4AUD_REQ_ID = 41                        ,/* 41 ~ 50 */
+  FT_L4AUD_CNF_ID                             ,
+  /* Version Info */
+  FT_VER_INFO_REQ_ID = 51                     ,/* 51 */
+  FT_VER_INFO_CNF_ID                          ,
+  /* CCT */
+  FT_CCT_REQ_ID = 53                          ,/* 53 */
+  FT_CCT_CNF_ID                               ,
+  /* WiFi */
+  FT_WIFI_WNDRV_SET_REQ_ID = 55               ,/* 55 */
+  FT_WIFI_WNDRV_SET_CNF_ID                    ,
+  FT_WIFI_WNDRV_QUERY_REQ_ID = 57             ,/* 57 */
+  FT_WIFI_WNDRV_QUERY_CNF_ID                  ,
+  FT_WIFI_REQ_ID = 59                         ,/* 59 */
+  FT_WIFI_CNF_ID                              ,
+  FT_BT_REQ_ID = 61                           ,
+  FT_BT_CNF_ID                                ,
+  FT_PMIC_REG_READ_ID = 63            ,
+  FT_PMIC_REG_READ_CNF_ID             ,
+  FT_PMIC_REG_WRITE_ID = 65           ,
+  FT_PMIC_REG_WRITE_CNF_ID                ,
+  FT_URF_TEST_REQ_ID = 67                   ,   /* 67 */
+  FT_URF_TEST_CNF_ID                  ,
+  FT_FM_REQ_ID = 69                          ,   /* 69 */
+  FT_FM_CNF_ID = 70                          ,
+  FT_TDMB_REQ_ID = 71                , /* 71 */
+  FT_TDMB_CNF_ID = 72                , /* 72 */
+  FT_MISC_CMD_REQ_ID = 73            ,
+  FT_MISC_CMD_CNF_ID = 74            ,
+  FT_CMMB_REQ_ID = 75                ,
+  FT_CMMB_CNF_ID = 76                ,
+  FT_CUSTOM_REQ_ID = 77              ,
+  FT_CUSTOM_CNF_ID = 78              ,
+  FT_MISC_EX_CMD_REQ_ID = 79            ,
+  FT_MISC_EX_CMD_CNF_ID = 80            ,
+  FT_AUX_REQ_ID = 81                 ,
+  FT_AUX_CNF_ID = 82                 ,
+  FT_MATV_CMD_REQ_ID = 83            ,
+  FT_MATV_CMD_CNF_ID = 84            ,
+   /* L4 Audio EX after all audio developed in w10.10 */
+  FT_L4AUD_REQ_EX_ID = 85                  ,
+  FT_L4AUD_CNF_EX_ID = 86                   ,
+  /* NFC test command category */
+  FT_NFC_CMD_REQ_ID = 87,
+  FT_NFC_CMD_CNF_ID = 88,
+  /* LTE command */
+  FT_ERF_TEST_REQ_ID = 91,
+  FT_ERF_TEST_CNF_ID = 92,
+  FT_PHY_TOOL_REQ_ID = 93,
+  FT_PHY_TOOL_CNF_ID = 94,
+  /* MMRF command */
+  FT_MMRF_TEST_REQ_ID = 95,
+  FT_MMRF_TEST_CNF_ID = 96,  
+  /* C2K command */
+  FT_CRF_TEST_REQ_ID = 97,
+  FT_CRF_TEST_CNF_ID = 98, 
+  /* This is a special message defined to handle L1 report. */
+  /* L4_AT_command  */
+  FT_L4_ATCMD_REQ_ID = 99,
+  FT_L4_ATCMD_CNF_ID = 100,
+  /* NR command */
+  FT_NRF_TEST_REQ_ID  = 101,
+  FT_NRF_TEST_CNF_ID = 102,
+  /* SLA command*/
+  FT_GET_SLA_STATUS_REQ_ID = 103,
+  FT_GET_SLA_STATUS_CNF_ID = 104,
+  FT_GET_SLA_PARA_REQ_ID = 105,
+  FT_GET_SLA_PARA_CNF_ID = 106,
+  FT_VERIFY_SLA_RND_REQ_ID = 107,
+  FT_VERIFY_SLA_RND_CNF_ID = 108,
+  FT_CHECK_SLA_VER_REQ_ID = 109,
+  FT_CHECK_SLA_VER_CNF_ID = 110,
+  FT_CMD_DENIED_REQ_ID = 111,
+  FT_CMD_DENIED_CNF_ID = 112,
+  FT_DISPATCH_REPORT_ID                       ,
+  FT_MSG_LAST_ID   =  FT_DISPATCH_REPORT_ID
+}FT_MESSAGE_ID;
+
+/* Header of every structure */
+#define FT_HDR \
+    LOCAL_PARA_HDR \
+    struct { \
+        kal_uint16 token;\
+        kal_uint16 ft_msg_id;\
+    } header;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint16 token;
+    kal_uint16 ft_msg_id;
+} FT_H;
+
+/* struct definition for FT request & confirm */
+typedef FT_H tst_to_ft_struct;
+typedef FT_H ft_to_tst_struct;
+
+#define FT_CNF_OK   0
+#define FT_CNF_FAIL 1
+#define FT_CNF_NOT_SUPPORTED 2
+#define FT_CNF_NOT_ALLOWED   3
+#define FT_CNF_RETRY         4
+/*******************************************************************************
+*
+*  Utility Functions
+*
+*******************************************************************************/
+void _FT_ALLOC_MSG(ilm_struct* ptr_ilm, kal_uint16 size, kal_bool IsFtMsg, kal_bool IsCcMsg);
+void _FT_CONSTRUCT_CC_MSG(const ilm_struct* ilm_ptr, ilm_struct* ilm_cc_ptr);
+void _FT_SendFtMsgByToken(module_type  src_mod, module_type  dest_mod, sap_type  sap, msg_type  msg, ilm_struct  *ilm_ptr, kal_uint16  token);
+void _FT_SendFtMsgToPcByToken(ilm_struct  *ilm_ptr, kal_uint16  token);
+kal_uint16   FT_GetGolbalToken(void);
+void FT_SendDeniedMsgIdCnf(kal_uint16 deniedMsgId, kal_uint32 status);
+/* allocate message with local parameter with FT_H header */
+#define FT_ALLOC_MSG(ptr_ilm,size) _FT_ALLOC_MSG(ptr_ilm, size, KAL_TRUE,  KAL_FALSE)
+/* allocate message as ordinary ILM message */
+#define FT_ALLOC_OTHER_MSG(ptr_ilm,size) _FT_ALLOC_MSG(ptr_ilm, size, KAL_FALSE, KAL_FALSE)
+/* allocate Cross-Core message with local parameter with FT_H header */
+#define FT_ALLOC_CC_MSG(ptr_ilm,size) _FT_ALLOC_MSG(ptr_ilm, size, KAL_TRUE , KAL_TRUE)
+/* allocate Cross-Core message as ordinary ILM message */
+#define FT_ALLOC_OTHER_CC_MSG(ptr_ilm,size) _FT_ALLOC_MSG(ptr_ilm, size, KAL_FALSE, KAL_TRUE)
+#define FT_CONSTRUCT_CC_MSG(ilm_ptr, ilm_cc_ptr)              _FT_CONSTRUCT_CC_MSG(ilm_ptr, ilm_cc_ptr)
+#define FT_SEND_MSG(src_mod, dest_mod, sap, msg, ilm_ptr)     _FT_SendFtMsgByToken(src_mod, dest_mod, sap, msg, ilm_ptr, FT_GetGolbalToken())
+#define FT_SEND_MSG_TO_PC(ilm_ptr)                            _FT_SendFtMsgToPcByToken(ilm_ptr, FT_GetGolbalToken())
+#define FT_SEND_MSG_TO_PC_BY_TOKEN(ilm_ptr, token)            _FT_SendFtMsgToPcByToken(ilm_ptr, token)
+#endif // _FT_MSG_COMMON_H_
diff --git a/mcu/interface/middleware/meta/ft_msg_fta.h b/mcu/interface/middleware/meta/ft_msg_fta.h
new file mode 100644
index 0000000..da5d886
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_fta.h
@@ -0,0 +1,128 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_fta.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of FTA category of FT Library
+ *
+ * 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!
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __FT_MSG_FTA_H__
+#define __FT_MSG_FTA_H__
+#include "ft_msg_common.h"
+/*******************************************************************************
+*
+*  Message structures defined for Auxiliary Interface
+*
+*******************************************************************************/
+typedef enum
+{
+    FT_AUX_OP_BASIC = 0
+   ,FT_AUX_OP_END
+
+}META_AUX_CMD_TYPE;
+
+typedef union
+{
+    kal_uint8   m_u1Dummy;
+}META_AUX_CMD_U;
+
+typedef union
+{
+    kal_uint8  m_u1Dummy;
+}META_AUX_CNF_U;
+
+typedef struct
+{
+    FT_HDR
+    META_AUX_CMD_TYPE   type;
+    META_AUX_CMD_U      cmd;
+}FT_AUX_REQ;
+
+typedef struct
+{
+    FT_HDR
+    META_AUX_CMD_TYPE   type;
+    kal_uint8           status;
+    META_AUX_CNF_U      result;
+}FT_AUX_CNF;
+
+typedef FT_AUX_REQ ft_to_fta_req_struct;
+typedef FT_AUX_CNF fta_to_ft_cnf_struct;
+#endif // #ifndef __FT_MSG_FTA_H__
diff --git a/mcu/interface/middleware/meta/ft_msg_ftc.h b/mcu/interface/middleware/meta/ft_msg_ftc.h
new file mode 100644
index 0000000..8a6e7d0
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_ftc.h
@@ -0,0 +1,126 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_ftc.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of FTC category of FT Library
+ *
+ * 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!
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __FT_MSG_FTC_H__
+#define __FT_MSG_FTC_H__
+#include "ft_msg_common.h"
+/*******************************************************************************
+*
+*  Message structures defined for Customer Interface
+*
+*******************************************************************************/
+typedef enum
+{
+    FT_CUSTOMER_OP_BASIC = 0
+   ,FT_CUSTOMER_OP_END
+
+}META_CUSTOMER_CMD_TYPE;
+
+typedef union
+{
+    kal_uint8   m_u1Dummy;
+}META_CUSTOMER_CMD_U;
+
+typedef union
+{
+    kal_uint8  m_u1Dummy;
+}META_CUSTOMER_CNF_U;
+
+typedef struct
+{
+    FT_HDR
+    META_CUSTOMER_CMD_TYPE   type;
+    META_CUSTOMER_CMD_U      cmd;
+}FT_CUSTOMER_REQ;
+
+typedef struct
+{
+    FT_HDR
+    META_CUSTOMER_CMD_TYPE   type;
+    kal_uint8                status;
+    META_CUSTOMER_CNF_U      result;
+}FT_CUSTOMER_CNF;
+
+#endif // #ifndef __FT_MSG_FTC_H__
diff --git a/mcu/interface/middleware/meta/ft_msg_l1rf.h b/mcu/interface/middleware/meta/ft_msg_l1rf.h
new file mode 100644
index 0000000..d2a1a93
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_l1rf.h
@@ -0,0 +1,157 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_l1rf.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of L1RF category of FT Library
+ *
+ * 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!
+ * 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 __FT_MSG_L1RF_H__
+#define __FT_MSG_L1RF_H__
+#include "ft_msg_common.h"
+#if (!defined(__LTE_SM__)&&defined(__MTK_GL1_GSM__)) || defined(__L1SIM_NR_SM__) || defined(__NR_L1SIM__)
+#include "l1tst_ft_msg_struct.h"
+#endif // #if !defined(__LTE_SM__)&&defined(__MTK_GL1_GSM__)
+#endif // #ifndef __FT_MSG_L1RF_H__
diff --git a/mcu/interface/middleware/meta/ft_msg_l4.h b/mcu/interface/middleware/meta/ft_msg_l4.h
new file mode 100644
index 0000000..ab50852
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_l4.h
@@ -0,0 +1,95 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_l4.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of L4 mode switch mechanism of FT Library
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ * 				HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ * removed!
+ * removed!
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef _FT_MSG_L4_H_
+#define _FT_MSG_L4_H_
+#include "ft_msg_common.h"
+
+typedef enum {
+	FT_MODE_SWITCH_SUCCESS = 0,
+	FT_MODE_SWITCH_FAIL,
+	FT_MODE_SWITCH_RETRY
+}FT_MODE_SWITCH_RESULT;
+
+typedef struct {
+	LOCAL_PARA_HDR
+	FT_MODE_SWITCH_RESULT result;
+}ft_enter_factory_mode_cnf_struct;
+
+typedef struct {
+	LOCAL_PARA_HDR
+	FT_MODE_SWITCH_RESULT result;
+}ft_enter_normal_mode_cnf_struct;
+
+#endif // _FT_MSG_L4_H_
\ No newline at end of file
diff --git a/mcu/interface/middleware/meta/ft_msg_lterf.h b/mcu/interface/middleware/meta/ft_msg_lterf.h
new file mode 100644
index 0000000..a0de3af
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_lterf.h
@@ -0,0 +1,114 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_lterf.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of ERF test category of FT Library
+ *
+ * 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!
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __FT_MSG_ERF_H__
+#define __FT_MSG_ERF_H__
+#if defined(__LTE_RAT__)
+#include "el1d_meta_if.h"
+#endif // #if defined(__LTE_RAT__)
+#endif // #ifndef __FT_MSG_ERF_H__
diff --git a/mcu/interface/middleware/meta/ft_msg_misc.h b/mcu/interface/middleware/meta/ft_msg_misc.h
new file mode 100644
index 0000000..82a7af4
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_misc.h
@@ -0,0 +1,285 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_misc.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of MISC category of FT Library
+ *
+ * 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!
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __FT_MSG_MISC_H__
+#define __FT_MSG_MISC_H__
+#include "ft_msg_common.h"
+
+
+
+/*******************************************************************************
+*
+*  Message structures defined for MISC Command 
+*
+*******************************************************************************/
+
+
+typedef enum
+{
+    FT_MISC_OP_GET_IMEI_LOC = 0,
+    FT_MISC_OP_GET_IMEI_VALUE = 1,
+    FT_MISC_OP_GET_CAL_INFO = 2,
+    FT_MISC_OP_VERIFY_TEMP_SML_FILE = 3,
+    FT_MISC_OP_QUERY_NVRAM_FOLDER = 4,
+    FT_MISC_OP_VERIFY_NVRAM_ATTR_SETTING_COMPLETE = 5,
+    FT_MISC_OP_ENABLE_PATH_LIMITION = 6,
+    FT_MISC_OP_DISABLE_PATH_LIMITION = 7,
+    FT_MISC_OP_GET_IMEI_REC_NUM = 8,
+    FT_MISC_OP_SET_IMEI_VALUE = 9,
+    FT_MISC_OP_GET_NVRAM_FOLDER_AMOUNT = 10,
+    FT_MISC_OP_CHECK_SIM1_INSERTED = 11,
+    FT_MISC_OP_CHECK_SIM2_INSERTED = 12,
+    FT_MISC_OP_SET_MUIC_CHARGER_MODE = 13,
+    FT_MISC_OP_CALDATA_INTEGRITY_START_REC = 14,
+    FT_MISC_OP_CALDATA_INTEGRITY_STOP_REC = 15,
+    FT_MISC_OP_CALDATA_INTEGRITY_ADD_ONE = 16,
+    FT_MISC_OP_CALDATA_INTEGRITY_DEL_ONE = 17,
+    FT_MISC_OP_CALDATA_INTEGRITY_DEL_ALL = 18,
+    FT_MISC_OP_CALDATA_INTEGRITY_CHECK_ONE = 19,
+    FT_MISC_OP_CALDATA_INTEGRITY_CHECK_ALL = 20,
+    FT_MISC_OP_GET_ADC_FROM_EFUSE = 21,
+    FT_MISC_OP_GET_CALFLAG_ENUM = 22,
+    FT_MISC_OP_GET_RF_CAL_ENV_ENUM = 23,
+    FT_MISC_OP_GET_RF_CAL_LOSS_SETTING_ENUM = 24,
+    FT_MISC_OP_GET_RF_TEST_POWER_RESULT_ENUM = 25,
+    FT_MISC_OP_GET_ADC_MAX_CHANNEL = 26,
+    FT_MISC_OP_GET_TADC_INDEX = 27,
+    FT_MISC_OP_GET_RID = 28,
+    FT_MISC_OP_CHECK_GEMINI_PLUS_SIM_INSERTED = 29,
+    FT_MISC_OP_GET_MMI_CACHE_ENUM_INDEX = 30,
+    FT_MISC_OP_SET_WIFI_MAC_ADDR = 31,
+    FT_MISC_OP_GET_BARCODE_VALUE = 32,
+    FT_MISC_OP_CHECK_SIM_HW_TEST = 33,
+    FT_MISC_OP_CALDATA_INTEGRITY_START_REC_EX = 34,
+    FT_MISC_OP_CALDATA_INTEGRITY_STOP_REC_EX = 35,
+    FT_MISC_OP_CALDATA_INTEGRITY_ADD_ONE_EX = 36,
+    FT_MISC_OP_CALDATA_INTEGRITY_DEL_ONE_EX = 37,
+    FT_MISC_OP_CALDATA_INTEGRITY_DEL_ALL_EX = 38,
+    FT_MISC_OP_END
+}FT_MISC_CMD_TYPE;
+
+typedef struct
+{
+    kal_uint16                  record_index;
+    kal_uint8                       imei[8];
+    kal_uint8                       svn;
+}FT_MISC_SET_IMEI_VALUE_REQ_T;
+
+typedef struct
+{
+    kal_uint16         u2LidEnum;
+    kal_uint16         u2RID;
+}FT_MISC_CAL_DATA_INTEGRITY_ENTRY;
+
+typedef union
+{
+    kal_bool   m_bcheckImeiFlag;
+    FT_MISC_SET_IMEI_VALUE_REQ_T m_rIMEIData;
+    kal_uint16 m_u1RecordIndex;
+    kal_uint8      m_u1ChargerMode;
+    FT_MISC_CAL_DATA_INTEGRITY_ENTRY  m_rCalDataOne;
+    /// [IN] requested RID length for the RID query operation
+    kal_uint8 m_RIDLength;
+    /// [IN] requested SIM index for the SIM insertion test operation
+    kal_uint8 m_u1SimIndex;
+    /// [IN] MMI cache enum value query
+    kal_uint16                        m_u2MmiCacheEnumValue;
+    kal_uint8                         buffer[6];
+}FT_MISC_CMD_U;
+
+typedef struct
+{
+    kal_uint8 buf[20];   // default: 10 digits
+    kal_uint8 buf_len;
+
+}FT_IMEI_DATA_T;
+
+typedef struct
+{
+    kal_uint16 m_stop_enum_value;
+    kal_uint16 m_total_lid_num;
+    kal_uint16 m_stop_index;
+
+}FT_NVRAM_SETTINGS_VERIFY_T;
+
+typedef struct
+{
+    kal_uint8        m_u1LastFrame;  // to mark it is the last frame for FT_MISC_OP_GET_CAL_INFO
+    kal_uint16       m_u2TotalNum;  // only valid when lastframe = 1;
+
+}FT_CAL_INFO_T;
+
+
+typedef struct
+{
+    kal_bool bAllPass;
+    kal_uint16 u2LastLID;
+    kal_uint16 u2LastRID;
+}FT_MISC_CAL_DATA_INTEGRITY_CHECK_CNF_T;
+typedef struct
+{
+    kal_bool      bADCStoredInEfuse;
+    kal_uint16     u2ADCChnNum;
+}FT_MISC_GET_ADC_FROM_EFUSE_CNF_T;
+
+typedef struct
+{
+    /// [OUT] requested RID length (unit: bytes)
+    kal_uint8 buf_len;
+    /// [OUT] RID raw buffer returned from the target side
+    kal_uint8 buf[16];
+}META_RID_DATA_T;
+/**
+ * Please do not change alignment (this is a 2-byte aligned structure)
+ */
+typedef union
+{
+    kal_bool  m_bCheckResult;
+    kal_uint8 m_u1IMEILoc;
+    kal_uint8 m_u1LastFrame;
+    kal_uint8 m_u1VerifyResult;
+    kal_uint8 m_u1NVRAMFolderAmount;
+    kal_uint8 m_u1SIMInserted;
+    kal_uint16 m_u1CurRecNum;
+    kal_uint8 m_u1ADCMaxChannel;
+    kal_uint8 m_u1TADCChannelIndex;
+    kal_uint8 m_i4SimHwStatus[4]; ///< HW status (4 bytes) to keep the alignment, the variable is declared as array
+    kal_uint16 m_u2IMEIRecords;
+    kal_uint16 m_u2RecordIndex;
+    /// [OUT] MMI cache enum value index of the NVRAM cache byte
+    kal_uint16 m_u2NvramDataIndexOfMmiCacheEnumValue;
+    kal_uint16 m_u2CalFlagEnum;
+    kal_uint16 m_u2Enum;
+    FT_IMEI_DATA_T              m_rIMEIData;
+    /// [OUT] RID data structure contains RID length and buffer from target side
+    META_RID_DATA_T             m_rRIDData;
+    FT_NVRAM_SETTINGS_VERIFY_T  m_rNvramVerifyResult;
+    FT_MISC_GET_ADC_FROM_EFUSE_CNF_T        m_rGetAdcFromEfuse;
+    FT_MISC_CAL_DATA_INTEGRITY_CHECK_CNF_T  m_rCalCheckAll;
+}FT_MISC_CNF_U;
+
+typedef struct
+{
+    FT_HDR
+    FT_MISC_CMD_TYPE   type;
+    FT_MISC_CMD_U      cmd;
+
+}FT_MISC_REQ;
+
+typedef struct
+{
+    FT_HDR
+    FT_MISC_CMD_TYPE    type;
+    FT_MISC_CNF_U       result;
+    kal_uint32          status;
+}FT_MISC_CNF;
+
+#endif // #ifndef __FT_MSG_MISC_H__
diff --git a/mcu/interface/middleware/meta/ft_msg_misc_ex.h b/mcu/interface/middleware/meta/ft_msg_misc_ex.h
new file mode 100644
index 0000000..d72658a
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_misc_ex.h
@@ -0,0 +1,182 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_misc_ex.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of MISC_EX category of FT Library
+ *
+ * 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!
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __FT_MSG_MISC_EX_H__
+#define __FT_MSG_MISC_EX_H__
+#include "ft_msg_common.h"
+
+typedef enum
+{
+     FT_MISC_EX_OP_GET_ERS_SIZE = 0
+    ,FT_MISC_EX_OP_GET_ERS_DATA
+    ,FT_MISC_EX_OP_GET_ERS_COUNT
+    ,FT_MISC_EX_OP_GET_ERS_DATA_INFO_BY_INDEX
+    ,FT_MISC_EX_OP_COPY_NVRAM_TO_BP_AREA
+    ,FT_MISC_EX_OP_VERIFY_BP_AREA
+    ,FT_MISC_EX_OP_OBSOLETED1
+    ,FT_MISC_EX_OP_OBSOLETED2
+    ,FT_MISC_EX_OP_BACKUP_TO_SDS
+    ,FT_MISC_EX_OP_RAMDISK_CHECK_EXIST   /**< \brief check ram disk is existing or not */
+    ,FT_MISC_EX_OP_RAMDISK_GET_SIZE      /**< \brief get ram disk size */
+    ,FT_MISC_EX_OP_RAMDISK_READ          /**< \brief read from ram disk */
+    ,FT_MISC_EX_OP_SET_COMMAND_TO_SYSTEM /**< \brief set/clr download flag */    
+    ,FT_MISC_EX_OP_END
+}FT_MISC_EX_CMD_TYPE;
+
+
+
+typedef union
+{
+    kal_uint32 Dummy;
+    kal_int32  m_i4ErsDataIndex;
+    kal_uint8  u1BPAreaFastCheck;
+    kal_uint32 mode;
+    kal_uint32 m_u4RamDiskReqOffset;
+    kal_uint32 m_u4SetCmd2System;
+}FT_MISC_EX_CMD_U;
+
+typedef struct
+{
+   kal_uint8 sec;
+   kal_uint8 min;
+   kal_uint8 hour;
+   kal_uint8 day;
+   kal_uint8 mon;
+   kal_uint8 wday;
+   kal_uint8 year;
+}FT_MISC_EX_RCT_INFO_T;
+
+
+typedef struct
+{
+  kal_uint32 m_u4TotalSize;
+    kal_uint32 m_u4CurOffset;
+    kal_bool   m_bLastFrm;
+
+
+}FT_MISC_EX_GET_ERS_DATA_CNF_T;
+
+typedef union
+{
+
+   kal_uint32 m_u4ErsDataSize;
+   kal_int32   m_i4ErsDataCount;
+   FT_MISC_EX_GET_ERS_DATA_CNF_T  m_rErsDataFrm;
+   FT_MISC_EX_RCT_INFO_T    m_rErsDataTime;
+   kal_uint32  m_u4BPStatus;
+   kal_uint32  m_u4SDSStatus;
+   kal_uint32  m_u4RamDiskSize;
+   FT_MISC_EX_GET_ERS_DATA_CNF_T  m_rRamDiskFrm;   
+   kal_int8    m_cRamDiskExist;   
+}FT_MISC_EX_CNF_U;
+
+
+
+
+typedef struct
+{
+    FT_HDR
+    FT_MISC_EX_CMD_TYPE     type;
+    FT_MISC_EX_CMD_U     cmd;
+
+}FT_MISC_EX_REQ;
+
+typedef struct
+{
+    FT_HDR
+    FT_MISC_EX_CMD_TYPE   type;
+    kal_uint32                status;
+    FT_MISC_EX_CNF_U      result;
+}FT_MISC_EX_CNF;
+
+#endif // #ifndef __FT_MSG_MISC_EX_H__
diff --git a/mcu/interface/middleware/meta/ft_msg_mmrf.h b/mcu/interface/middleware/meta/ft_msg_mmrf.h
new file mode 100644
index 0000000..5629f23
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_mmrf.h
@@ -0,0 +1,78 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_mmrf.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of MMRF test category of FT Library
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ * 				HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ * removed!
+ * removed!
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __FT_MSG_MMRF_H__
+#define __FT_MSG_MMRF_H__
+#include "mml1_meta_if.h"
+#endif // #ifndef __FT_MSG_MMRF_H__
diff --git a/mcu/interface/middleware/meta/ft_msg_ul1rf.h b/mcu/interface/middleware/meta/ft_msg_ul1rf.h
new file mode 100644
index 0000000..c97a339
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_ul1rf.h
@@ -0,0 +1,9 @@
+#if (defined __MD93__)
+#include "ft_msg_ul1rf_gen93.h"
+#elif (defined __MD95__)
+#include "ft_msg_ul1rf_gen95.h"
+#elif (defined __MD97__) || (defined __MD97P__)
+#include "ft_msg_ul1rf_gen97.h"
+#else
+#error "[ERROR] Invalid MD generation"
+#endif
\ No newline at end of file
diff --git a/mcu/interface/middleware/meta/ft_msg_ul1rf_gen93.h b/mcu/interface/middleware/meta/ft_msg_ul1rf_gen93.h
new file mode 100644
index 0000000..f16ce08
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_ul1rf_gen93.h
@@ -0,0 +1,2120 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_ul1rf.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of UL1 RF category of FT Library
+ *
+ * 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!
+ * 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!
+ *
+ * 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!
+ *
+ * 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 __FT_MSG_UL1RF_H__
+#define __FT_MSG_UL1RF_H__
+#include "ft_msg_common.h"
+#include "ul1d_rf_public.h"
+
+#include "kal_public_defs.h"
+
+
+#define UL1TST_LNA_MODE_NUMBER_EXT 6
+
+#define UL1_DPD_FDB_NUM                    (CAL_UARFCN_SECTION * UL1_DPD_MAX_PA_LEVEL_NUM) /* refer to f_db in U_sDPD_COMMON_CAL */
+#define UL1_DPD_MAX_PTAR_TH_NUM            (CAL_UARFCN_SECTION * UL1_DPD_MAX_PA_LEVEL_NUM) /* refer to pa_idx_th in U_sDPD_COMMON_CAL */
+#define UL1_DPD_MAX_IMPLICIT_RSV_NUM       0
+#define UL1_DPD_MAX_IMPLICIT_NUM           (UL1_DPD_FDB_NUM + UL1_DPD_MAX_PTAR_TH_NUM + UL1_DPD_MAX_IMPLICIT_RSV_NUM)
+#define UL1_DPD_MAX_SET_ALL_DATA_NUM       (7)  /* floor(MMRF_MAX_TOOL_PEER_SIZE_PER_CMD / sizeof(URfTestCmd_SetDpdPaAndDpdFacCalAll_OneBand)) */
+#define UL1_DPD_MAX_GET_ALL_DATA_NUM       (UL1_DPD_MAX_SET_ALL_DATA_NUM)
+#define UL1_DPD_MAX_SET_PARTIAL_DATA_NUM   (239) /* floor(MMRF_MAX_TOOL_PEER_SIZE_PER_CMD / sizeof(URfTestCmd_SetDpdPaAndDpdFacCalPartial_OneBand)) */
+
+/*******************************************************************************
+*
+*  Message structures defined for UL1 TST Interface
+*
+*******************************************************************************/
+#if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
+
+//type1: communicate with ul1tst module, and send the confirm without waiting!
+//type2: communicate with u1ltst module, and wait their confirm, then send back to PC
+//type3: invoke UL1D's API, then send confirm to PC side.
+//type4: no operation, only get FT task's current status, and reply to PC side
+
+typedef enum
+{
+   URF_TEST_CMD_TXACCESS = 0,
+   URF_TEST_CMD_STOP = 1,
+   URF_TEST_CMD_TX_DPCH = 2,
+   URF_TEST_CMD_RX_DPCH = 3,
+   URF_TEST_CMD_RSSI = 4,
+   URF_TEST_CMD_RSCP = 5,
+   URF_TEST_CMD_AFC = 6,
+   URF_TEST_CMD_TX_PAAPC = 7,
+   URF_TEST_CMD_GET_RFID = 8,
+   URF_TEST_CMD_CONFIG_HWTPC = 9,
+   URF_TEST_CMD_GET_PWR_DT_STEP = 10,
+   URF_TEST_CMD_GET_PWR_DT_DAC = 11,
+   URF_TEST_CMD_GET_PWR_DT_DEFAULT_THR = 12,
+   URF_TEST_CMD_SET_IMMEDIATE_BSI = 13,
+   URF_TEST_CMD_GET_IMMEDIATE_BSI = 14,
+   URF_TEST_CMD_CONTINUOUS_RX = 15,
+   URF_TEST_CMD_START_FHC = 16,
+   URF_TEST_CMD_SET_TXDAC_DATA = 17,
+   URF_TEST_CMD_GET_PWR_DET_MEASURE_RES = 18,
+   URF_TEST_CMD_SET_PWR_CTRL_MODE = 19,
+   URF_TEST_CMD_REPLACE_GAIN_TABLE_FOR_CAL = 20,
+   URF_TEST_CMD_START_FHC_NO_WAIT = 21,
+   URF_TEST_CMD_GET_FHC_RESULT = 22,
+   URF_TEST_CMD_QUERY_TARGET_CAPABILITY = 23,
+   URF_TEST_CMD_START_NSFT = 24,
+   URF_TEST_CMD_GET_BIT_COUNT_FOR_SINGLE_ENDED_BER = 25,
+   URF_TEST_CMD_NSFT_SET_ILPC_STEP = 26,
+   URF_TEST_CMD_START_NSFT_EX = 27,
+   URF_TEST_CMD_SET_PA_OCT_LEVEL_DATA = 28,
+   URF_TEST_CMD_START_HSDPA_NSFT = 29,
+   URF_TEST_CMD_START_HSUPA_NSFT = 30,
+   URF_TEST_CMD_START_FHC_EX = 31,
+   URF_TEST_CMD_GET_FHC_EX_RESULT = 32,
+   URF_TEST_CMD_GET_CURRENT_LNA_MODE = 33,
+   URF_TEST_CMD_SET_CAPID = 34,
+   URF_TEST_CMD_GET_MAX_CAPID = 35,
+   URF_TEST_CMD_AFC_EX = 36,
+   URF_TEST_CMD_RSSI_RXD = 37,
+   URF_TEST_CMD_GET_CURRENT_RXD_LNA_MODE = 38,
+   URF_TEST_CMD_SET_RX_BANDWIDTH = 39,
+   URF_TEST_CMD_SET_RX_ANTENNA = 40,
+   URF_TEST_CMD_SET_TX_PA_DRIFT_COMPENSATION = 41,
+   URF_TEST_CMD_SET_ICS_CELL_POWER = 42,
+   URF_TEST_CMD_GET_RF_TEMP_BSI = 43,
+   URF_TEST_CMD_GET_RF_CAPABILITY = 44,
+   URF_TEST_CMD_START_NSFT_LIST_MODE  = 45,
+   URF_TEST_CMD_SET_RF_MIPI_CODEWORD = 46,
+   URF_TEST_CMD_GET_RF_MIPI_CODEWORD = 47,
+   URF_TEST_CMD_GET_TEMPERATURE_INFO = 48,
+   URF_TEST_CMD_RX_GAIN_SWEEP = 49,
+   URF_TEST_CMD_RELOAD_NVRAM = 50,
+   URF_TEST_CMD_CHECK_IF_FUNC_EXIST = 51,
+   URF_TEST_CMD_UBIN_MODE_SETUP = 52,
+   URF_TEST_CMD_SET_RX_PATH_LOSS = 53,
+   URF_TEST_CMD_GET_RX_PATH_LOSS = 54,
+   URF_TEST_CMD_RSSI_LPM = 55,
+   URF_TEST_CMD_RSSI_RXD_LPM = 56,
+   URF_TEST_CMD_CONTINUOUS_RX_LPM = 57,
+   URF_TEST_CMD_NSFT_GET_RSSI = 58,
+   URF_TEST_CMD_SET_RX_CALIBRATION_DATA = 59,
+   URF_TEST_CMD_GET_RX_CALIBRATION_DATA = 60,
+   URF_TEST_CMD_SET_TX_CALIBRATION_DATA = 61,
+   URF_TEST_CMD_GET_TX_CALIBRATION_DATA = 62,
+   URF_TEST_CMD_NSFT_RESET_BER_RESULT = 66,
+   URF_TEST_CMD_FHC_ELNA = 67,
+   URF_TEST_CMD_GET_RSSI_ELNA = 68,
+   URF_TEST_CMD_GET_CONTINUOUS_RSSI_ELNA = 69,
+   URF_TEST_CMD_TX_DPCH_FIX_PGA_GAIN = 70,
+   URF_TEST_CMD_GET_CALIBRATION_INFO_V3 = 71,
+   URF_TEST_CMD_START_FHC_V3 = 72,
+   URF_TEST_CMD_GET_FHC_RESULT_V3 = 73,
+   URF_TEST_CMD_GET_RSSI_V3 = 74,
+   URF_TEST_CMD_GAIN_SELECT_PWR_V3 = 75,
+   URF_TEST_CMD_GAIN_SELECT_LNA_V3 = 76,
+   URF_TEST_CMD_GET_RXTX_CALIBRATION_DATA_V3 = 77,          //after 6293
+   URF_TEST_CMD_SET_RXTX_CALIBRATION_DATA_V3 = 78,          //after 6293
+   URF_TEST_CMD_RSCP_V3 = 79,
+   URF_TEST_CMD_AFC_V3 = 80,
+   URF_TEST_CMD_AFC_CAPID_V3 = 81,
+   URF_TEST_CMD_LOW_POWER_CAL_V3 = 82,
+   URF_TEST_CMD_TRIGGER_IQ_DUMP_MODE_V3 = 88,
+   URF_TEST_CMD_GET_IQ_DUMP_RESULT_V3 = 89,
+   URF_TEST_CMD_SET_RFEQ_SUBBAND_RESULT_V3 = 90,
+/*----------------------------------------------------------------------------------------------------*/
+   URF_TEST_CMD_GP_TOOL_COMMAND_START,
+   URF_TEST_CMD_END,
+   URF_TEST_CMD_MAX                     = 0x7FFFFFFF
+} URfTestCmdType;
+typedef struct
+{
+    kal_uint16  ul_uarfcn;      /* UL uarfcn range:????Read from NVRAM?? (9612 ~ 9888) */
+    kal_uint16  dl_psc;         /* 0~511. */
+    kal_uint16  signature;      /* 0~15, for single signature decision. */
+    kal_uint8   pa_mode;        /* 0: High 1: Middle 2: Low */
+    kal_int8    init_power;     /* Assume cpich_rscp=0, ul_interference=0. */
+    kal_uint8   power_step;     /* Preamble power ramping step. 1 ~ 8dB */
+    kal_uint8   max_retrans;    /* 1~64. */
+    kal_uint16  dl_uarfcn;
+    kal_uint8   asc;
+} URfTestCmdTxAccess;
+typedef struct
+{
+    kal_uint16  ul_freq;
+    kal_int16   psc;        /* 0~511. */
+    kal_uint32  sc_code;    /* Scrambling code #. 0 ~ 16777215 */
+    kal_uint8   power_ctrl_mode;
+    kal_uint8   pa_mode;
+    kal_uint16  idx;
+    kal_uint16  afc_dac;
+    kal_uint8   dpcch_pwr;
+    kal_uint8   dpdch_pwr;
+
+    /* Below for UL1D_RF_Meta_SetTxInfo. */
+    kal_bool    no_loop_ctrl;
+
+    /* Below for setPaApcDac. */
+    kal_uint8   rf_band;
+    kal_uint8   vm1;
+    kal_uint8   vm2;
+    kal_uint16  dc2dc_dac;
+    kal_uint16  vbias_dac;
+    kal_bool    pwr_det;
+    kal_uint16  apc_dac;
+    kal_bool    pa_octlev_ctrl_used;
+} URfTestCmdTxDPCh;
+
+typedef struct
+{
+    kal_uint16  dl_freq;
+    kal_int16   psc;        /* 0~511. */
+    kal_uint8   ssc;        /* 0~15. */
+    kal_int16   ovsf;       /* 0~sf-1. */
+    kal_uint16  afc_dac;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdRxDPCh;
+#define FDD_MAX_FREQ_LIST 36
+typedef struct
+{
+    kal_uint8   num_freq;
+    kal_uint16  dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_uint8   temperature;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdRSSI;
+
+typedef struct
+{
+    kal_uint8   num_freq;
+    kal_uint16  dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_uint8   temperature;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+    kal_uint8   lpm_mode;   /* 0: normal LNA gain mode , 1: low power LNA gain mode. */
+} URfTestCmdLPMRSSI;
+
+typedef struct
+{
+    kal_uint8   num_freq;
+    kal_uint16  dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_uint16  scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_int16   settings;    //  PCC  SRX/LNA Settings
+    kal_uint8   srxcfg;
+    kal_uint8   vcocfg;
+    kal_uint8   lnaport;
+    kal_uint8   temperature;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdCARSSI;
+
+typedef struct
+{
+    kal_uint8   num_freq;
+    kal_uint16  dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_uint8   temperature;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdRxGainSweep;
+
+typedef struct
+{
+    kal_bool    pscan_before_cell_search;   /* True if UL1TST needs power scan before cell search/RSCP. */
+    kal_uint16  dl_freq;    /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+    kal_uint8   sample_num_per_cell;
+    kal_bool    read_sfn;   /* True if we need to do SFN measurement for the found cell. */
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdRSCP;
+
+typedef struct
+{
+    kal_uint16  dl_freq;    /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+} UTSTCmdRSCPV3lp;
+
+
+typedef struct
+{
+    kal_int16    dl_freq;     /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+    kal_int16    afc_dac;
+    /* Below for RF_SetBBRxParams. */
+    kal_bool     hwAGC;
+    kal_uint8    mode;        /* 0: mode0, 1: mode1. */
+    kal_int16    gain;        /* mode0. */
+    kal_uint8    LNAmode;     /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16   pga;         /* mode1. */
+} URfTestCmdAFC;
+
+typedef struct
+{
+    kal_int16    dl_freq;     /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+    kal_int16    afc_dac;
+} UTSTCmdAFCV3lp;
+
+
+typedef struct
+{
+    kal_int8     m_cRfBand;
+    kal_uint16   m_u2Idx;
+    kal_uint8    m_ucPaMode;
+    kal_uint8    m_ucVm1;
+    kal_uint8    m_ucVm2;
+    kal_uint16   m_u2DC2DC_Dac;
+    kal_uint16   m_u2Vbias_Dac;
+    kal_uint16   m_u2ApcDac;
+
+}UL1D_RF_TX_PA_APC_REQ_T;
+
+typedef struct
+{
+    //should be exactly the same as META_HWTPC_FRAME_INFO in ul1d_rf_general.h
+    kal_uint8 tpc_step;
+    kal_uint8 itp;
+    kal_uint8 rpp;
+    kal_uint8 fmt_idx;
+    kal_uint8 dl_frame_type;
+    kal_uint16 slot_mask;
+    kal_int8   tpc_cmd[15];
+    kal_uint8  beta_c;
+    kal_uint8  beta_d;
+
+}UL1D_RF_HWTPC_FRAME_INFO;
+typedef struct
+{
+    kal_uint8 pc_algo;
+    kal_uint8 tpc_used_frame; // specify the frame number
+    kal_int16 p_ini;
+
+    UL1D_RF_HWTPC_FRAME_INFO frame_info[8];
+
+}UL1D_RF_HWTPC_CONFIG_REQ_T;
+
+typedef struct
+{
+    kal_uint8 rf_band;
+
+}UL1D_RF_GET_PWR_THR_REQ_T;
+
+typedef struct
+{
+   kal_uint32          lid;      // the lid is needed to update run-time value
+   kal_uint32          eg_ptr;   // the event group pointer used to notify runt-time update finish
+} URFTestCmdReloadNVRAM;
+
+typedef struct
+{
+    kal_bool      no_loop_ctrl;
+    kal_uint16    afc_dac;
+    kal_bool      pwr_det;
+    kal_uint8     power_ctrl_mode;
+    kal_uint8     vm1[10][3];
+    kal_uint8     vm2[10][3];
+    kal_uint16    dc2dc_dac[10][3];
+    kal_uint16    vbias_dac[10][3];
+    kal_bool      init_tx_onoff;
+    kal_bool      ready_tx_onoff;
+    kal_uint8     init_pa_mode;
+    kal_uint8     ready_pa_mode;
+    kal_uint16    init_pa_gain;
+    kal_uint16    ready_pa_gain;
+    kal_uint16    init_vga_dac_tpc_idx;
+    kal_uint16    ready_vga_dac_tpc_idx;
+    kal_uint8     temperature;
+    kal_bool      hwAGC;
+    kal_int16     gain_init;
+    kal_bool      init_condition;
+    kal_uint8     step_duration;
+    kal_uint8     ready_duration;
+    kal_uint8     retune_duration;
+    kal_uint8     gain_stable_time;
+    kal_uint16    max_vga_dac;
+    kal_uint16    min_vga_dac;
+    kal_uint16    jump_vga_dac;
+    kal_uint8     freq_count;
+    kal_uint8     pwr_count;
+    kal_uint8     freq_start_idx;
+    kal_uint8     pwr_start_idx;
+    kal_uint8     odd_record;
+    kal_uint8     pa_gain_start_idx;
+    kal_uint8     pd_gain_start_idx;
+    kal_uint8     dl_band[40];
+    kal_uint8     ul_band[40];
+    kal_uint16    dl_freq[40];
+    kal_uint16    ul_freq[40];
+    kal_uint8     pa_mode[40];
+    kal_uint16    vga_dac_tpc_idx[40];
+    kal_uint16    pa_gain[40];
+    kal_uint8     pd_gain[40];
+}UL1D_RF_FHC_REQ_T;
+
+typedef struct
+{
+    kal_bool      no_loop_ctrl;
+    kal_uint16    afc_dac;
+    kal_bool      pwr_det;
+    kal_uint8     power_ctrl_mode;
+    kal_uint8     vm1[10][3];
+    kal_uint8     vm2[10][3];
+    kal_uint16    dc2dc_dac[10][3];
+    kal_uint16    vbias_dac[10][3];
+    kal_bool      init_tx_onoff;
+    kal_bool      ready_tx_onoff;
+    kal_uint8     init_pa_mode;
+    kal_uint8     ready_pa_mode;
+    kal_uint16    init_pa_gain;
+    kal_uint16    ready_pa_gain;
+    kal_uint16    init_vga_dac_tpc_idx;
+    kal_uint16    ready_vga_dac_tpc_idx;
+    kal_uint8     temperature;
+    kal_bool      hwAGC;
+    kal_int16     gain_init;
+    kal_bool      init_condition;
+    kal_uint8     step_duration;
+    kal_uint8     ready_duration;
+    kal_uint8     retune_duration;
+    kal_uint8     gain_stable_time;
+    kal_uint16    max_vga_dac;
+    kal_uint16    min_vga_dac;
+    kal_uint16    jump_vga_dac;
+    kal_uint8     freq_count;
+    kal_uint8     pwr_count;
+    kal_uint8     freq_start_idx;
+    kal_uint8     pwr_start_idx;
+    kal_uint8     odd_record;
+    kal_uint8     pa_gain_start_idx;
+    kal_uint8     pd_gain_start_idx;
+    kal_uint8     dl_band[40];
+    kal_uint8     ul_band[40];
+    kal_uint16    dl_freq[40];
+    kal_uint16    ul_freq[40];
+    kal_uint8     pa_mode[40];
+    kal_uint16    vga_dac_tpc_idx[40];
+    kal_uint16    pa_gain[40];
+    kal_uint8     pd_gain[40];
+    kal_uint8     pa_section[40];
+    kal_uint16    lna_gain[40];
+}UL1D_RF_FHC_EX_REQ_T;
+
+typedef struct
+{
+    kal_bool      no_loop_ctrl;
+    kal_uint16    afc_dac;
+    kal_bool      pwr_det;
+    kal_uint8     power_ctrl_mode;
+    kal_uint8     vm1[10][3];
+    kal_uint8     vm2[10][3];
+    kal_uint16    dc2dc_dac[10][3];
+    kal_uint16    vbias_dac[10][3];
+    kal_bool      init_tx_onoff;
+    kal_bool      ready_tx_onoff;
+    kal_uint8     init_pa_mode;
+    kal_uint8     ready_pa_mode;
+    kal_uint16    init_pa_gain;
+    kal_uint16    ready_pa_gain;
+    kal_uint16    init_vga_dac_tpc_idx;
+    kal_uint16    ready_vga_dac_tpc_idx;
+    kal_uint8     temperature;
+    kal_bool      hwAGC;
+    kal_int16     gain_init;
+    kal_bool      init_condition;
+    kal_uint8     step_duration;
+    kal_uint8     ready_duration;
+    kal_uint8     retune_duration;
+    kal_uint8     gain_stable_time;
+    kal_uint16    max_vga_dac;
+    kal_uint16    min_vga_dac;
+    kal_uint16    jump_vga_dac;
+    kal_uint8     freq_count;
+    kal_uint8     pwr_count;
+    kal_uint8     freq_start_idx;
+    kal_uint8     pwr_start_idx;
+    kal_uint8     odd_record;
+    kal_uint8     pa_gain_start_idx;
+    kal_uint8     pd_gain_start_idx;
+    kal_uint8     dl_band[40];
+    kal_uint8     ul_band[40];
+    kal_uint16    dl_freq[40];
+    kal_uint16    ul_freq[40];
+    kal_uint8     pa_mode[40];
+    kal_uint16    vga_dac_tpc_idx[40];
+    kal_uint16    pa_gain[40];
+    kal_uint8     pd_gain[40];
+    kal_uint8     pa_section[40];
+    kal_uint16    lna_gain[40];
+    kal_uint8     cal_num;
+    kal_uint8     route_setting[3];
+}UL1D_RF_FHC_EX_CA_REQ_T;
+
+typedef struct
+{
+    kal_bool        ok;
+    kal_uint8       freq_count;
+    kal_uint8       pwr_count;
+    kal_uint8       freq_start_idx;
+    kal_uint8       pwr_start_idx;
+    kal_int16       rssi[400];
+    kal_uint16      pwr_det_value[40];
+}UL1D_RF_FHC_CNF_T;
+
+typedef struct
+{
+    kal_bool     ok;
+    kal_uint8    freq_count;
+    kal_uint8    pwr_count;
+    kal_uint8    freq_start_idx;
+    kal_uint8    pwr_start_idx;
+    kal_uint8    rx_lna_mode[400];
+    kal_int16    rssi[400];
+    kal_uint16   pwr_det_value[40][3];
+/**V R8 new features */
+    kal_int16    Gbb_Offset[400];   /**< \brief TX Gbb power compensation */
+    kal_uint8    rxd_lna_mode[400]; /**< \brief Rx diversity path lna mode */
+    kal_int16    rxd_rssi[400];     /**< \brief Rx diversity path RSSI */    
+}UL1D_RF_FHC_EX_CNF_T;
+
+typedef struct
+{
+
+   kal_bool      b_afc_dac_valid;
+   kal_uint16    u2_afc_dac;
+   kal_uint8     u1_loopbackType;
+   kal_uint8     u1_frame_shift;
+   kal_uint8     u1_rmc_type;
+   kal_uint8     u1_ctfc[4];
+   kal_uint8     u1_bit_pattern;
+
+   kal_int16     i2_dl_freq;
+   kal_int16     i2_dl_psc;
+   kal_int16     i2_dl_ovsf;
+
+   kal_int16     i2_ul_freq;
+   kal_uint16    u2_ul_tfci;
+   kal_uint32    u4_ul_sc_code;
+   kal_bool      b_iq_pwr_valid;
+   kal_uint8     u1_dpcch_pwr;
+   kal_uint8     u1_dpdch_pwr;
+
+}UL1D_RF_NSFT_REQ_T;
+/**
+ * NSFT List Mode command parameter
+ */
+typedef struct
+{
+   kal_bool    afc_dac_valid;
+   kal_uint16  afc_dac;
+   kal_uint8   loopbackType;
+   kal_uint8   frame_shift;
+   kal_uint8   rmc_type;
+   kal_uint8   ctfc[4];
+   kal_uint8   bit_pattern;
+/* DL parameters */
+   kal_int16   dl_freq[50];
+   kal_int16   dl_psc;
+   kal_int16   dl_ovsf;
+/* UL parameters */
+   kal_int16   ul_freq[50];
+   kal_uint16  ul_tfci;
+   kal_uint32  ul_sc_code;
+   kal_bool    iq_pwr_valid;
+   kal_uint8   dpcch_pwr;
+   kal_uint8   dpdch_pwr;
+/* common parameters */
+   kal_uint8   valid_freq;
+   kal_uint16  test_item[50];
+/* the time settings, unit = frame */
+   kal_uint16  full_test_time;
+   kal_uint8   ready_time;
+   kal_uint8   sync_time;
+   kal_uint8   retrial;   
+   kal_uint16  test_time;
+   kal_uint16  rx_rssi_start_time[3];
+   kal_uint8   rx_rssi_duration[3];
+   kal_uint16  rx_ber_start_time;
+   kal_uint8   rx_ber_duration;
+   kal_uint16  ILPC_ABC_time;
+   kal_uint16  ILPC_EF_time;
+   kal_uint16  ILPC_GH_time;
+   kal_uint16  transition_time;
+} URfNsftListModeReq;
+/**
+ * HSPA command parameter
+ */
+typedef struct
+{
+   kal_bool      b_afc_dac_valid;
+   kal_uint16    u2_afc_dac;
+   kal_uint8     u1_loopbackType;
+   kal_uint8     u1_frame_shift;
+   kal_uint8     u1_rmc_type;
+   kal_uint8     u1_ctfc[4];
+   kal_uint8     u1_bit_pattern;
+
+   kal_int16     i2_dl_freq;
+   kal_int16     i2_dl_psc;
+   kal_int16     i2_dl_ovsf;
+
+   kal_int16     i2_ul_freq;
+   kal_uint16    u2_ul_tfci;
+   kal_uint32    u4_ul_sc_code;
+   kal_bool      b_iq_pwr_valid;
+   kal_uint8     u1_dpcch_pwr;
+   kal_uint8     u1_dpdch_pwr;
+   kal_uint8     subTest;
+}URfTestCmdHspaNsft;
+
+typedef struct
+{
+    kal_uint16 measure_count;
+} URfTestCmdGetRfTempSensor;
+
+typedef struct
+{
+    kal_bool    bDataValid;
+    kal_uint32  u4TotalBits;
+    kal_uint32  u4ErrorBits;
+}UL1D_RF_NSFT_BET_BIT_CNT_FOR_BER_CNF_T;
+
+
+typedef struct
+{
+    kal_bool    ok;
+    kal_uint8   num_freq;
+    kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_int32   rssi[ FDD_MAX_FREQ_LIST ];
+} URfTestResultRSSI;
+
+// R8 both rx path RSSI result
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   num_freq;
+   kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi_rxd[ FDD_MAX_FREQ_LIST ];
+} URfTestResultRSSIRxD;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_int32   NSFT_RSSI;
+   kal_int32   NSFT_RSSI_RXD;
+   kal_int32   cmd_location;
+}URfTestResultNSFTRSSI;
+
+typedef struct
+{
+    kal_bool    ok;
+    kal_uint8   num_freq;
+    kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_int32   inband_pow[ FDD_MAX_FREQ_LIST ];
+} URfTestResultRxGainSweep;
+
+typedef struct
+{
+    kal_uint16  psc;        /* Primary scrambling code */
+    kal_int32   tm;         /* Cell frame boundary offset to LST */
+    kal_int16   off;        /* Cell frame number offset to LST */
+    kal_bool    sttd;       /* True for STTD used. */
+    kal_uint8   sample_num;
+    kal_int16   rscp_sum;
+    kal_int16   freq_error;
+} URfTest_cpich_result_T;
+
+#define MAX_NUM_MEAS_CELL 32
+
+typedef struct
+{
+    kal_bool        ok;
+    kal_uint8       num_cell;
+    URfTest_cpich_result_T  cpich_result[ MAX_NUM_MEAS_CELL ];
+} URfTestResultRSCP;
+
+typedef struct
+{
+    kal_bool        ok;
+    kal_uint8       num_cell;
+    URfTest_cpich_result_T  cpich_result[ MAX_NUM_MEAS_CELL ];
+} UTSTestResultRSCPV3lp;
+
+typedef struct
+{
+    kal_bool       ok;
+    kal_uint16     psc;
+    kal_int32      tm;
+    kal_bool       sttd;
+    kal_uint8      rscp_sum;
+    kal_int16      freq_error;
+
+}URfTestResultAFC;
+
+typedef struct
+{
+    kal_bool       ok;
+    kal_uint16     psc;
+    kal_int32      tm;
+    kal_bool       sttd;
+    kal_uint8      rscp_sum;
+    kal_int16      freq_error;
+}UTSTestResultAFCV3lp;
+
+typedef struct
+{
+    kal_bool       ok;
+    kal_uint16     psc;
+    kal_int32      tm;
+    kal_bool       sttd;
+    kal_uint8      rscp_sum;
+    kal_int32      freq_error;
+}URfTestResultAFC_Ex;
+
+typedef struct
+{
+    kal_bool    ok;
+    kal_uint32  ber;    /* Spec requirement=10^-3. We will count 10^5 frames(100 times spec requirement) for BER calculation. Only count for the only TRCh for DPDCh. */
+} URfTestResultRxDPCh;
+
+typedef struct
+{
+    kal_uint32 m_u4Rfid;
+}URfTestResultRFID;
+
+typedef struct
+{
+    kal_uint8 m_u1Result;
+
+}URfTestResultPwrDtStep;
+
+typedef struct
+{
+    kal_uint16 m_u2Result;
+
+}URfTestResultPwrDtDac;
+
+typedef struct
+{
+    kal_uint8 m_u1Result;
+
+}URfTestResultPwrDtDefaultThr;
+
+typedef struct
+{
+    kal_bool      ok;
+    kal_int8      m_i1CurGainTableState;
+
+}URfTestResultReplaceGainTable;
+
+typedef struct
+{
+   kal_uint32      capability;
+   kal_uint32      band_support;
+   kal_uint32      rxd_band_support;   
+   kal_uint32      padrift_band_support;
+   kal_uint32      wcdma_dpd_band_support;
+}FT_UMTS_MsCapabilityEx;
+
+typedef struct
+{
+    kal_bool   ok;
+    kal_uint8  link_status;
+}FT_UMTS_NSFTLinkStatusReport;
+
+typedef struct 
+{
+    kal_bool    ok;    /*<! ok indicator */
+    kal_uint32  sum;   /*<! the sum of measure_count times of temp sensor result */
+} URfTestResultGetRfTempSensor;
+
+typedef struct
+{
+    kal_bool   ok;
+    kal_uint8  link_status;
+} URfNsftListModeCnf;
+
+typedef struct
+{
+    kal_uint16 rf_band_idx;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+} URfTestCmdSetMIPICodeWord;
+
+typedef struct
+{
+    kal_uint8  status;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+} URfTestResultGetMIPICodeWord;
+
+typedef struct
+{
+    kal_int16 status;
+    kal_int16 tadc_dac;
+    kal_int16 temperature;
+    kal_int16 temp_idx;
+} URfTestResultRfTemperatureInfo;
+
+typedef struct 
+{
+    kal_uint32      result;         // 1: support 0: not support
+    kal_uint32      query_op_code;  // query op code
+}URfCheckIfFuncExist;
+
+typedef  enum
+{
+   CNF_SUCCESS = 0,
+   CNF_GENERAL_FAIL = 1,
+   CNF_NVRAM_READ_FAIL = 2,
+   CNF_FREQ_INVALID = 3,
+   CNF_CMD_INVALID = 4,
+   CNF_NVRAM_SET_FAIL = 5,
+   CNF_TX_DATA_CHECK_FAIL = 6,
+   CNF_TX_STRUCTURE_ERROR = 7,
+   CNF_RX_STRUCTURE_ERROR = 8,
+   CNF_TX_VGA_FREQ_CHECK_FAIL=9,
+   CNF_TX_PWR_DT_FREQ_CHECK_FAIL=10,
+   CNF_GET_RXTX_PEER_BUF_OVERFLOW=11,     //after 6293
+   CNF_ADDRECORD_FAIL=12,                 //after 6293
+   CNF_GET_RXTX_PEER_BUF_ZERO=13          //after 6295
+}  NVRAM_ACCESS_RESULT_MSG;
+
+/*TX/RX calibration data------------------------------------------------------------------------------------->*/
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   error_check;         //for calibration data checking
+   kal_uint8   version_number;
+} URfTestResultCalDataProcess;      //after 6292 get/set  calibration data (confirm : local parameter) 
+/*93 get/set command optimization Cnf-----------------------------*/
+typedef struct
+{
+   kal_bool    ok;
+   NVRAM_ACCESS_RESULT_MSG   error_check;          //for calibration data checking
+   kal_uint8   rxm_result_num;                     //the number of bands to SET
+   kal_uint8   rxd_result_num;
+   kal_uint8   tx_result_num;
+   NVRAM_ACCESS_RESULT_MSG  rxm_result[5];         //result status of SET command for each band
+   NVRAM_ACCESS_RESULT_MSG  rxd_result[5];
+   NVRAM_ACCESS_RESULT_MSG  tx_result[5];
+} URfTestCmd_SetRxTxCalData_CnfParam_V3;           //Local parameter of confirm after 6293 set Rx/Tx cal data command
+
+typedef struct
+{
+   kal_bool    ok;
+   NVRAM_ACCESS_RESULT_MSG   error_check;          //for calibration data checking
+   kal_uint8   rxm_count;                          //the number of bands to GET
+   kal_uint8   rxd_count;
+   kal_uint8   tx_count;
+   kal_uint8   padding;
+   kal_uint16  rxm_offset;                         //offset of data in peer buffer
+   kal_uint16  rxd_offset;
+   kal_uint16  tx_offset;
+} URfTestCmd_GetRxTxCalData_CnfParam_V3;           //Local parameter of confirm  after 6293 get Rx/Tx cal data command
+/*93 get/set command optimization Cnf-----------------------------*/
+typedef struct
+{
+   kal_uint8   version_number;
+   kal_bool    is_uplate_to_NVRAM;  //to memory or NVRAM
+} URfTestCmdSetCalData ;            //after 6292 get/set  calibration data (command : local parameter)
+
+typedef struct
+{
+   kal_uint8   version_number; 
+} URfTestCmdGetCalData ;      //after 6292 get/set  calibration data (command : local parameter)
+/*93 get/set command optimization Req--------------------------*/
+typedef struct
+{
+   kal_uint8   rxm_band_num;                       //the number of bands to GET
+   kal_uint8   rxd_band_num;
+   kal_uint8   tx_band_num;
+   kal_uint8   rxm_band_index[5];                  //Band index 
+   kal_uint8   rxd_band_index[5];
+   kal_uint8   tx_band_index[5];
+} URfTestCmd_GetRxTxCalData_ReqParam_V3;           //Local parameter of request  after 6293 get Rx/Tx cal data command
+
+typedef struct
+{
+   kal_bool    is_uplate_to_NVRAM;                 //write to NVRAM or not
+   kal_uint8   rxm_count;                          //the number of bands to SET
+   kal_uint8   rxd_count;
+   kal_uint8   tx_count;
+   kal_uint16  rxm_offset;
+   kal_uint16  rxd_offset;
+   kal_uint16  tx_offset;
+} URfTestCmd_SetRxTxCalData_ReqParam_V3;           //Local parameter of request  after 6293 set Rx/Tx cal data command
+/*93 get/set command optimization Req--------------------------*/
+/*TX/RX calibration data<-------------------------------------------------------------------------------------*/
+
+/*RX calibration data------------------------------------------------------------------------------------->*/
+typedef  struct
+{
+   kal_uint16  uarfcn;
+   kal_int8    path_loss_HPM[UL1TST_LNA_MODE_NUMBER_EXT];
+   kal_int8    path_loss_LPM[UL1TST_LNA_MODE_NUMBER_EXT];
+} UL1D_RF_LNA_PATHLOSS;       //after 6292 LNA pathloss format
+
+typedef struct
+{
+   kal_uint8               band;
+   kal_uint8               rxantpath;  // 1: main path  ,  2 : diversity path
+   kal_int8                temper_offset[CAL_TEMP_SECTION];
+   UL1D_RF_LNA_PATHLOSS    loss_of_uarfcn[CAL_UARFCN_SECTION];
+} URfTestPathlossItem;       //after 6292 get/set RX pathloss  (confirm/command : peer buffer)
+/*RX calibration data<-------------------------------------------------------------------------------------*/
+/*RX calibration data----------6293---------------------------------------------------------------------->*/
+#define UTST_NVRAM_SIZE_V3 7
+
+typedef  struct
+{
+   kal_uint16  uarfcn;
+   kal_int16    path_loss_HPM[UTST_NVRAM_SIZE_V3];
+   kal_int16    path_loss_LPM[UTST_NVRAM_SIZE_V3];
+} UTST_LNA_PATHLOSS;       //after 6293 LNA pathloss format
+
+typedef struct
+{
+   kal_uint8               band;
+   kal_uint8               rxantpath;  // 1: main path  ,  2 : diversity path
+   kal_int8                temper_offset[CAL_TEMP_SECTION];
+   UTST_LNA_PATHLOSS    loss_of_uarfcn[CAL_UARFCN_SECTION];
+} UTSTPathlossV3;       //after 6293 get/set RX pathloss  (confirm/command : peer buffer)
+
+/*TX calibration data------------------------------------------------------------------------------------->*/
+typedef struct
+{
+   kal_uint16  start;
+   kal_uint16  end;
+} UL1D_sHYSTERESISDATA;
+
+typedef struct
+{
+   kal_uint16  level_0;
+   kal_uint16  level_1;
+} UL1D_sDC2DC;
+
+typedef struct
+{
+   kal_uint16  max_uarfcn;
+   kal_int16   pwr_offset_dB;
+   kal_int16   pwr_offset_txdac;
+} UL1D_sARFCN_SECTION;
+
+typedef struct
+{
+   kal_uint16  dc2dc_level;
+   kal_uint16  vbias_dac;
+   kal_uint8   vm1;
+   kal_uint8   vm2;
+} UL1D_sPADATA;
+
+typedef struct
+{
+   kal_uint8   pa_mode;
+   kal_int8    prf;
+   kal_uint8   dc2dc_lvl;
+   kal_uint8   vm1;
+   kal_uint8   vm2;
+   kal_uint16  vbias_dac;
+   kal_uint16  pa_gain;
+} UL1D_sPMULEVHANDLE;
+
+typedef struct
+{
+   kal_uint8            octlev_num_section;
+   kal_uint8            reserved_byte;
+   kal_uint32           pa_phase_compensation[3];
+   UL1D_sPMULEVHANDLE   pmu_level_handle[8];//8
+   kal_uint16           pa_gain_g12a;
+   kal_uint16           pa_gain_g12b;
+}UL1D_sPAOCTLVLSETTING;
+
+typedef struct
+{
+   UL1D_sPADATA         pa_data;
+   kal_uint16           vga_dac[NUMBER_OF_VGA_DAC];
+   UL1D_sARFCN_SECTION  vga_comp_by_subband[CAL_UARFCN_SECTION];
+   kal_int16            vga_comp_by_temperature[8][2];
+} UL1D_sTXPOWERDATA;
+
+typedef struct
+{
+   kal_uint8            pwr_dt_thr;
+   kal_uint8            pwr_dt_section;
+   kal_uint16           pwr_dt_dac[CAL_PWR_DETECTOR_SECTION];
+   kal_int16            pwr_dt_value[CAL_PWR_DETECTOR_SECTION];
+   UL1D_sARFCN_SECTION  pwr_dt_comp_by_subband[CAL_UARFCN_SECTION];
+   kal_int16            pwr_dt_comp_by_temperature[8][2];
+} UL1D_sPWTDTDATA;
+
+typedef struct
+{
+   UL1D_sDC2DC             pa_dc2dc;
+   UL1D_sTXPOWERDATA       power_dac[3];
+   UL1D_sHYSTERESISDATA    tx_hvsteresis[2];
+   UL1D_sPWTDTDATA         pwr_dt_data;
+} UL1D_sRAMPDATA;
+
+typedef struct
+{
+   kal_uint8               band;
+   UL1D_sRAMPDATA          txdacData;
+   UL1D_sPAOCTLVLSETTING   txPAOCTLevelData;
+} URfTestTXDaTaItem;
+
+/*******************************************************************************
+ * WCDMA DPD common
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_WCDMA_DPD_91 = 0,
+   URF_TEST_WCDMA_DPD_92 = 1,
+   URF_TEST_WCDMA_DPD_93 = 2
+   
+}URfTest_Wcdma_Dpd_Generation;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_START_DPD_FAC_CAL_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_START_DPD_INVALID               = 0,
+   URF_TEST_START_DPD_OK                    = 1,
+   URF_TEST_START_DPD_PEER_SIZE_MISMATCH    = 2,
+   URF_TEST_START_DPD_EXCEED_TTG_LIMIT_INIT = 3,
+   URF_TEST_START_DPD_EXCEED_TTG_LIMIT      = 4,
+   URF_TEST_START_DPD_NEGATIVE_PA_GAIN      = 5,
+   URF_TEST_START_DPD_LARGE_PA_GAIN_DIFF    = 6   
+
+}URfTest_StartDpdFacCal_Status;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+   kal_uint16 cal_band[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_StartDpd_ReqInfo;
+
+typedef struct
+{
+   kal_uint8  status; /* URfTest_StartDpdPaAndDpdFacCal_Status */
+   kal_uint16 curr_band_idx;    
+   kal_uint32 curr_subband_idx;
+   kal_uint32 curr_gain_idx;   
+   kal_int16  curr_pa_gain;
+   
+}URfTestCmd_StartDpd_CnfInfo;
+
+typedef struct
+{
+   kal_uint16 band_idx;
+   kal_uint16 apt_ref_channel;
+   kal_int16  tpc_wanted_p_offset;
+   
+}URfTest_AptRefChannel_OneBand;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTest_AptRefChannel_OneBand wcdma_apt_channel_info[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_StartDpdPaAndDpdFacCal_ReqPdu;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_SET_DPD_FAC_RESULT_V3 and MMRF_TEST_CMD_GET_DPD_FAC_RESULT_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_SET_DPD_INVALID            = 0,
+   URF_TEST_SET_DPD_OK                 = 1,
+   URF_TEST_SET_DPD_PEER_SIZE_MISMATCH = 2,
+   URF_TEST_SET_DPD_INVALID_BAND       = 3
+   
+}URfTest_SetDpdFacCal_Status;
+
+typedef enum
+{
+   URF_TEST_GET_DPD_INVALID            = 0,
+   URF_TEST_GET_DPD_OK                 = 1,
+   URF_TEST_GET_DPD_INVALID_BAND       = 2   
+   
+}URfTest_GetDpdFacCal_Status;
+
+typedef struct
+{
+   /* Tool can set several band in one set command */
+   kal_uint16 num_of_band;
+
+}URfTestCmd_SetDpdAll_ReqInfo;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+   kal_uint8  status; /* URfTest_SetDpdFacCal_Status */
+
+}URfTestCmd_SetDpdAll_CnfInfo;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+
+}URfTestCmd_SetDpdPartial_ReqInfo;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+   kal_uint8  status; /* URfTest_SetDpdPaAndDpdFacCal_Status */
+
+}URfTestCmd_SetDpdPartial_CnfInfo;
+
+typedef struct
+{   
+   kal_uint16           band_idx;
+   kal_uint8            dpd_cal_done;
+   kal_int16            dpd_tr[CAL_UARFCN_SECTION];
+
+   /* ramp */   
+   kal_int16            vga_comp_subband[UL1D_DPD_MAX_PA_MODE_NUM][CAL_UARFCN_SECTION];
+   kal_int16            vga_comp_temperature[UL1D_DPD_MAX_PA_MODE_NUM][UL1_DPD_MAX_PA_LEVEL_NUM];
+   UL1D_sHYSTERESISDATA tx_hysteresis[UL1D_DPD_MAX_PA_HYST_NUM];
+
+   /* paoct */
+   kal_uint8            octlev_num_section;
+   kal_uint32           pa_phase_compensation[UL1D_DPD_MAX_PA_MODE_NUM];
+   UL1D_sPMULEVHANDLE   pmu_level_handle[UL1_DPD_MAX_PA_LEVEL_NUM];
+
+}URfTest_SetGetDpd_TpcPeer;
+
+typedef struct
+{
+   kal_uint8  lut[UL1_DPD_MAX_AM_LUT_GAIN_NUM][MMDPD_MAX_AM_LUT_PWR_NUM];
+
+}URfTest_DPDAMLutSubBand;
+
+typedef struct
+{
+   kal_int8  lut[UL1_DPD_MAX_PM_LUT_GAIN_NUM][MMDPD_MAX_PM_LUT_PWR_NUM];
+
+}URfTest_DPDPMLutSubBand;
+
+typedef struct
+{
+   kal_int16               dpdImplicitArray[UL1_DPD_MAX_IMPLICIT_NUM]; /* For the parameters whose name will not be shown in cal file */	
+   URfTest_DPDAMLutSubBand am_lut_subband[CAL_UARFCN_SECTION];
+   URfTest_DPDPMLutSubBand pm_lut_subband[CAL_UARFCN_SECTION];
+
+}URfTest_SetGetDpd_DpdPeer;
+
+typedef struct
+{   
+   URfTest_SetGetDpd_TpcPeer dpdtpc_peer;
+   URfTest_SetGetDpd_DpdPeer dpd_peer;
+
+}URfTestCmd_SetDpdFacCalAll_OneBand, URfTestCmd_GetDpdFacCalAll_OneBand;
+
+typedef struct
+{
+   URfTest_SetGetDpd_TpcPeer dpdtpc_peer;
+
+}URfTestCmd_SetDpdFacCalPartial_OneBand;
+
+typedef struct
+{             
+   kal_uint16 num_of_band;
+   kal_uint16 band_idx[MAX_SUPPORTED_BAND_INDEX];
+             
+}URfTestCmd_GetDpdAll_ReqInfo;
+
+typedef struct
+{             
+   kal_uint16 num_of_band;
+   kal_uint8  get_status; /* URfTest_GetDpdPaAndDpdFacCal_Status */
+                
+}URfTestCmd_GetDpdAll_CnfInfo;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTestCmd_GetDpdFacCalAll_OneBand get_peer[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_GetDpdFacCalAll_CnfPdu;
+
+typedef struct
+{  
+   URfTestCmd_SetDpdFacCalAll_OneBand set_all_peer[MAX_SUPPORTED_BAND_INDEX];
+   
+}URfTestCmd_SetDpdFacCalAll_ReqPdu;
+
+typedef struct
+{
+   URfTestCmd_SetDpdFacCalPartial_OneBand set_partial_peer[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_SetDpdFacCalPartial_ReqPdu;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_SET_DPD_PATH_DELAY_SEARCH_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_SET_DPD_DELAY_INVALID            = 0,
+   URF_TEST_SET_DPD_DELAY_VALID              = 1,
+   URF_TEST_SET_DPD_DELAY_PEER_SIZE_MISMATCH = 2
+   
+}URfTest_SetDpdPathDelaySearchV3_Status;
+
+typedef struct
+{
+   /* Tool can set several band in one set command */
+   kal_uint16 band_num;
+
+}URfTestCmd_SetDpdPathDelaySearchV3_ReqInfo;
+
+typedef struct
+{
+   kal_uint16   rf_band;
+   kal_uint16   subband_freq[CAL_UARFCN_SECTION];
+   kal_int16    dpd_tr[CAL_UARFCN_SECTION];
+
+}URfTest_SetDpdPathDelaySearchV3_ReqPeer_OneBand;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTest_SetDpdPathDelaySearchV3_ReqPeer_OneBand dpd_one_band[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_SetDpdPathDelaySearchV3_ReqPdu;
+
+/* Confirm */
+typedef struct
+{
+   kal_uint16 band_num;
+   kal_uint16 status;
+
+}URfTestCmd_SetDpdPathDelaySearchV3_CnfInfo;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_START_DPD_PATH_DELAY_SEARCH_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_START_DPD_DELAY_INVALID       = 0,
+   URF_TEST_START_DPD_DELAY_VALID         = 1,
+   URF_TEST_START_DPD_DELAY_TIMEOUT       = 2,
+   URF_TEST_START_DPD_DELAY_SEARCH_FAILED = 3
+}URfTest_StartDpdPathDelaySearchV3_Status;
+
+/* Request */
+typedef struct
+{
+   kal_uint16 test_times;
+   kal_uint16 search_band[MAX_SUPPORTED_BAND_INDEX];
+}URfTestCmd_StartDpdPathDelaySearchV3_ReqInfo;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_GET_DPD_PATH_DELAY_SEARCH_V3
+ ******************************************************************************/
+ 
+/* Request */
+typedef struct
+{             
+   kal_uint16        band_num;
+   kal_uint16        rf_band_info[MAX_SUPPORTED_BAND_INDEX];
+   
+}URfTestCmd_GetDpdPathDelaySearchV3_ReqInfo;
+
+
+/* Confirm */
+
+typedef enum
+{
+   URF_TEST_GET_DPD_DELAY_INVALID = 0,
+   URF_TEST_GET_DPD_DELAY_VALID   = 1   
+   
+}URfTest_GetDpdPathDelaySearchV3_Status;
+
+typedef struct
+{
+   kal_uint16 band_num;
+   kal_uint16 get_status; /* URfTest_GetDpdPathDelaySearchV3_Status */
+
+}URfTestCmd_GetDpdPathDelaySearchV3_CnfInfo;
+
+typedef struct
+{
+   kal_uint16   rf_band;
+   kal_int16    dpd_tr[CAL_UARFCN_SECTION];
+
+}URfTest_GetDpdPathDelaySearchV3_CnfPeer_OneBand;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTest_GetDpdPathDelaySearchV3_CnfPeer_OneBand dpd_delay_one_band[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_GetDpdPathDelaySearchV3_CnfPdu;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_SET_DPD_FAC_RESULT_V3 and MMRF_TEST_CMD_GET_DPD_FAC_RESULT_V3
+ ******************************************************************************/
+/* Reuqest */
+typedef enum
+{
+   URF_TEST_TRAD_CAL_EXE_INVALID = 0,
+   URF_TEST_TRAD_CAL_EXE_START   = 1,
+   URF_TEST_TRAD_CAL_EXE_END     = 2
+   
+}URfTest_TradCal_Exe_Status;
+
+typedef struct
+{
+   kal_uint32 exe_status; /* URfTest_TradCal_Exe_Status */
+   
+}URfTestCmd_TradCal_ReqInfo;
+
+/* Confirm */
+typedef enum
+{
+   URF_TEST_TRAD_CAL_CMD_INVALID = 0,
+   URF_TEST_TRAD_CAL_CMD_OK      = 1
+   
+}URfTest_TradCal_Cmd_Status;
+
+typedef struct
+{
+   kal_uint32 cmd_status; /* URfTest_TradCal_Cmd_Status */
+   
+}URfTestCmd_TradCal_CnfInfo;
+
+/******************************************************************************/
+/*TX calibration data<-------------------------------------------------------------------------------------*/
+
+typedef  enum
+{
+   SETUP_FAIL_GENERAL = 0,
+   SETUP_FAIL_TCM_MISMATCH = 1,
+   SETUP_FAIL_TDD_TIMER_STILL_RUNNING = 2,
+}  UBIN_MODE_SETUP_FAIL_MSG;
+
+typedef struct
+{
+    kal_bool                ok;
+    kal_int8                setup_result;
+} URfTestResultUbinModeSetup;
+
+/************************************************************************/
+/*               New FHC Command when introduce eLNA                                                */
+/*               URF_TEST_CMD_FHC_ELNA                                                                   */
+/************************************************************************/
+typedef struct
+{
+   kal_bool    no_loop_ctrl;
+   kal_uint16  afc_dac;
+   kal_bool    pwr_det;
+   kal_uint8   power_ctrl_mode;
+   kal_uint8   vm1[10][3];
+   kal_uint8   vm2[10][3];
+   kal_uint16  dc2dc_dac[10][3];
+   kal_uint16  vbias_dac[10][3];
+   kal_uint8   temperature;
+   kal_bool    hwAGC;
+   kal_uint8   step_duration;
+   kal_uint8   freq_count;
+   kal_uint8   pwr_count;
+   kal_uint8   freq_start_idx;
+   kal_uint8   pwr_start_idx;
+   kal_uint8   pa_gain_start_idx;
+   kal_uint8   pd_gain_start_idx;
+   kal_uint8   lna_gain_start_idx;
+   kal_uint8   dl_band[40];
+   kal_uint8   ul_band[40];
+   kal_uint16  dl_freq[40];
+   kal_uint16  ul_freq[40];
+   kal_uint8   pd_gain[40];
+   kal_uint8   pa_mode[40];
+   kal_uint16  vga_dac_tpc_idx[40];
+   kal_uint16  pa_gain[40];
+   kal_uint8   pa_section[40];
+   kal_uint16  rx_lna_gain[40];
+   kal_uint16  rxd_lna_gain[40];
+   kal_uint8   fix_pga_gain[40];
+   kal_uint8   is_lpm[40];
+}URfTestCmdFHCeLNAPB;
+
+typedef struct
+{
+    kal_bool                ok;
+} URfTestResultFHCeLNALP;
+/*---------------------------------------------------------------------*/
+
+/***********************************************************************/
+/*       New RSSI Command when introduce eLNA                                                      */
+/*       URF_TEST_CMD_GET_RSSI_ELNA                                                                 */
+/***********************************************************************/
+typedef struct
+{
+   kal_uint8   num_freq;
+   kal_uint16  dl_freq[36];
+   kal_uint8   temperature;
+   kal_bool    hwAGC;
+   kal_uint8   mode;
+   kal_int16   rx_gain;
+   kal_uint8   rx_LNAmode;
+   kal_uint16  rx_pga;
+   kal_int16   rxd_gain;
+   kal_uint8   rxd_LNAmode;
+   kal_uint16  rxd_pga;
+   kal_uint8   antenna_path;
+   kal_bool    is_cal;
+   kal_uint8   lpm_mode;
+}URfTestCmdRSSIeLNAPB;
+
+typedef struct
+{
+    kal_bool                ok;
+} URfTestResultRSSIeLNALP;
+
+typedef struct
+{
+   kal_uint8   num_freq;
+   kal_uint16  dl_freq[36];
+   kal_int32   rx_rssi[36];
+   kal_int32   rxd_rssi[36];
+   kal_uint8   rx_LNAmode[36];
+   kal_uint8   rxd_LNAmode[36];
+}URfTestResultRSSIeLNAPB;
+/*---------------------------------------------------------------------*/
+/***********************************************************************/
+/*       TX SUPPORT Command FIX RF PGA GAIN                                                    */
+/*       URF_TEST_CMD_TX_DPCH_FIX_PGA_GAIN                                                   */
+/***********************************************************************/
+typedef enum
+{
+   UL1TST_NO_PGA_ABILITY = 0, 
+   UL1TST_FIX_PGA_GAIN_12B = 1, 
+   UL1TST_FIX_PGA_GAIN_12A = 2, 
+   UL1TST_PGA_ALGO_ENABLE = 3,
+   UL1TST_PGA_FEATURE_DEFAULT_STATE = UL1TST_PGA_ALGO_ENABLE
+}UL1TST_FIX_PGA_GAIN_T;
+
+typedef struct
+{
+   UL1TST_FIX_PGA_GAIN_T   ul1tst_fix_pga_gain;
+/*    
+         0 : no need fix
+         1 : fix PGA 12A
+         2 : fix PGA 12B
+ */
+}URfTestCmdDPCHTXFIXPGAPB;
+
+typedef struct
+{
+    kal_bool                ok;
+}URfTestResultDPCHTXFIXPGALP;
+/*------------------------------6293 Get FHC Information from TST---------------------------------------*/
+#define UL1TST_HPM_POINT_V3 7
+#define UL1TST_LPM_POINT_V3 4
+#define UL1TST_WCDMA_BAND_SUPPORT 5
+
+typedef struct
+{
+   kal_uint8 calibration_band_number;
+   kal_uint8 calibration_band[UL1TST_WCDMA_BAND_SUPPORT];         // band 1 : band index = 0
+} UTSTReqGetCalInfoV3lp;  // request local parameter
+
+typedef enum
+{
+   UTST_ELNA_OFF=0,
+   UTST_ELNA_ALWAYS_ON,
+   UTST_ELNA_ALWAYS_ON_2ND_SAW,
+   UTST_ELNA_BYPASS,
+   UTST_ELNA_BYPASS_2ND_SAW
+}UTST_ELNA_E;
+
+
+typedef struct
+{
+   kal_uint8   band;
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+   kal_uint8   cal_point_hpm;
+   kal_uint8   cal_point_lpm;
+   kal_uint8   rx_cal_sequency[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];
+   kal_uint8   rx_elna_bypass[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];
+   kal_uint8   rxd_elna_bypass[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];
+   kal_int16   rx_cal_dl_power_min[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];  //s.5
+   kal_int16   rx_cal_dl_power_max[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];  //s.5
+   kal_int16   rx_cal_dl_power[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];      //s.5
+}UTSTCnfGetCalInfoV3pb;                                                     //band unit : dynamic size
+typedef struct
+{
+   kal_uint8 support_band_number;
+}UTSTCnfGetCalInfoV3lp; // conform local parameter
+
+/*------------------------------6293 START FHC---------------------------------------*/
+#define UL1TST_FHC_FREQUENCY_NUMBER  15
+
+typedef struct
+{
+   kal_uint8   ok;
+   kal_uint8   error_code;
+}UTSTCnfFHCeLNAV3lp;
+
+typedef struct
+{
+   kal_uint8   cal_band_number;
+   kal_uint8   cal_band[UL1TST_WCDMA_BAND_SUPPORT];
+   kal_uint8   antenna_setting;
+   kal_uint8   step_duration;
+}UTSTReqFHCeLNAV3lp;
+
+typedef struct
+{
+/*common*/
+   kal_uint8   band;
+   kal_uint8   freq_count;
+   kal_uint8   pwr_count;
+   kal_uint8   hpm_cal_point;
+   kal_uint8   lpm_cal_point;
+/*RX*/
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+   kal_uint8   is_lpm[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+   kal_uint8   rx_elna_bypass[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+   kal_uint8   rxd_elna_bypass[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+   kal_uint8   rx_cal_sequency[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+/*TX*/
+   kal_uint8   fix_pga_gain[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+   kal_uint8   pa_mode[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+   kal_uint8   vga_dac_tpc_idx[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+   kal_uint8   pa_section[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+   kal_uint16  pa_gain[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+/*RX*/
+   kal_int16  rx_cal_dl_power[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+/*UARFCN*/
+   kal_uint16  dl_uarfcn[UL1TST_FHC_FREQUENCY_NUMBER];
+   kal_uint16  ul_uarfcn[UL1TST_FHC_FREQUENCY_NUMBER];
+/*Initial file data*/
+   URfTestTXDaTaItem    tx_cal_data_info;
+   UTSTPathlossV3       rx_cal_data_info;
+   UTSTPathlossV3       rxd_cal_data_info;
+}UTSTReqFHCeLNAV3pb;    //band unit  it depends on local parameter cal band number expend to array
+
+/*------------------------------6293 GET FHC RESULT----------------------------------------*/
+typedef struct
+{
+   kal_uint16     ul_uarfcn;
+   kal_int16      pd_value_h;
+   kal_int16      pd_value_m;
+   kal_int16      pd_value_l;
+} UL1TST_FHC_PD_RESULT_INFO ;
+
+typedef struct
+{
+   kal_uint16  dl_uarfcn;
+   kal_int16   hpm_rssi[UL1TST_HPM_POINT_V3];
+   kal_int16   lpm_rssi[UL1TST_LPM_POINT_V3];
+} UL1TST_FHC_PATHLOSS_RESULT_INFO ;
+
+typedef struct
+{
+   kal_uint8                        band;
+   UL1TST_FHC_PD_RESULT_INFO        pd_result[UL1TST_FHC_FREQUENCY_NUMBER];
+   UL1TST_FHC_PATHLOSS_RESULT_INFO  rx_rssi_result[UL1TST_FHC_FREQUENCY_NUMBER];
+   UL1TST_FHC_PATHLOSS_RESULT_INFO  rxd_rssi_result[UL1TST_FHC_FREQUENCY_NUMBER];
+} UTSTCnfGetFHCResultV3pb ;     //band unit
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   band_number;      // indicate how many band's report in peer buffer
+} UTSTCnfGetFHCResultV3lp;
+/*for 93-95 co-file , "Gen":stand for any generation*/
+typedef UTSTCnfGetFHCResultV3pb UTSTCnfGetFHCResultGenpb;
+/*-----------------------------6293 GET RSSI-----------------------------------------*/
+typedef struct
+{
+   kal_bool    hwAGC;
+   kal_bool    rx_elna_bypass;
+   kal_bool    rxd_elna_bypass;
+   kal_bool    conti_rssi;
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+   kal_uint8   temperature;
+   kal_uint8   antenna_path;
+   kal_uint8   lpm_mode;
+   kal_uint16  uarfcn;
+   kal_uint16  rx_rf_gain;
+   kal_uint16  rxd_rf_gain;
+   kal_uint16  rx_digital_gain;
+   kal_uint16  rxd_digital_gain;
+} UTSTReqGetRSSIV3lp;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   rx_elna_bypass;
+   kal_uint8   rxd_elna_bypass;
+   kal_uint8   rx_lna_mode;
+   kal_uint8   rxd_lna_mode;
+   kal_uint16  uarfcn;
+   kal_int16   rx_rssi;
+   kal_int16   rxd_rssi;
+   kal_uint16  rx_used_gain;
+   kal_uint16  rxd_used_gain;
+} UTSTCnfGetRSSIV3lp;
+/*for 93-95 co-file , "Gen":stand for any generation*/
+typedef UTSTCnfGetRSSIV3lp UTSTCnfGetRSSIGenlp;
+/*-----------------------------6293 power to gain-----------------------------------------*/
+typedef struct
+{
+   kal_bool    rx_elna_bypass;
+   kal_bool    rxd_elna_bypass;
+   kal_uint8   antenna_path;
+   kal_uint8   lpm_mode;
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+   kal_uint8   rx_cal_sequency;
+   kal_int16   rx_dl_power;
+} UTSTReqPwrtoGainV3lp;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint16  rx_digital_gain;
+   kal_uint16  rxd_digital_gain;
+   kal_uint16  rx_rf_gain;
+   kal_uint16  rxd_rf_gain;
+}UTSTCnfPwrtoGainV3lp;
+
+/*-----------------------------6293 lna to gain-----------------------------------------*/
+typedef struct
+{
+   kal_bool    rx_elna_bypass;
+   kal_bool    rxd_elna_bypass;
+   kal_uint8   band;
+   kal_uint8   antenna_path;
+   kal_uint8   lpm_mode;
+   kal_uint8   rx_lna_mode;
+   kal_uint8   rxd_lna_mode;
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+} UTSTReqLnatoGainV3lp;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint16  rx_digital_gain;
+   kal_uint16  rxd_digital_gain;
+   kal_uint16  rx_rf_gain;
+   kal_uint16  rxd_rf_gain;
+   kal_int16   dl_power;
+}UTSTCnfLnatoGainV3lp;
+
+/*----------------------------------------------------------------------*/
+/*-----------------------------6293 PGA AB CAL-----------------------------------------*/
+typedef struct
+{
+   UL1TST_FIX_PGA_GAIN_T   ul1tst_fix_pga_gain;
+   kal_bool                is_calibration;
+}UTSTCmdLPCal;
+
+typedef struct
+{
+   kal_bool    ok;
+}UTSTResultLPCal;
+
+/*----------------------------------------------------------------------*/
+/*-----------------------------6293 ATE tool T-put-----------------------------------------*/
+//trigger IQ dump
+typedef struct
+{
+   kal_uint16   enable_iq_dump;              //enable or disable IQ dump mode.
+   kal_uint16   ant_idx;                 //0=RX main antenna, 1=RX diversity antenna.
+}UTSTReqTriggerIqDumpModeV3lp;  // request local parameter
+
+typedef struct
+{
+   kal_uint16   dump_status;             //1=enable IQ dump mode successfully
+}UTSTCnfTriggerIqDumpModeV3lp; // conform local parameter
+
+//get IQ dump result
+typedef struct
+{
+   kal_uint16   is_data_ready;           //1=IQ raw data is ready
+   kal_uint16   data_section_length;     //length of IQ raw data in corresponding peer buffer
+}UTSTCnfGetIqDumpResultV3lp; // confirm local parameter
+
+typedef struct
+{
+   kal_int16   i_data;
+   kal_int16   q_data;
+}UTSTCnfGetIqDumpResultV3pb;// confirm peer buffer :RFEQ unit 
+//set RFEQ
+typedef struct
+{
+   kal_uint16   rfeq_set_num; //number of subband RFEQ to update
+}UTSTReqSetRfeqSubbandV3lp;   // request local parameter
+
+typedef struct
+{
+   kal_uint16    band;                   //UMTS band
+   kal_uint16    subband_idx;            //which sub-band that user want to fill
+   kal_uint16    max_uarfcn;             //max uarfcn of this subband
+   kal_uint8     ant_idx;                //which antenna should be write in this command. 0: RX Main, 1:RX Div
+   kal_bool      rfeq_enable;            //RFEQ enable or not. 
+   kal_int16     rfeq_coef_real[7];      //RFEQ real part coefficient. 7 taps.
+   kal_int16     rfeq_coef_imag[7];      //RFEQ image part coefficient. 7 taps. 	
+}UTSTReqSetRfeqSubbandV3pb;  // request peer buffer : subband unit
+
+typedef struct
+{
+   kal_uint16   is_rfeq_set;             //1=RFEQ is set to NVRAM successfully
+}UTSTCnfSetRfeqSubbandV3lp; // confirm local parameter
+
+
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+   URfTestCmdType   urf_test_cmd_type;
+   void           (*handler)( ilm_struct* );
+}UL1TST_RF_TEST_HANDLER_T;
+/* ------------------------------------------------------------------------------------------- *\
+|*                                                   U_RESET_BIT_COUNT                                                                             *|
+\* ------------------------------------------------------------------------------------------- */
+
+typedef struct
+{
+   kal_uint32  meaningless;
+} URFTestCmdResetBERResult;
+
+typedef struct
+{
+   kal_bool ok;
+   kal_uint32  u4TotalBits;
+   kal_uint32  u4ErrorBits;
+} URFTestResultResetBERResult;
+/*---------------------------------------------------------------------------------------------*/
+typedef union
+{
+   kal_uint8                                 m_u1RfBand;
+   kal_uint8                                 m_u1PwrCtrlMode;
+   kal_uint8                                 m_u1TableType;                // 1: special table for calibration, 2: normal table
+   kal_uint8                                 m_u1ILPCStep;
+   kal_uint16                                m_u2TxPclIndex;
+   kal_uint16                                rf_band_idx;
+/* PA drift compensation */
+   kal_uint8                                 is_PaDrift;                   /*R8< \brief the parameter to UL1 for PA drift compensation setting (1: turn on, 0: turn off) */
+/* R8 RF tool */
+   kal_uint8                                 is_5mhz;
+   kal_uint8                                 is_main;
+   kal_uint32                                m_rBSIData;
+   kal_uint32                                m_rBSIAddr;
+/* DCXO development */
+   kal_uint32                                m_u4CapId;
+/* WM Switch */
+   kal_uint8                                 ubin_fdd_mode_init;           //  1 : UBIN mode Init 3G FDD ,      0 : UBIN mode de-init 3G FDD
+   URfTestCmdAFC                             afc;
+   URfTestCmdRSCP                            rscp;
+   URfTestCmdType                            query_op_code;
+   URfTestCmdTxDPCh                          txdpch;
+   URfTestCmdRxDPCh                          rxdpch;
+   URfTestCmdTxAccess                        txaccess;
+   URFTestCmdReloadNVRAM                     reload;
+   URfTestCmdSetMIPICodeWord                 set_mipi_cw_param;
+   URfTestCmdGetRfTempSensor                 rfTemperature;
+   UL1D_RF_TX_PA_APC_REQ_T                   m_rTxPaApc;
+   UL1D_RF_GET_PWR_THR_REQ_T                 m_rGetPwrThr;
+   kal_int32                                 m_i4IcsCellPower;             /**< \brief pass cell power to UL1 to choose the best initial gain for ICS */
+   URFTestCmdResetBERResult                  resetBERResult;
+   URfTestCmdSetCalData                      set_cal_data_command_lp;      //after 6292
+   URfTestCmdGetCalData                      get_cal_data_command_lp;      //after 6292
+   UTSTReqGetCalInfoV3lp                     get_cal_info_v3_lp;           //6293 get FHC infomation from RFD & FEC
+   UTSTReqFHCeLNAV3lp                        fhc_control_v3_lp;            //6293 FHC flow control infomation
+   UTSTReqGetRSSIV3lp                        get_rssi_v3_lp;               //6293 RF tool RSSI
+   UTSTReqPwrtoGainV3lp                      pwr_to_gain_v3_lp;            //6293 Tradk, NSFT
+   UTSTReqLnatoGainV3lp                      lna_to_gain_v3_lp;            //6293 RF tool get RSSI calculator
+   URfTestCmd_SetRxTxCalData_ReqParam_V3     set_RxTx_cal_data_command_lp;  //after6293
+   URfTestCmd_GetRxTxCalData_ReqParam_V3     get_RxTx_cal_data_command_lp;  //after6293
+   UTSTCmdRSCPV3lp                           rscp_v3_lp;
+   UTSTCmdAFCV3lp                            afc_v3_lp;
+   UTSTCmdLPCal                              pga_type_v3_lp;
+   UTSTReqTriggerIqDumpModeV3lp              trigger_iq_dump_v3_lp;    //Trigger IQ dump
+   UTSTReqSetRfeqSubbandV3lp                 set_rfeq_subband_v3_lp;   //Set RFEQ subband result
+}URfTestCmdParam;
+
+typedef union
+{
+   kal_bool                                  ok;
+   kal_uint8                                 nvramAccessResult;
+   kal_uint8                                 currentLnaMode;
+   kal_int16                                 m_u2PwrDetResult;
+   kal_uint32                                bsi_data;
+   kal_uint32                                m_u4MaxCapId;
+   FT_UMTS_MsCapabilityEx                    m_rTargetCapability;
+   FT_UMTS_NSFTLinkStatusReport              m_rNSFTLinkStatusReport;
+   URfNsftListModeCnf                        m_rNSFTListModeLinkStatusReport;
+   UL1D_RF_NSFT_BET_BIT_CNT_FOR_BER_CNF_T    m_rNSFTBERResult;
+   URfTestResultAFC                          afc;
+   URfTestResultRFID                         rfid;
+   URfCheckIfFuncExist                       CheckIfFuncExist;
+   URfTestResultAFC_Ex                       afc_ex;
+   URfTestResultRxDPCh                       rx_dpch;
+   URfTestResultPwrDtDac                     pwr_dt_dac;
+   URfTestResultPwrDtStep                    pwr_dt_step;
+   URfTestResultGetRfTempSensor              rfTemperature;
+   URfTestResultGetMIPICodeWord              get_mipi_cw_param;
+   URfTestResultPwrDtDefaultThr              pwr_dt_default_thr;
+   URfTestResultReplaceGainTable             replace_gain_table;
+   URfTestResultRfTemperatureInfo            rfTemperatureInfo;
+   URfTestResultUbinModeSetup                ubin_mode_setup_result;
+   URfTestResultNSFTRSSI                     ft_rpt_nsft_rssi;                   /*for getting RSSI value during NSFT*/
+   URFTestResultResetBERResult               resetBERResult;
+   URfTestResultCalDataProcess               cal_data_process_result_lp;         //after 6292
+   URfTestResultDPCHTXFIXPGALP               dpch_tx_fix_pga_gain_lp;
+   URfTestResultFHCeLNALP                    fhc_elna_result_lp;
+   URfTestResultRSSIeLNALP                   rssi_elna;
+   UTSTCnfGetCalInfoV3lp                     cnf_get_cal_info_v3_lp;          //6293 get calibration information
+   UTSTCnfFHCeLNAV3lp                        cnf_fhc_control_v3_lp;           //6293 FHC flow control infomation
+   UTSTCnfGetFHCResultV3lp                   cnf_fhc_report_v3_lp;            //6293 fhc report
+   UTSTCnfGetRSSIV3lp                        cnf_get_rssi_v3_lp;              //6293 RF tool RSSI
+   UTSTCnfPwrtoGainV3lp                      cnf_pwr_to_gain_v3_lp;           //6293 Tradk, NSFT
+   UTSTCnfLnatoGainV3lp                      cnf_lna_to_gain_v3_lp;           //6293 RF tool get RSSI calculator
+   URfTestCmd_SetRxTxCalData_CnfParam_V3     set_RxTx_cal_data_process_result_lp; //after 6293
+   URfTestCmd_GetRxTxCalData_CnfParam_V3     get_RxTx_cal_data_process_result_lp; //after 6293
+   UTSTResultLPCal                           cnf_pga_type_v3_lp;
+   UTSTCnfTriggerIqDumpModeV3lp              cnf_trigger_iq_dump_v3_lp;     //Trigger IQ dump
+   UTSTCnfGetIqDumpResultV3lp                cnf_get_iq_data_v3_lp;         //Get IQ dump result
+   UTSTCnfSetRfeqSubbandV3lp                 cnf_set_rfeq_subband_v3_lp;    //Set RFEQ subband result
+} URfTestResultParam;
+
+typedef struct
+{
+    FT_HDR
+    URfTestCmdType     type;
+    URfTestCmdParam    param;
+} ft_urf_test_req_T;
+
+typedef struct
+{
+    FT_HDR
+    URfTestCmdType     type;
+    URfTestResultParam param;
+} ft_urf_test_cnf_T;
+
+typedef ft_urf_test_req_T ft_to_ul1tst_struct;
+typedef ft_urf_test_cnf_T ul1tst_to_ft_struct;
+
+typedef ft_urf_test_req_T ft_urf_test_req_id_struct;
+typedef ft_urf_test_cnf_T ft_urf_test_cnf_id_struct;
+
+#endif  // #if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
+
+#endif // #ifndef __FT_MSG_UL1RF_H__
diff --git a/mcu/interface/middleware/meta/ft_msg_ul1rf_gen95.h b/mcu/interface/middleware/meta/ft_msg_ul1rf_gen95.h
new file mode 100644
index 0000000..7919bd4
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_ul1rf_gen95.h
@@ -0,0 +1,2348 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_ul1rf.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of UL1 RF category of FT Library
+ *
+ * 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!
+ * 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!
+ *
+ * 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!
+ *
+ * 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!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __FT_MSG_UL1RF_H__
+#define __FT_MSG_UL1RF_H__
+#include "ft_msg_common.h"
+#include "ul1d_rf_public.h"
+
+#include "kal_public_defs.h"
+
+
+#define UL1TST_LNA_MODE_NUMBER_EXT 6
+
+#define UL1_DPD_FDB_NUM                    (CAL_UARFCN_SECTION * UL1_DPD_MAX_PA_LEVEL_NUM) /* refer to f_db in U_sDPD_COMMON_CAL */
+#define UL1_DPD_MAX_PTAR_TH_NUM            (CAL_UARFCN_SECTION * UL1_DPD_MAX_PA_LEVEL_NUM) /* refer to pa_idx_th in U_sDPD_COMMON_CAL */
+#define UL1_DPD_MAX_IMPLICIT_RSV_NUM       0
+#define UL1_DPD_MAX_IMPLICIT_NUM           (UL1_DPD_FDB_NUM + UL1_DPD_MAX_PTAR_TH_NUM + UL1_DPD_MAX_IMPLICIT_RSV_NUM)
+#define UL1_DPD_MAX_SET_ALL_DATA_NUM       (7)  /* floor(MMRF_MAX_TOOL_PEER_SIZE_PER_CMD / sizeof(URfTestCmd_SetDpdPaAndDpdFacCalAll_OneBand)) */
+#define UL1_DPD_MAX_GET_ALL_DATA_NUM       (UL1_DPD_MAX_SET_ALL_DATA_NUM)
+#define UL1_DPD_MAX_SET_PARTIAL_DATA_NUM   (239) /* floor(MMRF_MAX_TOOL_PEER_SIZE_PER_CMD / sizeof(URfTestCmd_SetDpdPaAndDpdFacCalPartial_OneBand)) */
+
+/*******************************************************************************
+*
+*  Message structures defined for UL1 TST Interface
+*
+*******************************************************************************/
+#if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
+
+//type1: communicate with ul1tst module, and send the confirm without waiting!
+//type2: communicate with u1ltst module, and wait their confirm, then send back to PC
+//type3: invoke UL1D's API, then send confirm to PC side.
+//type4: no operation, only get FT task's current status, and reply to PC side
+
+typedef enum
+{
+   URF_TEST_CMD_TXACCESS = 0,
+   URF_TEST_CMD_STOP = 1,
+   URF_TEST_CMD_TX_DPCH = 2,
+   URF_TEST_CMD_RX_DPCH = 3,
+   URF_TEST_CMD_RSSI = 4,
+   URF_TEST_CMD_RSCP = 5,
+   URF_TEST_CMD_AFC = 6,
+   URF_TEST_CMD_TX_PAAPC = 7,
+   URF_TEST_CMD_GET_RFID = 8,
+   URF_TEST_CMD_CONFIG_HWTPC = 9,
+   URF_TEST_CMD_GET_PWR_DT_STEP = 10,
+   URF_TEST_CMD_GET_PWR_DT_DAC = 11,
+   URF_TEST_CMD_GET_PWR_DT_DEFAULT_THR = 12,
+   URF_TEST_CMD_SET_IMMEDIATE_BSI = 13,
+   URF_TEST_CMD_GET_IMMEDIATE_BSI = 14,
+   URF_TEST_CMD_CONTINUOUS_RX = 15,
+   URF_TEST_CMD_START_FHC = 16,
+   URF_TEST_CMD_SET_TXDAC_DATA = 17,
+   URF_TEST_CMD_GET_PWR_DET_MEASURE_RES = 18,
+   URF_TEST_CMD_SET_PWR_CTRL_MODE = 19,
+   URF_TEST_CMD_REPLACE_GAIN_TABLE_FOR_CAL = 20,
+   URF_TEST_CMD_START_FHC_NO_WAIT = 21,
+   URF_TEST_CMD_GET_FHC_RESULT = 22,
+   URF_TEST_CMD_QUERY_TARGET_CAPABILITY = 23,
+   URF_TEST_CMD_START_NSFT = 24,
+   URF_TEST_CMD_GET_BIT_COUNT_FOR_SINGLE_ENDED_BER = 25,
+   URF_TEST_CMD_NSFT_SET_ILPC_STEP = 26,
+   URF_TEST_CMD_START_NSFT_EX = 27,
+   URF_TEST_CMD_SET_PA_OCT_LEVEL_DATA = 28,
+   URF_TEST_CMD_START_HSDPA_NSFT = 29,
+   URF_TEST_CMD_START_HSUPA_NSFT = 30,
+   URF_TEST_CMD_START_FHC_EX = 31,
+   URF_TEST_CMD_GET_FHC_EX_RESULT = 32,
+   URF_TEST_CMD_GET_CURRENT_LNA_MODE = 33,
+   URF_TEST_CMD_SET_CAPID = 34,
+   URF_TEST_CMD_GET_MAX_CAPID = 35,
+   URF_TEST_CMD_AFC_EX = 36,
+   URF_TEST_CMD_RSSI_RXD = 37,
+   URF_TEST_CMD_GET_CURRENT_RXD_LNA_MODE = 38,
+   URF_TEST_CMD_SET_RX_BANDWIDTH = 39,
+   URF_TEST_CMD_SET_RX_ANTENNA = 40,
+   URF_TEST_CMD_SET_TX_PA_DRIFT_COMPENSATION = 41,
+   URF_TEST_CMD_SET_ICS_CELL_POWER = 42,
+   URF_TEST_CMD_GET_RF_TEMP_BSI = 43,
+   URF_TEST_CMD_GET_RF_CAPABILITY = 44,
+   URF_TEST_CMD_START_NSFT_LIST_MODE  = 45,
+   URF_TEST_CMD_SET_RF_MIPI_CODEWORD = 46,
+   URF_TEST_CMD_GET_RF_MIPI_CODEWORD = 47,
+   URF_TEST_CMD_GET_TEMPERATURE_INFO = 48,
+   URF_TEST_CMD_RX_GAIN_SWEEP = 49,
+   URF_TEST_CMD_RELOAD_NVRAM = 50,
+   URF_TEST_CMD_CHECK_IF_FUNC_EXIST = 51,
+   URF_TEST_CMD_UBIN_MODE_SETUP = 52,
+   URF_TEST_CMD_SET_RX_PATH_LOSS = 53,
+   URF_TEST_CMD_GET_RX_PATH_LOSS = 54,
+   URF_TEST_CMD_RSSI_LPM = 55,
+   URF_TEST_CMD_RSSI_RXD_LPM = 56,
+   URF_TEST_CMD_CONTINUOUS_RX_LPM = 57,
+   URF_TEST_CMD_NSFT_GET_RSSI = 58,
+   URF_TEST_CMD_SET_RX_CALIBRATION_DATA = 59,
+   URF_TEST_CMD_GET_RX_CALIBRATION_DATA = 60,
+   URF_TEST_CMD_SET_TX_CALIBRATION_DATA = 61,
+   URF_TEST_CMD_GET_TX_CALIBRATION_DATA = 62,
+   URF_TEST_CMD_NSFT_RESET_BER_RESULT = 66,
+   URF_TEST_CMD_FHC_ELNA = 67,
+   URF_TEST_CMD_GET_RSSI_ELNA = 68,
+   URF_TEST_CMD_GET_CONTINUOUS_RSSI_ELNA = 69,
+   URF_TEST_CMD_TX_DPCH_FIX_PGA_GAIN = 70,
+   URF_TEST_CMD_GET_CALIBRATION_INFO_V3 = 71,
+   URF_TEST_CMD_START_FHC_V3 = 72,
+   URF_TEST_CMD_GET_FHC_RESULT_V3 = 73,
+   URF_TEST_CMD_GET_RSSI_V3 = 74,
+   URF_TEST_CMD_GAIN_SELECT_PWR_V3 = 75,
+   URF_TEST_CMD_GAIN_SELECT_LNA_V3 = 76,
+   URF_TEST_CMD_GET_RXTX_CALIBRATION_DATA_V3 = 77,          //after 6293
+   URF_TEST_CMD_SET_RXTX_CALIBRATION_DATA_V3 = 78,          //after 6293
+   URF_TEST_CMD_RSCP_V3 = 79,
+   URF_TEST_CMD_AFC_V3 = 80,
+   URF_TEST_CMD_AFC_CAPID_V3 = 81,
+   URF_TEST_CMD_LOW_POWER_CAL_V3 = 82,
+   URF_TEST_CMD_GET_CALIBRATION_INFO_V5 = 83,               //after 6295
+   URF_TEST_CMD_START_FHC_V5 = 84,                          //after 6295
+   URF_TEST_CMD_GET_FHC_RESULT_V5 = 85,                     //after 6295
+   URF_TEST_CMD_GET_RXTX_CALIBRATION_DATA_V5 = 86,          //after 6295
+   URF_TEST_CMD_SET_RXTX_CALIBRATION_DATA_V5 = 87,          //after 6295
+   URF_TEST_CMD_TRIGGER_IQ_DUMP_MODE_V3 = 88,               //support 6293 Auto IQ dump
+   URF_TEST_CMD_GET_IQ_DUMP_RESULT_V3 = 89,                 //support 6293 Auto IQ dump
+   URF_TEST_CMD_SET_RFEQ_SUBBAND_RESULT_V3 = 90,            //support 6293 Auto IQ dump
+   URF_TEST_CMD_GET_RSSI_V5 = 91,                           //after 6295
+   URF_TEST_CMD_GAIN_SELECT_PWR_V5 = 92,                    //after 6295
+   URF_TEST_CMD_GAIN_SELECT_LNA_V5 = 93,                    //after 6295
+   URF_TEST_CMD_GET_TX_POWER_OFFSET_V5 =94,                 //after 6295
+   URF_TEST_CMD_SET_TX_POWER_OFFSET_V5 =95,                 //after 6295
+/*----------------------------------------------------------------------------------------------------*/
+   URF_TEST_CMD_GP_TOOL_COMMAND_START,
+   URF_TEST_CMD_END,
+   URF_TEST_CMD_MAX                     = 0x7FFFFFFF
+} URfTestCmdType;
+typedef struct
+{
+    kal_uint16  ul_uarfcn;      /* UL uarfcn range:????Read from NVRAM?? (9612 ~ 9888) */
+    kal_uint16  dl_psc;         /* 0~511. */
+    kal_uint16  signature;      /* 0~15, for single signature decision. */
+    kal_uint8   pa_mode;        /* 0: High 1: Middle 2: Low */
+    kal_int8    init_power;     /* Assume cpich_rscp=0, ul_interference=0. */
+    kal_uint8   power_step;     /* Preamble power ramping step. 1 ~ 8dB */
+    kal_uint8   max_retrans;    /* 1~64. */
+    kal_uint16  dl_uarfcn;
+    kal_uint8   asc;
+} URfTestCmdTxAccess;
+typedef struct
+{
+    kal_uint16  ul_freq;
+    kal_int16   psc;        /* 0~511. */
+    kal_uint32  sc_code;    /* Scrambling code #. 0 ~ 16777215 */
+    kal_uint8   power_ctrl_mode;
+    kal_uint8   pa_mode;
+    kal_uint16  idx;
+    kal_uint16  afc_dac;
+    kal_uint8   dpcch_pwr;
+    kal_uint8   dpdch_pwr;
+
+    /* Below for UL1D_RF_Meta_SetTxInfo. */
+    kal_bool    no_loop_ctrl;
+
+    /* Below for setPaApcDac. */
+    kal_uint8   rf_band;
+    kal_uint8   vm1;
+    kal_uint8   vm2;
+    kal_uint16  dc2dc_dac;
+    kal_uint16  vbias_dac;
+    kal_bool    pwr_det;
+    kal_uint16  apc_dac;
+    kal_bool    pa_octlev_ctrl_used;
+} URfTestCmdTxDPCh;
+
+typedef struct
+{
+    kal_uint16  dl_freq;
+    kal_int16   psc;        /* 0~511. */
+    kal_uint8   ssc;        /* 0~15. */
+    kal_int16   ovsf;       /* 0~sf-1. */
+    kal_uint16  afc_dac;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdRxDPCh;
+#define FDD_MAX_FREQ_LIST 36
+typedef struct
+{
+    kal_uint8   num_freq;
+    kal_uint16  dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_uint8   temperature;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdRSSI;
+
+typedef struct
+{
+    kal_uint8   num_freq;
+    kal_uint16  dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_uint8   temperature;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+    kal_uint8   lpm_mode;   /* 0: normal LNA gain mode , 1: low power LNA gain mode. */
+} URfTestCmdLPMRSSI;
+
+typedef struct
+{
+    kal_uint8   num_freq;
+    kal_uint16  dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_uint16  scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_int16   settings;    //  PCC  SRX/LNA Settings
+    kal_uint8   srxcfg;
+    kal_uint8   vcocfg;
+    kal_uint8   lnaport;
+    kal_uint8   temperature;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdCARSSI;
+
+typedef struct
+{
+    kal_uint8   num_freq;
+    kal_uint16  dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_uint8   temperature;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdRxGainSweep;
+
+typedef struct
+{
+    kal_bool    pscan_before_cell_search;   /* True if UL1TST needs power scan before cell search/RSCP. */
+    kal_uint16  dl_freq;    /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+    kal_uint8   sample_num_per_cell;
+    kal_bool    read_sfn;   /* True if we need to do SFN measurement for the found cell. */
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdRSCP;
+
+typedef struct
+{
+    kal_uint16  dl_freq;    /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+} UTSTCmdRSCPV3lp;
+
+
+typedef struct
+{
+    kal_int16    dl_freq;     /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+    kal_int16    afc_dac;
+    /* Below for RF_SetBBRxParams. */
+    kal_bool     hwAGC;
+    kal_uint8    mode;        /* 0: mode0, 1: mode1. */
+    kal_int16    gain;        /* mode0. */
+    kal_uint8    LNAmode;     /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16   pga;         /* mode1. */
+} URfTestCmdAFC;
+
+typedef struct
+{
+    kal_int16    dl_freq;     /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+    kal_int16    afc_dac;
+} UTSTCmdAFCV3lp;
+
+
+typedef struct
+{
+    kal_int8     m_cRfBand;
+    kal_uint16   m_u2Idx;
+    kal_uint8    m_ucPaMode;
+    kal_uint8    m_ucVm1;
+    kal_uint8    m_ucVm2;
+    kal_uint16   m_u2DC2DC_Dac;
+    kal_uint16   m_u2Vbias_Dac;
+    kal_uint16   m_u2ApcDac;
+
+}UL1D_RF_TX_PA_APC_REQ_T;
+
+typedef struct
+{
+    //should be exactly the same as META_HWTPC_FRAME_INFO in ul1d_rf_general.h
+    kal_uint8 tpc_step;
+    kal_uint8 itp;
+    kal_uint8 rpp;
+    kal_uint8 fmt_idx;
+    kal_uint8 dl_frame_type;
+    kal_uint16 slot_mask;
+    kal_int8   tpc_cmd[15];
+    kal_uint8  beta_c;
+    kal_uint8  beta_d;
+
+}UL1D_RF_HWTPC_FRAME_INFO;
+typedef struct
+{
+    kal_uint8 pc_algo;
+    kal_uint8 tpc_used_frame; // specify the frame number
+    kal_int16 p_ini;
+
+    UL1D_RF_HWTPC_FRAME_INFO frame_info[8];
+
+}UL1D_RF_HWTPC_CONFIG_REQ_T;
+
+typedef struct
+{
+    kal_uint8 rf_band;
+
+}UL1D_RF_GET_PWR_THR_REQ_T;
+
+typedef struct
+{
+   kal_uint32          lid;      // the lid is needed to update run-time value
+   kal_uint32          eg_ptr;   // the event group pointer used to notify runt-time update finish
+} URFTestCmdReloadNVRAM;
+
+typedef struct
+{
+    kal_bool      no_loop_ctrl;
+    kal_uint16    afc_dac;
+    kal_bool      pwr_det;
+    kal_uint8     power_ctrl_mode;
+    kal_uint8     vm1[10][3];
+    kal_uint8     vm2[10][3];
+    kal_uint16    dc2dc_dac[10][3];
+    kal_uint16    vbias_dac[10][3];
+    kal_bool      init_tx_onoff;
+    kal_bool      ready_tx_onoff;
+    kal_uint8     init_pa_mode;
+    kal_uint8     ready_pa_mode;
+    kal_uint16    init_pa_gain;
+    kal_uint16    ready_pa_gain;
+    kal_uint16    init_vga_dac_tpc_idx;
+    kal_uint16    ready_vga_dac_tpc_idx;
+    kal_uint8     temperature;
+    kal_bool      hwAGC;
+    kal_int16     gain_init;
+    kal_bool      init_condition;
+    kal_uint8     step_duration;
+    kal_uint8     ready_duration;
+    kal_uint8     retune_duration;
+    kal_uint8     gain_stable_time;
+    kal_uint16    max_vga_dac;
+    kal_uint16    min_vga_dac;
+    kal_uint16    jump_vga_dac;
+    kal_uint8     freq_count;
+    kal_uint8     pwr_count;
+    kal_uint8     freq_start_idx;
+    kal_uint8     pwr_start_idx;
+    kal_uint8     odd_record;
+    kal_uint8     pa_gain_start_idx;
+    kal_uint8     pd_gain_start_idx;
+    kal_uint8     dl_band[40];
+    kal_uint8     ul_band[40];
+    kal_uint16    dl_freq[40];
+    kal_uint16    ul_freq[40];
+    kal_uint8     pa_mode[40];
+    kal_uint16    vga_dac_tpc_idx[40];
+    kal_uint16    pa_gain[40];
+    kal_uint8     pd_gain[40];
+}UL1D_RF_FHC_REQ_T;
+
+typedef struct
+{
+    kal_bool      no_loop_ctrl;
+    kal_uint16    afc_dac;
+    kal_bool      pwr_det;
+    kal_uint8     power_ctrl_mode;
+    kal_uint8     vm1[10][3];
+    kal_uint8     vm2[10][3];
+    kal_uint16    dc2dc_dac[10][3];
+    kal_uint16    vbias_dac[10][3];
+    kal_bool      init_tx_onoff;
+    kal_bool      ready_tx_onoff;
+    kal_uint8     init_pa_mode;
+    kal_uint8     ready_pa_mode;
+    kal_uint16    init_pa_gain;
+    kal_uint16    ready_pa_gain;
+    kal_uint16    init_vga_dac_tpc_idx;
+    kal_uint16    ready_vga_dac_tpc_idx;
+    kal_uint8     temperature;
+    kal_bool      hwAGC;
+    kal_int16     gain_init;
+    kal_bool      init_condition;
+    kal_uint8     step_duration;
+    kal_uint8     ready_duration;
+    kal_uint8     retune_duration;
+    kal_uint8     gain_stable_time;
+    kal_uint16    max_vga_dac;
+    kal_uint16    min_vga_dac;
+    kal_uint16    jump_vga_dac;
+    kal_uint8     freq_count;
+    kal_uint8     pwr_count;
+    kal_uint8     freq_start_idx;
+    kal_uint8     pwr_start_idx;
+    kal_uint8     odd_record;
+    kal_uint8     pa_gain_start_idx;
+    kal_uint8     pd_gain_start_idx;
+    kal_uint8     dl_band[40];
+    kal_uint8     ul_band[40];
+    kal_uint16    dl_freq[40];
+    kal_uint16    ul_freq[40];
+    kal_uint8     pa_mode[40];
+    kal_uint16    vga_dac_tpc_idx[40];
+    kal_uint16    pa_gain[40];
+    kal_uint8     pd_gain[40];
+    kal_uint8     pa_section[40];
+    kal_uint16    lna_gain[40];
+}UL1D_RF_FHC_EX_REQ_T;
+
+typedef struct
+{
+    kal_bool      no_loop_ctrl;
+    kal_uint16    afc_dac;
+    kal_bool      pwr_det;
+    kal_uint8     power_ctrl_mode;
+    kal_uint8     vm1[10][3];
+    kal_uint8     vm2[10][3];
+    kal_uint16    dc2dc_dac[10][3];
+    kal_uint16    vbias_dac[10][3];
+    kal_bool      init_tx_onoff;
+    kal_bool      ready_tx_onoff;
+    kal_uint8     init_pa_mode;
+    kal_uint8     ready_pa_mode;
+    kal_uint16    init_pa_gain;
+    kal_uint16    ready_pa_gain;
+    kal_uint16    init_vga_dac_tpc_idx;
+    kal_uint16    ready_vga_dac_tpc_idx;
+    kal_uint8     temperature;
+    kal_bool      hwAGC;
+    kal_int16     gain_init;
+    kal_bool      init_condition;
+    kal_uint8     step_duration;
+    kal_uint8     ready_duration;
+    kal_uint8     retune_duration;
+    kal_uint8     gain_stable_time;
+    kal_uint16    max_vga_dac;
+    kal_uint16    min_vga_dac;
+    kal_uint16    jump_vga_dac;
+    kal_uint8     freq_count;
+    kal_uint8     pwr_count;
+    kal_uint8     freq_start_idx;
+    kal_uint8     pwr_start_idx;
+    kal_uint8     odd_record;
+    kal_uint8     pa_gain_start_idx;
+    kal_uint8     pd_gain_start_idx;
+    kal_uint8     dl_band[40];
+    kal_uint8     ul_band[40];
+    kal_uint16    dl_freq[40];
+    kal_uint16    ul_freq[40];
+    kal_uint8     pa_mode[40];
+    kal_uint16    vga_dac_tpc_idx[40];
+    kal_uint16    pa_gain[40];
+    kal_uint8     pd_gain[40];
+    kal_uint8     pa_section[40];
+    kal_uint16    lna_gain[40];
+    kal_uint8     cal_num;
+    kal_uint8     route_setting[3];
+}UL1D_RF_FHC_EX_CA_REQ_T;
+
+typedef struct
+{
+    kal_bool        ok;
+    kal_uint8       freq_count;
+    kal_uint8       pwr_count;
+    kal_uint8       freq_start_idx;
+    kal_uint8       pwr_start_idx;
+    kal_int16       rssi[400];
+    kal_uint16      pwr_det_value[40];
+}UL1D_RF_FHC_CNF_T;
+
+typedef struct
+{
+    kal_bool     ok;
+    kal_uint8    freq_count;
+    kal_uint8    pwr_count;
+    kal_uint8    freq_start_idx;
+    kal_uint8    pwr_start_idx;
+    kal_uint8    rx_lna_mode[400];
+    kal_int16    rssi[400];
+    kal_uint16   pwr_det_value[40][3];
+/**V R8 new features */
+    kal_int16    Gbb_Offset[400];   /**< \brief TX Gbb power compensation */
+    kal_uint8    rxd_lna_mode[400]; /**< \brief Rx diversity path lna mode */
+    kal_int16    rxd_rssi[400];     /**< \brief Rx diversity path RSSI */    
+}UL1D_RF_FHC_EX_CNF_T;
+
+typedef struct
+{
+
+   kal_bool      b_afc_dac_valid;
+   kal_uint16    u2_afc_dac;
+   kal_uint8     u1_loopbackType;
+   kal_uint8     u1_frame_shift;
+   kal_uint8     u1_rmc_type;
+   kal_uint8     u1_ctfc[4];
+   kal_uint8     u1_bit_pattern;
+
+   kal_int16     i2_dl_freq;
+   kal_int16     i2_dl_psc;
+   kal_int16     i2_dl_ovsf;
+
+   kal_int16     i2_ul_freq;
+   kal_uint16    u2_ul_tfci;
+   kal_uint32    u4_ul_sc_code;
+   kal_bool      b_iq_pwr_valid;
+   kal_uint8     u1_dpcch_pwr;
+   kal_uint8     u1_dpdch_pwr;
+
+}UL1D_RF_NSFT_REQ_T;
+/**
+ * NSFT List Mode command parameter
+ */
+typedef struct
+{
+   kal_bool    afc_dac_valid;
+   kal_uint16  afc_dac;
+   kal_uint8   loopbackType;
+   kal_uint8   frame_shift;
+   kal_uint8   rmc_type;
+   kal_uint8   ctfc[4];
+   kal_uint8   bit_pattern;
+/* DL parameters */
+   kal_int16   dl_freq[50];
+   kal_int16   dl_psc;
+   kal_int16   dl_ovsf;
+/* UL parameters */
+   kal_int16   ul_freq[50];
+   kal_uint16  ul_tfci;
+   kal_uint32  ul_sc_code;
+   kal_bool    iq_pwr_valid;
+   kal_uint8   dpcch_pwr;
+   kal_uint8   dpdch_pwr;
+/* common parameters */
+   kal_uint8   valid_freq;
+   kal_uint16  test_item[50];
+/* the time settings, unit = frame */
+   kal_uint16  full_test_time;
+   kal_uint8   ready_time;
+   kal_uint8   sync_time;
+   kal_uint8   retrial;   
+   kal_uint16  test_time;
+   kal_uint16  rx_rssi_start_time[3];
+   kal_uint8   rx_rssi_duration[3];
+   kal_uint16  rx_ber_start_time;
+   kal_uint8   rx_ber_duration;
+   kal_uint16  ILPC_ABC_time;
+   kal_uint16  ILPC_EF_time;
+   kal_uint16  ILPC_GH_time;
+   kal_uint16  transition_time;
+} URfNsftListModeReq;
+/**
+ * HSPA command parameter
+ */
+typedef struct
+{
+   kal_bool      b_afc_dac_valid;
+   kal_uint16    u2_afc_dac;
+   kal_uint8     u1_loopbackType;
+   kal_uint8     u1_frame_shift;
+   kal_uint8     u1_rmc_type;
+   kal_uint8     u1_ctfc[4];
+   kal_uint8     u1_bit_pattern;
+
+   kal_int16     i2_dl_freq;
+   kal_int16     i2_dl_psc;
+   kal_int16     i2_dl_ovsf;
+
+   kal_int16     i2_ul_freq;
+   kal_uint16    u2_ul_tfci;
+   kal_uint32    u4_ul_sc_code;
+   kal_bool      b_iq_pwr_valid;
+   kal_uint8     u1_dpcch_pwr;
+   kal_uint8     u1_dpdch_pwr;
+   kal_uint8     subTest;
+}URfTestCmdHspaNsft;
+
+typedef struct
+{
+    kal_uint16 measure_count;
+} URfTestCmdGetRfTempSensor;
+
+typedef struct
+{
+    kal_bool    bDataValid;
+    kal_uint32  u4TotalBits;
+    kal_uint32  u4ErrorBits;
+}UL1D_RF_NSFT_BET_BIT_CNT_FOR_BER_CNF_T;
+
+
+typedef struct
+{
+    kal_bool    ok;
+    kal_uint8   num_freq;
+    kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_int32   rssi[ FDD_MAX_FREQ_LIST ];
+} URfTestResultRSSI;
+
+// R8 both rx path RSSI result
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   num_freq;
+   kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi_rxd[ FDD_MAX_FREQ_LIST ];
+} URfTestResultRSSIRxD;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_int32   NSFT_RSSI;
+   kal_int32   NSFT_RSSI_RXD;
+   kal_int32   cmd_location;
+}URfTestResultNSFTRSSI;
+
+typedef struct
+{
+    kal_bool    ok;
+    kal_uint8   num_freq;
+    kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_int32   inband_pow[ FDD_MAX_FREQ_LIST ];
+} URfTestResultRxGainSweep;
+
+typedef struct
+{
+    kal_uint16  psc;        /* Primary scrambling code */
+    kal_int32   tm;         /* Cell frame boundary offset to LST */
+    kal_int16   off;        /* Cell frame number offset to LST */
+    kal_bool    sttd;       /* True for STTD used. */
+    kal_uint8   sample_num;
+    kal_int16   rscp_sum;
+    kal_int16   freq_error;
+} URfTest_cpich_result_T;
+
+#define MAX_NUM_MEAS_CELL 32
+
+typedef struct
+{
+    kal_bool        ok;
+    kal_uint8       num_cell;
+    URfTest_cpich_result_T  cpich_result[ MAX_NUM_MEAS_CELL ];
+} URfTestResultRSCP;
+
+typedef struct
+{
+    kal_bool        ok;
+    kal_uint8       num_cell;
+    URfTest_cpich_result_T  cpich_result[ MAX_NUM_MEAS_CELL ];
+} UTSTestResultRSCPV3lp;
+
+typedef struct
+{
+    kal_bool       ok;
+    kal_uint16     psc;
+    kal_int32      tm;
+    kal_bool       sttd;
+    kal_uint8      rscp_sum;
+    kal_int16      freq_error;
+
+}URfTestResultAFC;
+
+typedef struct
+{
+    kal_bool       ok;
+    kal_uint16     psc;
+    kal_int32      tm;
+    kal_bool       sttd;
+    kal_uint8      rscp_sum;
+    kal_int16      freq_error;
+}UTSTestResultAFCV3lp;
+
+typedef struct
+{
+    kal_bool       ok;
+    kal_uint16     psc;
+    kal_int32      tm;
+    kal_bool       sttd;
+    kal_uint8      rscp_sum;
+    kal_int32      freq_error;
+}URfTestResultAFC_Ex;
+
+typedef struct
+{
+    kal_bool    ok;
+    kal_uint32  ber;    /* Spec requirement=10^-3. We will count 10^5 frames(100 times spec requirement) for BER calculation. Only count for the only TRCh for DPDCh. */
+} URfTestResultRxDPCh;
+
+typedef struct
+{
+    kal_uint32 m_u4Rfid;
+}URfTestResultRFID;
+
+typedef struct
+{
+    kal_uint8 m_u1Result;
+
+}URfTestResultPwrDtStep;
+
+typedef struct
+{
+    kal_uint16 m_u2Result;
+
+}URfTestResultPwrDtDac;
+
+typedef struct
+{
+    kal_uint8 m_u1Result;
+
+}URfTestResultPwrDtDefaultThr;
+
+typedef struct
+{
+    kal_bool      ok;
+    kal_int8      m_i1CurGainTableState;
+
+}URfTestResultReplaceGainTable;
+
+typedef struct
+{
+   kal_uint32      capability;
+   kal_uint32      band_support;
+   kal_uint32      rxd_band_support;   
+   kal_uint32      padrift_band_support;
+   kal_uint32      wcdma_dpd_band_support;
+}FT_UMTS_MsCapabilityEx;
+
+typedef struct
+{
+    kal_bool   ok;
+    kal_uint8  link_status;
+}FT_UMTS_NSFTLinkStatusReport;
+
+typedef struct 
+{
+    kal_bool    ok;    /*<! ok indicator */
+    kal_uint32  sum;   /*<! the sum of measure_count times of temp sensor result */
+} URfTestResultGetRfTempSensor;
+
+typedef struct
+{
+    kal_bool   ok;
+    kal_uint8  link_status;
+} URfNsftListModeCnf;
+
+typedef struct
+{
+    kal_uint16 rf_band_idx;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+} URfTestCmdSetMIPICodeWord;
+
+typedef struct
+{
+    kal_uint8  status;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+} URfTestResultGetMIPICodeWord;
+
+typedef struct
+{
+    kal_int16 status;
+    kal_int16 tadc_dac;
+    kal_int16 temperature;
+    kal_int16 temp_idx;
+} URfTestResultRfTemperatureInfo;
+
+typedef struct 
+{
+    kal_uint32      result;         // 1: support 0: not support
+    kal_uint32      query_op_code;  // query op code
+}URfCheckIfFuncExist;
+
+typedef  enum
+{
+   CNF_SUCCESS = 0,
+   CNF_GENERAL_FAIL = 1,
+   CNF_NVRAM_READ_FAIL = 2,
+   CNF_FREQ_INVALID = 3,
+   CNF_CMD_INVALID = 4,
+   CNF_NVRAM_SET_FAIL = 5,
+   CNF_TX_DATA_CHECK_FAIL = 6,
+   CNF_TX_STRUCTURE_ERROR = 7,
+   CNF_RX_STRUCTURE_ERROR = 8,
+   CNF_TX_VGA_FREQ_CHECK_FAIL=9,
+   CNF_TX_PWR_DT_FREQ_CHECK_FAIL=10,
+   CNF_GET_RXTX_PEER_BUF_OVERFLOW=11,     //after 6293
+   CNF_ADDRECORD_FAIL=12,                 //after 6293
+   CNF_GET_RXTX_PEER_BUF_ZERO=13          //after 6295
+}  NVRAM_ACCESS_RESULT_MSG;
+
+/*TX/RX calibration data------------------------------------------------------------------------------------->*/
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   error_check;         //for calibration data checking
+   kal_uint8   version_number;
+} URfTestResultCalDataProcess;      //after 6292 get/set  calibration data (confirm : local parameter)
+/*95 get/set command optimization Cnf-----------------------------*/
+typedef struct
+{
+   kal_bool    ok;
+   NVRAM_ACCESS_RESULT_MSG   error_check;          //for calibration data checking
+   kal_uint8   rxm_result_num;                     //the number of bands to SET
+   kal_uint8   rxd_result_num;
+   kal_uint8   tx_result_num;
+   NVRAM_ACCESS_RESULT_MSG  rxm_result[8];         //result status of SET command for each band
+   NVRAM_ACCESS_RESULT_MSG  rxd_result[8];
+   NVRAM_ACCESS_RESULT_MSG  tx_result[8];
+} URfTestCmd_SetRxTxCalData_CnfParam_V5;           //Local parameter of confirm after 6295 set Rx/Tx cal data command
+
+typedef struct
+{
+   kal_bool    ok;
+   NVRAM_ACCESS_RESULT_MSG   error_check;          //for calibration data checking
+   kal_uint8   rxm_count;                          //the number of bands to GET
+   kal_uint8   rxd_count;
+   kal_uint8   tx_count;
+   kal_uint8   padding;
+   kal_uint16  rxm_offset;                         //offset of data in peer buffer
+   kal_uint16  rxd_offset;
+   kal_uint16  tx_offset;
+} URfTestCmd_GetRxTxCalData_CnfParam_V5;           //Local parameter of confirm  after 6295 get Rx/Tx cal data command 
+///*93 get/set command optimization Cnf-----------------------------*/
+//typedef struct
+//{
+//   kal_bool    ok;
+//   NVRAM_ACCESS_RESULT_MSG   error_check;          //for calibration data checking
+//   kal_uint8   rxm_result_num;                     //the number of bands to SET
+//   kal_uint8   rxd_result_num;
+//   kal_uint8   tx_result_num;
+//   NVRAM_ACCESS_RESULT_MSG  rxm_result[5];         //result status of SET command for each band
+//   NVRAM_ACCESS_RESULT_MSG  rxd_result[5];
+//   NVRAM_ACCESS_RESULT_MSG  tx_result[5];
+//} URfTestCmd_SetRxTxCalData_CnfParam_V3;           //Local parameter of confirm after 6293 set Rx/Tx cal data command
+//
+//typedef struct
+//{
+//   kal_bool    ok;
+//   NVRAM_ACCESS_RESULT_MSG   error_check;          //for calibration data checking
+//   kal_uint8   rxm_count;                          //the number of bands to GET
+//   kal_uint8   rxd_count;
+//   kal_uint8   tx_count;
+//   kal_uint8   padding;
+//   kal_uint16  rxm_offset;                         //offset of data in peer buffer
+//   kal_uint16  rxd_offset;
+//   kal_uint16  tx_offset;
+//} URfTestCmd_GetRxTxCalData_CnfParam_V3;           //Local parameter of confirm  after 6293 get Rx/Tx cal data command
+///*93 get/set command optimization Cnf-----------------------------*/
+typedef struct
+{
+   kal_uint8   version_number;
+   kal_bool    is_uplate_to_NVRAM;  //to memory or NVRAM
+} URfTestCmdSetCalData ;            //after 6292 get/set  calibration data (command : local parameter)
+
+typedef struct
+{
+   kal_uint8   version_number; 
+} URfTestCmdGetCalData ;      //after 6292 get/set  calibration data (command : local parameter)
+/*95 get/set command optimization Req--------------------------*/
+typedef struct
+{
+   kal_uint8   rxm_band_num;                       //the number of bands to GET
+   kal_uint8   rxd_band_num;
+   kal_uint8   tx_band_num;
+   kal_uint8   rxm_band_index[8];                  //Band index 
+   kal_uint8   rxd_band_index[8];
+   kal_uint8   tx_band_index[8];
+} URfTestCmd_GetRxTxCalData_ReqParam_V5;           //Local parameter of request  after 6295 get Rx/Tx cal data command
+
+typedef struct
+{
+   kal_bool    is_uplate_to_NVRAM;                 //write to NVRAM or not
+   kal_uint8   rxm_count;                          //the number of bands to SET
+   kal_uint8   rxd_count;
+   kal_uint8   tx_count;
+   kal_uint16  rxm_offset;
+   kal_uint16  rxd_offset;
+   kal_uint16  tx_offset;
+} URfTestCmd_SetRxTxCalData_ReqParam_V5;           //Local parameter of request  after 6295 set Rx/Tx cal data command
+///*93 get/set command optimization Req--------------------------*/
+//typedef struct
+//{
+//   kal_uint8   rxm_band_num;                       //the number of bands to GET
+//   kal_uint8   rxd_band_num;
+//   kal_uint8   tx_band_num;
+//   kal_uint8   rxm_band_index[5];                  //Band index 
+//   kal_uint8   rxd_band_index[5];
+//   kal_uint8   tx_band_index[5];
+//} URfTestCmd_GetRxTxCalData_ReqParam_V3;           //Local parameter of request  after 6293 get Rx/Tx cal data command
+//
+//typedef struct
+//{
+//   kal_bool    is_uplate_to_NVRAM;                 //write to NVRAM or not
+//   kal_uint8   rxm_count;                          //the number of bands to SET
+//   kal_uint8   rxd_count;
+//   kal_uint8   tx_count;
+//   kal_uint16  rxm_offset;
+//   kal_uint16  rxd_offset;
+//   kal_uint16  tx_offset;
+//} URfTestCmd_SetRxTxCalData_ReqParam_V3;           //Local parameter of request  after 6293 set Rx/Tx cal data command
+///*93 get/set command optimization Req--------------------------*/
+/*TX/RX calibration data<-------------------------------------------------------------------------------------*/
+
+/*RX calibration data------------------------------------------------------------------------------------->*/
+typedef  struct
+{
+   kal_uint16  uarfcn;
+   kal_int8    path_loss_HPM[UL1TST_LNA_MODE_NUMBER_EXT];
+   kal_int8    path_loss_LPM[UL1TST_LNA_MODE_NUMBER_EXT];
+} UL1D_RF_LNA_PATHLOSS;       //after 6292 LNA pathloss format
+
+typedef struct
+{
+   kal_uint8               band;
+   kal_uint8               rxantpath;  // 1: main path  ,  2 : diversity path
+   kal_int8                temper_offset[CAL_TEMP_SECTION];
+   UL1D_RF_LNA_PATHLOSS    loss_of_uarfcn[CAL_UARFCN_SECTION];
+} URfTestPathlossItem;       //after 6292 get/set RX pathloss  (confirm/command : peer buffer)
+/*RX calibration data<-------------------------------------------------------------------------------------*/
+/*RX calibration data----------6293---------------------------------------------------------------------->*/
+#define UTST_NVRAM_SIZE_V3 7
+
+typedef  struct
+{
+   kal_uint16  uarfcn;
+   kal_int16    path_loss_HPM[UTST_NVRAM_SIZE_V3];
+   kal_int16    path_loss_LPM[UTST_NVRAM_SIZE_V3];
+} UTST_LNA_PATHLOSS;       //after 6293 LNA pathloss format
+
+typedef struct
+{
+   kal_uint8               band;
+   kal_uint8               rxantpath;  // 1: main path  ,  2 : diversity path
+   kal_int8                temper_offset[CAL_TEMP_SECTION];
+   UTST_LNA_PATHLOSS    loss_of_uarfcn[CAL_UARFCN_SECTION];
+} UTSTPathlossV3;       //after 6293 get/set RX pathloss  (confirm/command : peer buffer)
+
+/*TX calibration data------------------------------------------------------------------------------------->*/
+typedef struct
+{
+   kal_uint16  start;
+   kal_uint16  end;
+} UL1D_sHYSTERESISDATA;
+
+typedef struct
+{
+   kal_uint16  level_0;
+   kal_uint16  level_1;
+} UL1D_sDC2DC;
+
+typedef struct
+{
+   kal_uint16  max_uarfcn;
+   kal_int16   pwr_offset_dB;
+   kal_int16   pwr_offset_txdac;
+} UL1D_sARFCN_SECTION;
+
+typedef struct
+{
+   kal_uint16  dc2dc_level;
+   kal_uint16  vbias_dac;
+   kal_uint8   vm1;
+   kal_uint8   vm2;
+} UL1D_sPADATA;
+
+typedef struct
+{
+   kal_uint8   pa_mode;
+   kal_int8    prf;
+   kal_uint8   dc2dc_lvl;
+   kal_uint8   vm1;
+   kal_uint8   vm2;
+   kal_uint16  vbias_dac;
+   kal_uint16  pa_gain;
+} UL1D_sPMULEVHANDLE;
+
+typedef struct
+{
+   kal_uint8            octlev_num_section;
+   kal_uint8            reserved_byte;
+   kal_uint32           pa_phase_compensation[3];
+   UL1D_sPMULEVHANDLE   pmu_level_handle[8];//8
+   kal_uint16           pa_gain_g12a;
+   kal_uint16           pa_gain_g12b;
+}UL1D_sPAOCTLVLSETTING;
+
+typedef struct
+{
+   UL1D_sPADATA         pa_data;
+   kal_uint16           vga_dac[NUMBER_OF_VGA_DAC];
+   UL1D_sARFCN_SECTION  vga_comp_by_subband[CAL_UARFCN_SECTION];
+   kal_int16            vga_comp_by_temperature[8][2];
+} UL1D_sTXPOWERDATA;
+
+typedef struct
+{
+   kal_uint8            pwr_dt_thr;
+   kal_uint8            pwr_dt_section;
+   kal_uint16           pwr_dt_dac[CAL_PWR_DETECTOR_SECTION];
+   kal_int16            pwr_dt_value[CAL_PWR_DETECTOR_SECTION];
+   UL1D_sARFCN_SECTION  pwr_dt_comp_by_subband[CAL_UARFCN_SECTION];
+   kal_int16            pwr_dt_comp_by_temperature[8][2];
+} UL1D_sPWTDTDATA;
+
+typedef struct
+{
+   UL1D_sDC2DC             pa_dc2dc;
+   UL1D_sTXPOWERDATA       power_dac[3];
+   UL1D_sHYSTERESISDATA    tx_hvsteresis[2];
+   UL1D_sPWTDTDATA         pwr_dt_data;
+} UL1D_sRAMPDATA;
+
+typedef struct
+{
+   kal_uint8               band;
+   UL1D_sRAMPDATA          txdacData;
+   UL1D_sPAOCTLVLSETTING   txPAOCTLevelData;
+} URfTestTXDaTaItem;
+
+/*******************************************************************************
+ * WCDMA DPD common
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_WCDMA_DPD_91 = 0,
+   URF_TEST_WCDMA_DPD_92 = 1,
+   URF_TEST_WCDMA_DPD_93 = 2,
+   URF_TEST_WCDMA_DPD_95 = 3
+}URfTest_Wcdma_Dpd_Generation;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_START_DPD_FAC_CAL_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_START_DPD_INVALID               = 0,
+   URF_TEST_START_DPD_OK                    = 1,
+   URF_TEST_START_DPD_PEER_SIZE_MISMATCH    = 2,
+   URF_TEST_START_DPD_EXCEED_TTG_LIMIT_INIT = 3,
+   URF_TEST_START_DPD_EXCEED_TTG_LIMIT      = 4,
+   URF_TEST_START_DPD_NEGATIVE_PA_GAIN      = 5,
+   URF_TEST_START_DPD_LARGE_PA_GAIN_DIFF    = 6   
+
+}URfTest_StartDpdFacCal_Status;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+   kal_uint16 cal_band[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_StartDpd_ReqInfo;
+
+typedef struct
+{
+   kal_uint8  status; /* URfTest_StartDpdPaAndDpdFacCal_Status */
+   kal_uint16 curr_band_idx;    
+   kal_uint32 curr_subband_idx;
+   kal_uint32 curr_gain_idx;   
+   kal_int16  curr_pa_gain;
+   
+}URfTestCmd_StartDpd_CnfInfo;
+
+typedef struct
+{
+   kal_uint16 band_idx;
+   kal_uint16 apt_ref_channel;
+   kal_int16  tpc_wanted_p_offset;
+   
+}URfTest_AptRefChannel_OneBand;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTest_AptRefChannel_OneBand wcdma_apt_channel_info[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_StartDpdPaAndDpdFacCal_ReqPdu;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_SET_DPD_FAC_RESULT_V3 and MMRF_TEST_CMD_GET_DPD_FAC_RESULT_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_SET_DPD_INVALID            = 0,
+   URF_TEST_SET_DPD_OK                 = 1,
+   URF_TEST_SET_DPD_PEER_SIZE_MISMATCH = 2,
+   URF_TEST_SET_DPD_INVALID_BAND       = 3
+   
+}URfTest_SetDpdFacCal_Status;
+
+typedef enum
+{
+   URF_TEST_GET_DPD_INVALID            = 0,
+   URF_TEST_GET_DPD_OK                 = 1,
+   URF_TEST_GET_DPD_INVALID_BAND       = 2   
+   
+}URfTest_GetDpdFacCal_Status;
+
+typedef struct
+{
+   /* Tool can set several band in one set command */
+   kal_uint16 num_of_band;
+
+}URfTestCmd_SetDpdAll_ReqInfo;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+   kal_uint8  status; /* URfTest_SetDpdFacCal_Status */
+
+}URfTestCmd_SetDpdAll_CnfInfo;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+
+}URfTestCmd_SetDpdPartial_ReqInfo;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+   kal_uint8  status; /* URfTest_SetDpdPaAndDpdFacCal_Status */
+
+}URfTestCmd_SetDpdPartial_CnfInfo;
+
+typedef struct
+{   
+   kal_uint16           band_idx;
+   kal_uint8            dpd_cal_done;
+   kal_int16            dpd_tr[CAL_UARFCN_SECTION];
+
+   /* ramp */   
+   kal_int16            vga_comp_subband[UL1D_DPD_MAX_PA_MODE_NUM][CAL_UARFCN_SECTION];
+   kal_int16            vga_comp_temperature[UL1D_DPD_MAX_PA_MODE_NUM][UL1_DPD_MAX_PA_LEVEL_NUM];
+   UL1D_sHYSTERESISDATA tx_hysteresis[UL1D_DPD_MAX_PA_HYST_NUM];
+
+   /* paoct */
+   kal_uint8            octlev_num_section;
+   kal_uint32           pa_phase_compensation[UL1D_DPD_MAX_PA_MODE_NUM];
+   UL1D_sPMULEVHANDLE   pmu_level_handle[UL1_DPD_MAX_PA_LEVEL_NUM];
+
+}URfTest_SetGetDpd_TpcPeer;
+
+typedef struct
+{
+   kal_uint8  lut[UL1_DPD_MAX_AM_LUT_GAIN_NUM][MMDPD_MAX_AM_LUT_PWR_NUM];
+
+}URfTest_DPDAMLutSubBand;
+
+typedef struct
+{
+   kal_int8  lut[UL1_DPD_MAX_PM_LUT_GAIN_NUM][MMDPD_MAX_PM_LUT_PWR_NUM];
+
+}URfTest_DPDPMLutSubBand;
+
+typedef struct
+{
+   kal_int16               dpdImplicitArray[UL1_DPD_MAX_IMPLICIT_NUM]; /* For the parameters whose name will not be shown in cal file */	
+   URfTest_DPDAMLutSubBand am_lut_subband[CAL_UARFCN_SECTION];
+   URfTest_DPDPMLutSubBand pm_lut_subband[CAL_UARFCN_SECTION];
+
+}URfTest_SetGetDpd_DpdPeer;
+
+typedef struct
+{   
+   URfTest_SetGetDpd_TpcPeer dpdtpc_peer;
+   URfTest_SetGetDpd_DpdPeer dpd_peer;
+
+}URfTestCmd_SetDpdFacCalAll_OneBand, URfTestCmd_GetDpdFacCalAll_OneBand;
+
+typedef struct
+{
+   URfTest_SetGetDpd_TpcPeer dpdtpc_peer;
+
+}URfTestCmd_SetDpdFacCalPartial_OneBand;
+
+typedef struct
+{             
+   kal_uint16 num_of_band;
+   kal_uint16 band_idx[MAX_SUPPORTED_BAND_INDEX];
+             
+}URfTestCmd_GetDpdAll_ReqInfo;
+
+typedef struct
+{
+   kal_uint8  get_status; /* URfTest_GetDpdPaAndDpdFacCal_Status */
+   kal_uint16 num_of_band;
+
+}URfTestCmd_GetDpdAll_CnfInfo;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTestCmd_GetDpdFacCalAll_OneBand get_peer[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_GetDpdFacCalAll_CnfPdu;
+
+typedef struct
+{  
+   URfTestCmd_SetDpdFacCalAll_OneBand set_all_peer[MAX_SUPPORTED_BAND_INDEX];
+   
+}URfTestCmd_SetDpdFacCalAll_ReqPdu;
+
+typedef struct
+{
+   URfTestCmd_SetDpdFacCalPartial_OneBand set_partial_peer[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_SetDpdFacCalPartial_ReqPdu;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_SET_DPD_PATH_DELAY_SEARCH_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_SET_DPD_DELAY_INVALID            = 0,
+   URF_TEST_SET_DPD_DELAY_VALID              = 1,
+   URF_TEST_SET_DPD_DELAY_PEER_SIZE_MISMATCH = 2
+   
+}URfTest_SetDpdPathDelaySearchV3_Status;
+
+typedef struct
+{
+   /* Tool can set several band in one set command */
+   kal_uint16 band_num;
+
+}URfTestCmd_SetDpdPathDelaySearchV3_ReqInfo;
+
+typedef struct
+{
+   kal_uint16   rf_band;
+   kal_uint16   subband_freq[CAL_UARFCN_SECTION];
+   kal_int16    dpd_tr[CAL_UARFCN_SECTION];
+
+}URfTest_SetDpdPathDelaySearchV3_ReqPeer_OneBand;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTest_SetDpdPathDelaySearchV3_ReqPeer_OneBand dpd_one_band[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_SetDpdPathDelaySearchV3_ReqPdu;
+
+/* Confirm */
+typedef struct
+{
+   kal_uint16 band_num;
+   kal_uint16 status;
+
+}URfTestCmd_SetDpdPathDelaySearchV3_CnfInfo;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_START_DPD_PATH_DELAY_SEARCH_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_START_DPD_DELAY_INVALID       = 0,
+   URF_TEST_START_DPD_DELAY_VALID         = 1,
+   URF_TEST_START_DPD_DELAY_TIMEOUT       = 2,
+   URF_TEST_START_DPD_DELAY_SEARCH_FAILED = 3
+}URfTest_StartDpdPathDelaySearchV3_Status;
+
+/* Request */
+typedef struct
+{
+   kal_uint16 test_times;
+   kal_uint16 search_band[MAX_SUPPORTED_BAND_INDEX];
+}URfTestCmd_StartDpdPathDelaySearchV3_ReqInfo;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_GET_DPD_PATH_DELAY_SEARCH_V3
+ ******************************************************************************/
+ 
+/* Request */
+typedef struct
+{             
+   kal_uint16        band_num;
+   kal_uint16        rf_band_info[MAX_SUPPORTED_BAND_INDEX];
+   
+}URfTestCmd_GetDpdPathDelaySearchV3_ReqInfo;
+
+
+/* Confirm */
+
+typedef enum
+{
+   URF_TEST_GET_DPD_DELAY_INVALID = 0,
+   URF_TEST_GET_DPD_DELAY_VALID   = 1   
+   
+}URfTest_GetDpdPathDelaySearchV3_Status;
+
+typedef struct
+{
+   kal_uint16 band_num;
+   kal_uint16 get_status; /* URfTest_GetDpdPathDelaySearchV3_Status */
+
+}URfTestCmd_GetDpdPathDelaySearchV3_CnfInfo;
+
+typedef struct
+{
+   kal_uint16   rf_band;
+   kal_int16    dpd_tr[CAL_UARFCN_SECTION];
+
+}URfTest_GetDpdPathDelaySearchV3_CnfPeer_OneBand;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTest_GetDpdPathDelaySearchV3_CnfPeer_OneBand dpd_delay_one_band[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_GetDpdPathDelaySearchV3_CnfPdu;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_SET_DPD_FAC_RESULT_V3 and MMRF_TEST_CMD_GET_DPD_FAC_RESULT_V3
+ ******************************************************************************/
+/* Reuqest */
+typedef enum
+{
+   URF_TEST_TRAD_CAL_EXE_INVALID = 0,
+   URF_TEST_TRAD_CAL_EXE_START   = 1,
+   URF_TEST_TRAD_CAL_EXE_END     = 2
+   
+}URfTest_TradCal_Exe_Status;
+
+typedef struct
+{
+   kal_uint32 exe_status; /* URfTest_TradCal_Exe_Status */
+   
+}URfTestCmd_TradCal_ReqInfo;
+
+/* Confirm */
+typedef enum
+{
+   URF_TEST_TRAD_CAL_CMD_INVALID = 0,
+   URF_TEST_TRAD_CAL_CMD_OK      = 1
+   
+}URfTest_TradCal_Cmd_Status;
+
+typedef struct
+{
+   kal_uint32 cmd_status; /* URfTest_TradCal_Cmd_Status */
+   
+}URfTestCmd_TradCal_CnfInfo;
+
+/******************************************************************************/
+/*TX calibration data<-------------------------------------------------------------------------------------*/
+
+typedef  enum
+{
+   SETUP_FAIL_GENERAL = 0,
+   SETUP_FAIL_TCM_MISMATCH = 1,
+   SETUP_FAIL_TDD_TIMER_STILL_RUNNING = 2,
+}  UBIN_MODE_SETUP_FAIL_MSG;
+
+typedef struct
+{
+    kal_bool                ok;
+    kal_int8                setup_result;
+} URfTestResultUbinModeSetup;
+
+/************************************************************************/
+/*               New FHC Command when introduce eLNA                                                */
+/*               URF_TEST_CMD_FHC_ELNA                                                                   */
+/************************************************************************/
+typedef struct
+{
+   kal_bool    no_loop_ctrl;
+   kal_uint16  afc_dac;
+   kal_bool    pwr_det;
+   kal_uint8   power_ctrl_mode;
+   kal_uint8   vm1[10][3];
+   kal_uint8   vm2[10][3];
+   kal_uint16  dc2dc_dac[10][3];
+   kal_uint16  vbias_dac[10][3];
+   kal_uint8   temperature;
+   kal_bool    hwAGC;
+   kal_uint8   step_duration;
+   kal_uint8   freq_count;
+   kal_uint8   pwr_count;
+   kal_uint8   freq_start_idx;
+   kal_uint8   pwr_start_idx;
+   kal_uint8   pa_gain_start_idx;
+   kal_uint8   pd_gain_start_idx;
+   kal_uint8   lna_gain_start_idx;
+   kal_uint8   dl_band[40];
+   kal_uint8   ul_band[40];
+   kal_uint16  dl_freq[40];
+   kal_uint16  ul_freq[40];
+   kal_uint8   pd_gain[40];
+   kal_uint8   pa_mode[40];
+   kal_uint16  vga_dac_tpc_idx[40];
+   kal_uint16  pa_gain[40];
+   kal_uint8   pa_section[40];
+   kal_uint16  rx_lna_gain[40];
+   kal_uint16  rxd_lna_gain[40];
+   kal_uint8   fix_pga_gain[40];
+   kal_uint8   is_lpm[40];
+}URfTestCmdFHCeLNAPB;
+
+typedef struct
+{
+    kal_bool                ok;
+} URfTestResultFHCeLNALP;
+/*---------------------------------------------------------------------*/
+
+/***********************************************************************/
+/*       New RSSI Command when introduce eLNA                                                      */
+/*       URF_TEST_CMD_GET_RSSI_ELNA                                                                 */
+/***********************************************************************/
+typedef struct
+{
+   kal_uint8   num_freq;
+   kal_uint16  dl_freq[36];
+   kal_uint8   temperature;
+   kal_bool    hwAGC;
+   kal_uint8   mode;
+   kal_int16   rx_gain;
+   kal_uint8   rx_LNAmode;
+   kal_uint16  rx_pga;
+   kal_int16   rxd_gain;
+   kal_uint8   rxd_LNAmode;
+   kal_uint16  rxd_pga;
+   kal_uint8   antenna_path;
+   kal_bool    is_cal;
+   kal_uint8   lpm_mode;
+}URfTestCmdRSSIeLNAPB;
+
+typedef struct
+{
+    kal_bool                ok;
+} URfTestResultRSSIeLNALP;
+
+typedef struct
+{
+   kal_uint8   num_freq;
+   kal_uint16  dl_freq[36];
+   kal_int32   rx_rssi[36];
+   kal_int32   rxd_rssi[36];
+   kal_uint8   rx_LNAmode[36];
+   kal_uint8   rxd_LNAmode[36];
+}URfTestResultRSSIeLNAPB;
+/*---------------------------------------------------------------------*/
+/***********************************************************************/
+/*       TX SUPPORT Command FIX RF PGA GAIN                                                    */
+/*       URF_TEST_CMD_TX_DPCH_FIX_PGA_GAIN                                                   */
+/***********************************************************************/
+typedef enum
+{
+   UL1TST_NO_FIX_PGA_GAIN = 0,
+   UL1TST_FIX_PGA_GAIN_12A = 1,
+   UL1TST_FIX_PGA_GAIN_12B = 2
+}UL1TST_FIX_PGA_GAIN_T;
+
+typedef struct
+{
+   UL1TST_FIX_PGA_GAIN_T   ul1tst_fix_pga_gain;
+/*    
+         0 : no need fix
+         1 : fix PGA 12A
+         2 : fix PGA 12B
+ */
+}URfTestCmdDPCHTXFIXPGAPB;
+
+typedef struct
+{
+    kal_bool                ok;
+}URfTestResultDPCHTXFIXPGALP;
+///*------------------------------6293 Get FHC Information from TST---------------------------------------*/
+//#define UL1TST_HPM_POINT_V3 7
+//#define UL1TST_LPM_POINT_V3 4
+//#define UL1TST_WCDMA_BAND_SUPPORT 5
+//
+//typedef struct
+//{
+//   kal_uint8 calibration_band_number;
+//   kal_uint8 calibration_band[UL1TST_WCDMA_BAND_SUPPORT];         // band 1 : band index = 0
+//} UTSTReqGetCalInfoV3lp;  // request local parameter
+//
+//typedef enum
+//{
+//   UTST_ELNA_OFF=0,
+//   UTST_ELNA_ALWAYS_ON,
+//   UTST_ELNA_ALWAYS_ON_2ND_SAW,
+//   UTST_ELNA_BYPASS,
+//   UTST_ELNA_BYPASS_2ND_SAW
+//}UTST_ELNA_E;
+//
+//
+//typedef struct
+//{
+//   kal_uint8   band;
+//   kal_uint8   rx_elna_mode;
+//   kal_uint8   rxd_elna_mode;
+//   kal_uint8   cal_point_hpm;
+//   kal_uint8   cal_point_lpm;
+//   kal_uint8   rx_cal_sequency[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];
+//   kal_uint8   rx_elna_bypass[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];
+//   kal_uint8   rxd_elna_bypass[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];
+//   kal_int16   rx_cal_dl_power_min[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];  //s.5
+//   kal_int16   rx_cal_dl_power_max[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];  //s.5
+//   kal_int16   rx_cal_dl_power[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3];      //s.5
+//}UTSTCnfGetCalInfoV3pb;                                                     //band unit : dynamic size
+//typedef struct
+//{
+//   kal_uint8 support_band_number;
+//}UTSTCnfGetCalInfoV3lp; // conform local parameter
+
+/*------------------------------6295 Get FHC Information from TST---------------------------------------*/
+#define UL1TST_HPM_POINT_V5 7
+#define UL1TST_LPM_POINT_V5 7
+#define UL1TST_WCDMA_BAND_SUPPORT_V5 8
+
+typedef struct
+{
+   kal_uint8 calibration_band_number;
+   kal_uint8 calibration_band[UL1TST_WCDMA_BAND_SUPPORT_V5];         // band 1 : band index = 0
+} UTSTReqGetCalInfoV5lp;  // request local parameter
+
+//18/13.5dB
+typedef enum
+{
+   UTST_ELNA_OFF=0,
+   UTST_ELNA_BYPASS_LOW_TX_ISO,
+   UTST_ELNA_BYPASS_HIGH_TX_ISO,
+   UTST_ELNA_ALWAYS_ON_LOW_TX_ISO,
+   UTST_ELNA_ALWAYS_ON_HIGH_TX_ISO,
+   UTST_ELNA_BYPASS_LOW_TX_ISO_R_MATCHING
+}UTST_ELNA_E;
+
+typedef struct
+{
+   kal_uint8   band;
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+   kal_uint8   cal_point_hpm;
+   kal_uint8   cal_point_lpm;
+   kal_uint8   rx_cal_sequency[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   rx_elna_bypass[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   rxd_elna_bypass[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_int16   rx_cal_dl_power_min[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];  //s.5
+   kal_int16   rx_cal_dl_power_max[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];  //s.5
+   kal_int16   rx_cal_dl_power[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];      //s.5
+   kal_uint8   rx_lna_mode[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   rxd_lna_mode[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   rx_location_idx[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   rxd_location_idx[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   rx_gain_table;       //0:18dB  1:13.5dB
+   kal_uint8   rxd_gain_table;      //0:18dB  1:13.5dB
+}UTSTCnfGetCalInfoV5pb;                                                     //band unit : dynamic size
+typedef struct
+{
+   kal_uint8 support_band_number;
+}UTSTCnfGetCalInfoV5lp; // conform local parameter
+
+///*------------------------------6293 START FHC---------------------------------------*/
+//#define UL1TST_FHC_FREQUENCY_NUMBER  15
+//
+//typedef struct
+//{
+//   kal_uint8   ok;
+//   kal_uint8   error_code;
+//}UTSTCnfFHCeLNAV3lp;
+//
+//typedef struct
+//{
+//   kal_uint8   cal_band_number;
+//   kal_uint8   cal_band[UL1TST_WCDMA_BAND_SUPPORT];
+//   kal_uint8   antenna_setting;
+//   kal_uint8   step_duration;
+//}UTSTReqFHCeLNAV3lp;
+//
+//typedef struct
+//{
+///*common*/
+//   kal_uint8   band;
+//   kal_uint8   freq_count;
+//   kal_uint8   pwr_count;
+//   kal_uint8   hpm_cal_point;
+//   kal_uint8   lpm_cal_point;
+///*RX*/
+//   kal_uint8   rx_elna_mode;
+//   kal_uint8   rxd_elna_mode;
+//   kal_uint8   is_lpm[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+//   kal_uint8   rx_elna_bypass[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+//   kal_uint8   rxd_elna_bypass[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+//   kal_uint8   rx_cal_sequency[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+///*TX*/
+//   kal_uint8   fix_pga_gain[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+//   kal_uint8   pa_mode[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+//   kal_uint8   vga_dac_tpc_idx[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+//   kal_uint8   pa_section[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+//   kal_uint16  pa_gain[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+///*RX*/
+//   kal_int16  rx_cal_dl_power[UL1TST_HPM_POINT_V3+UL1TST_LPM_POINT_V3+2];
+///*UARFCN*/
+//   kal_uint16  dl_uarfcn[UL1TST_FHC_FREQUENCY_NUMBER];
+//   kal_uint16  ul_uarfcn[UL1TST_FHC_FREQUENCY_NUMBER];
+///*Initial file data*/
+//   URfTestTXDaTaItem    tx_cal_data_info;
+//   UTSTPathlossV3       rx_cal_data_info;
+//   UTSTPathlossV3       rxd_cal_data_info;
+//}UTSTReqFHCeLNAV3pb;    //band unit  it depends on local parameter cal band number expend to array
+
+/*------------------------------6295 START FHC---------------------------------------*/
+#define UL1TST_FHC_FREQUENCY_NUMBER  15
+
+typedef struct
+{
+   kal_uint8   ok;
+   kal_uint8   error_code;
+}UTSTCnfFHCV5lp;
+
+typedef struct
+{
+   kal_uint8   cal_band_number;
+   kal_uint8   cal_band[UL1TST_WCDMA_BAND_SUPPORT_V5];
+   kal_uint8   antenna_setting;
+   kal_uint8   step_duration;
+}UTSTReqFHCV5lp;
+
+typedef struct
+{
+/*common*/
+   kal_uint8   band;
+   kal_uint8   freq_count;
+   kal_uint8   pwr_count;
+   kal_uint8   hpm_cal_point;
+   kal_uint8   lpm_cal_point;
+/*RX*/
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+   kal_uint8   is_lpm[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   rx_elna_bypass[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   rxd_elna_bypass[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   rx_cal_sequency[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+/*TX*/
+   //kal_uint8   fix_pga_gain[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   pa_mode[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   vga_dac_tpc_idx[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint8   pa_section[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+   kal_uint16  pa_gain[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+/*RX*/
+   kal_int16  rx_cal_dl_power[UL1TST_HPM_POINT_V5+UL1TST_LPM_POINT_V5];
+/*UARFCN*/
+   kal_uint16  dl_uarfcn[UL1TST_FHC_FREQUENCY_NUMBER];
+   kal_uint16  ul_uarfcn[UL1TST_FHC_FREQUENCY_NUMBER];
+   kal_uint8   rx_gain_table;       //0:18dB  1:13.5dB
+   kal_uint8   rxd_gain_table;      //0:18dB  1:13.5dB
+/*Initial file data*/
+   URfTestTXDaTaItem    tx_cal_data_info;
+   UTSTPathlossV3       rx_cal_data_info;
+   UTSTPathlossV3       rxd_cal_data_info;
+}UTSTReqFHCV5pb;    //band unit  it depends on local parameter cal band number expend to array
+
+///*------------------------------6293 GET FHC RESULT----------------------------------------*/
+//typedef struct
+//{
+//   kal_uint16     ul_uarfcn;
+//   kal_int16      pd_value_h;
+//   kal_int16      pd_value_m;
+//   kal_int16      pd_value_l;
+//} UL1TST_FHC_PD_RESULT_INFO ;
+//
+//typedef struct
+//{
+//   kal_uint16  dl_uarfcn;
+//   kal_int16   hpm_rssi[UL1TST_HPM_POINT_V3];
+//   kal_int16   lpm_rssi[UL1TST_LPM_POINT_V3];
+//} UL1TST_FHC_PATHLOSS_RESULT_INFO ;
+//
+//typedef struct
+//{
+//   kal_uint8                        band;
+//   UL1TST_FHC_PD_RESULT_INFO        pd_result[UL1TST_FHC_FREQUENCY_NUMBER];
+//   UL1TST_FHC_PATHLOSS_RESULT_INFO  rx_rssi_result[UL1TST_FHC_FREQUENCY_NUMBER];
+//   UL1TST_FHC_PATHLOSS_RESULT_INFO  rxd_rssi_result[UL1TST_FHC_FREQUENCY_NUMBER];
+//} UTSTCnfGetFHCResultV3pb ;     //band unit
+//
+//typedef struct
+//{
+//   kal_bool    ok;
+//   kal_uint8   band_number;      // indicate how many band's report in peer buffer
+//} UTSTCnfGetFHCResultV3lp;
+
+/*------------------------------6295 GET FHC RESULT----------------------------------------*/
+typedef struct
+{
+   kal_uint16     ul_uarfcn;
+   kal_int16      pd_value_h;
+   kal_int16      pd_value_m;
+   kal_int16      pd_value_l;
+} UL1TST_FHC_PD_RESULT_INFO ;
+
+typedef struct
+{
+   kal_uint16  dl_uarfcn;
+   kal_int16   hpm_rssi[UL1TST_HPM_POINT_V5];
+   kal_int16   lpm_rssi[UL1TST_LPM_POINT_V5];
+} UL1TST_FHC_PATHLOSS_RESULT_INFO ;
+
+typedef struct
+{
+   kal_uint8                        band;
+   UL1TST_FHC_PD_RESULT_INFO        pd_result[UL1TST_FHC_FREQUENCY_NUMBER];
+   UL1TST_FHC_PATHLOSS_RESULT_INFO  rx_rssi_result[UL1TST_FHC_FREQUENCY_NUMBER];
+   UL1TST_FHC_PATHLOSS_RESULT_INFO  rxd_rssi_result[UL1TST_FHC_FREQUENCY_NUMBER];
+} UTSTCnfGetFHCResultV5pb ;     //band unit
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   band_number;      // indicate how many band's report in peer buffer
+} UTSTCnfGetFHCResultV5lp;
+/*for 93-95 co-file , "Gen":stand for any generation*/
+typedef UTSTCnfGetFHCResultV5pb UTSTCnfGetFHCResultGenpb;
+/*-----------------------------6295 GET RSSI-----------------------------------------*/
+typedef struct
+{
+   kal_bool    hwAGC;
+   kal_bool    rx_elna_bypass;
+   kal_bool    rxd_elna_bypass;
+   kal_bool    conti_rssi;
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+   kal_uint8   temperature;
+   kal_uint8   antenna_path;
+   kal_uint8   lpm_mode;
+   kal_uint16  uarfcn;
+   kal_uint16  rx_rf_gain;
+   kal_uint16  rxd_rf_gain;
+   kal_uint16  rx_digital_gain;
+   kal_uint16  rxd_digital_gain;
+   kal_uint8   rx_gain_table;
+   kal_uint8   rxd_gain_table;
+} UTSTReqGetRSSIV5lp;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   rx_elna_bypass;
+   kal_uint8   rxd_elna_bypass;
+   kal_uint8   rx_lna_mode;
+   kal_uint8   rxd_lna_mode;
+   kal_uint16  uarfcn;
+   kal_int16   rx_rssi;
+   kal_int16   rxd_rssi;
+   kal_uint16  rx_used_gain;
+   kal_uint16  rxd_used_gain;
+} UTSTCnfGetRSSIV5lp;
+/*for 93-95 co-file , "Gen":stand for any generation*/
+typedef UTSTCnfGetRSSIV5lp UTSTCnfGetRSSIGenlp;
+/*-----------------------------6295 power to gain-----------------------------------------*/
+typedef struct
+{
+   kal_bool    rx_elna_bypass;
+   kal_bool    rxd_elna_bypass;
+   kal_uint8   antenna_path;
+   kal_uint8   lpm_mode;
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+   kal_uint8   rx_cal_sequency;
+   kal_int16   rx_dl_power;
+   kal_uint8   rx_gain_table;
+   kal_uint8   rxd_gain_table;
+} UTSTReqPwrtoGainV5lp;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint16  rx_digital_gain;
+   kal_uint16  rxd_digital_gain;
+   kal_uint16  rx_rf_gain;
+   kal_uint16  rxd_rf_gain;
+}UTSTCnfPwrtoGainV5lp;
+
+/*-----------------------------6295 lna to gain-----------------------------------------*/
+typedef struct
+{
+   kal_bool    rx_elna_bypass;
+   kal_bool    rxd_elna_bypass;
+   kal_uint8   band;
+   kal_uint8   antenna_path;
+   kal_uint8   lpm_mode;
+   kal_uint8   rx_lna_mode;
+   kal_uint8   rxd_lna_mode;
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+   kal_uint8   rx_gain_table;
+   kal_uint8   rxd_gain_table;
+} UTSTReqLnatoGainV5lp;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint16  rx_digital_gain;
+   kal_uint16  rxd_digital_gain;
+   kal_uint16  rx_rf_gain;
+   kal_uint16  rxd_rf_gain;
+   kal_int16   dl_power;
+}UTSTCnfLnatoGainV5lp;
+
+/*----------------------------------------------------------------------*/
+/*-----------------------------6293 ATE tool T-put-----------------------------------------*/
+//trigger IQ dump
+typedef struct
+{
+   kal_uint16   enable_iq_dump;              //enable or disable IQ dump mode.
+   kal_uint16   ant_idx;                 //0=RX main antenna, 1=RX diversity antenna.
+}UTSTReqTriggerIqDumpModeV3lp;  // request local parameter
+
+typedef struct
+{
+   kal_uint16   dump_status;             //1=enable IQ dump mode successfully
+}UTSTCnfTriggerIqDumpModeV3lp; // conform local parameter
+
+//get IQ dump result
+typedef struct
+{
+   kal_uint16   is_data_ready;           //1=IQ raw data is ready
+   kal_uint16   data_section_length;     //length of IQ raw data in corresponding peer buffer
+}UTSTCnfGetIqDumpResultV3lp; // confirm local parameter
+
+typedef struct
+{
+   kal_int16   i_data;
+   kal_int16   q_data;
+}UTSTCnfGetIqDumpResultV3pb;// confirm peer buffer :RFEQ unit 
+//set RFEQ
+typedef struct
+{
+   kal_uint16   rfeq_set_num; //number of subband RFEQ to update
+}UTSTReqSetRfeqSubbandV3lp;   // request local parameter
+
+typedef struct
+{
+   kal_uint16    band;                   //UMTS band
+   kal_uint16    subband_idx;            //which sub-band that user want to fill
+   kal_uint16    max_uarfcn;             //max uarfcn of this subband
+   kal_uint8     ant_idx;                //which antenna should be write in this command. 0: RX Main, 1:RX Div
+   kal_bool      rfeq_enable;            //RFEQ enable or not. 
+   kal_int16     rfeq_coef_real[7];      //RFEQ real part coefficient. 7 taps.
+   kal_int16     rfeq_coef_imag[7];      //RFEQ image part coefficient. 7 taps. 	
+}UTSTReqSetRfeqSubbandV3pb;  // request peer buffer : subband unit
+
+typedef struct
+{
+   kal_uint16   is_rfeq_set;             //1=RFEQ is set to NVRAM successfully
+}UTSTCnfSetRfeqSubbandV3lp; // confirm local parameter
+
+/*----------------------------------------------------------------------*/
+/*-----------------------------6295 get/set NSFT TX POWER offset-------------------------*/
+typedef struct
+{
+   kal_uint8 band;
+}UTSTReqGetTXpowerOffsetV5lp;
+
+typedef struct
+{
+   kal_uint8 band;
+   kal_int16 offset;
+}UTSTCnfGetTXpowerOffsetV5lp;
+
+typedef struct
+{
+   kal_bool updatenvram;
+   kal_uint8 band;
+   kal_uint16 ul_uarfcn;
+   kal_int16 offset;
+}UTSTReqSetTXpowerOffsetV5lp;
+
+typedef struct
+{
+   kal_bool ok;
+}UTSTCnfSetTXpowerOffsetV5lp;
+/*---------------------------------------------------------------------------------------*/
+typedef struct
+{
+   URfTestCmdType   urf_test_cmd_type;
+   void           (*handler)( ilm_struct* );
+}UL1TST_RF_TEST_HANDLER_T;
+/* ------------------------------------------------------------------------------------------- *\
+|*                                                   U_RESET_BIT_COUNT                                                                             *|
+\* ------------------------------------------------------------------------------------------- */
+
+typedef struct
+{
+   kal_uint32  meaningless;
+} URFTestCmdResetBERResult;
+
+typedef struct
+{
+   kal_bool ok;
+   kal_uint32  u4TotalBits;
+   kal_uint32  u4ErrorBits;
+} URFTestResultResetBERResult;
+/*---------------------------------------------------------------------------------------------*/
+typedef union
+{
+   kal_uint8                                 m_u1RfBand;
+   kal_uint8                                 m_u1PwrCtrlMode;
+   kal_uint8                                 m_u1TableType;                // 1: special table for calibration, 2: normal table
+   kal_uint8                                 m_u1ILPCStep;
+   kal_uint16                                m_u2TxPclIndex;
+   kal_uint16                                rf_band_idx;
+/* PA drift compensation */
+   kal_uint8                                 is_PaDrift;                   /*R8< \brief the parameter to UL1 for PA drift compensation setting (1: turn on, 0: turn off) */
+/* R8 RF tool */
+   kal_uint8                                 is_5mhz;
+   kal_uint8                                 is_main;
+   kal_uint32                                m_rBSIData;
+   kal_uint32                                m_rBSIAddr;
+/* DCXO development */
+   kal_uint32                                m_u4CapId;
+/* WM Switch */
+   kal_uint8                                 ubin_fdd_mode_init;           //  1 : UBIN mode Init 3G FDD ,      0 : UBIN mode de-init 3G FDD
+   URfTestCmdAFC                             afc;
+   URfTestCmdRSCP                            rscp;
+   URfTestCmdType                            query_op_code;
+   URfTestCmdTxDPCh                          txdpch;
+   URfTestCmdRxDPCh                          rxdpch;
+   URfTestCmdTxAccess                        txaccess;
+   URFTestCmdReloadNVRAM                     reload;
+   URfTestCmdSetMIPICodeWord                 set_mipi_cw_param;
+   URfTestCmdGetRfTempSensor                 rfTemperature;
+   UL1D_RF_TX_PA_APC_REQ_T                   m_rTxPaApc;
+   UL1D_RF_GET_PWR_THR_REQ_T                 m_rGetPwrThr;
+   kal_int32                                 m_i4IcsCellPower;             /**< \brief pass cell power to UL1 to choose the best initial gain for ICS */
+   URFTestCmdResetBERResult                  resetBERResult;
+   URfTestCmdSetCalData                      set_cal_data_command_lp;      //after 6292
+   URfTestCmdGetCalData                      get_cal_data_command_lp;      //after 6292
+   //UTSTReqGetCalInfoV3lp                     get_cal_info_v3_lp;           //6293 get FHC infomation from RFD & FEC
+   //UTSTReqFHCeLNAV3lp                        fhc_control_v3_lp;            //6293 FHC flow control infomation
+   //UTSTReqGetRSSIV3lp                        get_rssi_v3_lp;               //6293 RF tool RSSI
+   //UTSTReqPwrtoGainV3lp                      pwr_to_gain_v3_lp;            //6293 Tradk, NSFT
+   //UTSTReqLnatoGainV3lp                      lna_to_gain_v3_lp;            //6293 RF tool get RSSI calculator
+   //URfTestCmd_SetRxTxCalData_ReqParam_V3     set_RxTx_cal_data_command_lp;  //after6293
+   //URfTestCmd_GetRxTxCalData_ReqParam_V3     get_RxTx_cal_data_command_lp;  //after6293
+   UTSTCmdRSCPV3lp                           rscp_v3_lp;
+   UTSTCmdAFCV3lp                            afc_v3_lp;
+   //UTSTCmdLPCal                              pga_type_v3_lp;
+   UTSTReqGetCalInfoV5lp                     get_cal_info_v5_lp;           //6295 get FHC infomation from RFD & FEC
+   UTSTReqFHCV5lp                            fhc_control_v5_lp;            //6295 FHC flow control infomation
+   URfTestCmd_GetRxTxCalData_ReqParam_V5     get_RxTx_cal_data_command_v5_lp;  //after6295
+   URfTestCmd_SetRxTxCalData_ReqParam_V5     set_RxTx_cal_data_command_v5_lp;  //after6295
+   UTSTReqGetRSSIV5lp                        get_rssi_v5_lp;               //6295 RF tool RSSI
+   UTSTReqPwrtoGainV5lp                      pwr_to_gain_v5_lp;            //6295 Tradk, NSFT
+   UTSTReqLnatoGainV5lp                      lna_to_gain_v5_lp;            //6295 RF tool get RSSI calculator
+   UTSTReqTriggerIqDumpModeV3lp              trigger_iq_dump_v3_lp;    //Trigger IQ dump
+   UTSTReqSetRfeqSubbandV3lp                 set_rfeq_subband_v3_lp;   //Set RFEQ subband result
+   UTSTReqGetTXpowerOffsetV5lp               get_tx_power_offset_v5_lp;    //6295 get TX power offset in NSFT
+   UTSTReqSetTXpowerOffsetV5lp               set_tx_power_offset_v5_lp;    //6295 set TX power offset in NSFT
+}URfTestCmdParam;
+
+typedef union
+{
+   kal_bool                                  ok;
+   kal_uint8                                 nvramAccessResult;
+   kal_uint8                                 currentLnaMode;
+   kal_int16                                 m_u2PwrDetResult;
+   kal_uint32                                bsi_data;
+   kal_uint32                                m_u4MaxCapId;
+   FT_UMTS_MsCapabilityEx                    m_rTargetCapability;
+   FT_UMTS_NSFTLinkStatusReport              m_rNSFTLinkStatusReport;
+   URfNsftListModeCnf                        m_rNSFTListModeLinkStatusReport;
+   UL1D_RF_NSFT_BET_BIT_CNT_FOR_BER_CNF_T    m_rNSFTBERResult;
+   URfTestResultAFC                          afc;
+   URfTestResultRFID                         rfid;
+   URfCheckIfFuncExist                       CheckIfFuncExist;
+   URfTestResultAFC_Ex                       afc_ex;
+   URfTestResultRxDPCh                       rx_dpch;
+   URfTestResultPwrDtDac                     pwr_dt_dac;
+   URfTestResultPwrDtStep                    pwr_dt_step;
+   URfTestResultGetRfTempSensor              rfTemperature;
+   URfTestResultGetMIPICodeWord              get_mipi_cw_param;
+   URfTestResultPwrDtDefaultThr              pwr_dt_default_thr;
+   URfTestResultReplaceGainTable             replace_gain_table;
+   URfTestResultRfTemperatureInfo            rfTemperatureInfo;
+   URfTestResultUbinModeSetup                ubin_mode_setup_result;
+   URfTestResultNSFTRSSI                     ft_rpt_nsft_rssi;                   /*for getting RSSI value during NSFT*/
+   URFTestResultResetBERResult               resetBERResult;
+   URfTestResultCalDataProcess               cal_data_process_result_lp;         //after 6292
+   URfTestResultDPCHTXFIXPGALP               dpch_tx_fix_pga_gain_lp;
+   URfTestResultFHCeLNALP                    fhc_elna_result_lp;
+   URfTestResultRSSIeLNALP                   rssi_elna;
+   //UTSTCnfGetCalInfoV3lp                     cnf_get_cal_info_v3_lp;          //6293 get calibration information
+   //UTSTCnfFHCeLNAV3lp                        cnf_fhc_control_v3_lp;           //6293 FHC flow control infomation
+   //UTSTCnfGetFHCResultV3lp                   cnf_fhc_report_v3_lp;            //6293 fhc report
+   //UTSTCnfGetRSSIV3lp                        cnf_get_rssi_v3_lp;              //6293 RF tool RSSI
+   //UTSTCnfPwrtoGainV3lp                      cnf_pwr_to_gain_v3_lp;           //6293 Tradk, NSFT
+   //UTSTCnfLnatoGainV3lp                      cnf_lna_to_gain_v3_lp;           //6293 RF tool get RSSI calculator
+   //URfTestCmd_SetRxTxCalData_CnfParam_V3     set_RxTx_cal_data_process_result_lp; //after 6293
+   //URfTestCmd_GetRxTxCalData_CnfParam_V3     get_RxTx_cal_data_process_result_lp; //after 6293
+   //UTSTResultLPCal                           cnf_pga_type_v3_lp;
+   UTSTCnfGetCalInfoV5lp                     cnf_get_cal_info_v5_lp;          //6295 get calibration information
+   UTSTCnfFHCV5lp                            cnf_fhc_control_v5_lp;           //6295 FHC flow control infomation
+   UTSTCnfGetFHCResultV5lp                   cnf_fhc_report_v5_lp;            //6295 fhc report
+   URfTestCmd_GetRxTxCalData_CnfParam_V5     get_RxTx_cal_data_process_result_v5_lp; //6295 get data
+   URfTestCmd_SetRxTxCalData_CnfParam_V5     set_RxTx_cal_data_process_result_v5_lp; //6295 set data
+   UTSTCnfGetRSSIV5lp                        cnf_get_rssi_v5_lp;              //6295 RF tool RSSI
+   UTSTCnfPwrtoGainV5lp                      cnf_pwr_to_gain_v5_lp;           //6295 Tradk, NSFT
+   UTSTCnfLnatoGainV5lp                      cnf_lna_to_gain_v5_lp;           //6295 RF tool get RSSI calculator
+   UTSTCnfTriggerIqDumpModeV3lp              cnf_trigger_iq_dump_v3_lp;     //Trigger IQ dump
+   UTSTCnfGetIqDumpResultV3lp                cnf_get_iq_data_v3_lp;         //Get IQ dump result
+   UTSTCnfSetRfeqSubbandV3lp                 cnf_set_rfeq_subband_v3_lp;    //Set RFEQ subband result
+   UTSTCnfGetTXpowerOffsetV5lp               cnf_get_tx_power_offset_v5_lp;   //6295 get TX power offset in NSFT
+   UTSTCnfSetTXpowerOffsetV5lp               cnf_set_tx_power_offset_v5_lp;   //6295 set TX power offset in NSFT
+} URfTestResultParam;
+
+typedef struct
+{
+    FT_HDR
+    URfTestCmdType     type;
+    URfTestCmdParam    param;
+} ft_urf_test_req_T;
+
+typedef struct
+{
+    FT_HDR
+    URfTestCmdType     type;
+    URfTestResultParam param;
+} ft_urf_test_cnf_T;
+
+typedef ft_urf_test_req_T ft_to_ul1tst_struct;
+typedef ft_urf_test_cnf_T ul1tst_to_ft_struct;
+
+typedef ft_urf_test_req_T ft_urf_test_req_id_struct;
+typedef ft_urf_test_cnf_T ft_urf_test_cnf_id_struct;
+
+#endif  // #if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
+
+#endif // #ifndef __FT_MSG_UL1RF_H__
diff --git a/mcu/interface/middleware/meta/ft_msg_ul1rf_gen97.h b/mcu/interface/middleware/meta/ft_msg_ul1rf_gen97.h
new file mode 100644
index 0000000..6d0caa0
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_ul1rf_gen97.h
@@ -0,0 +1,2526 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_ul1rf.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of UL1 RF category of FT Library
+ *
+ * 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!
+ * 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!
+ * 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!
+ * 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!
+ * 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 __FT_MSG_UL1RF_H__
+#define __FT_MSG_UL1RF_H__
+#include "ft_msg_common.h"
+#include "ul1d_rf_public.h"
+
+#include "kal_public_defs.h"
+
+
+#define UL1TST_LNA_MODE_NUMBER_EXT 6
+
+#define UL1_DPD_FDB_NUM                    (CAL_UARFCN_SECTION * UL1_DPD_MAX_PA_LEVEL_NUM) /* refer to f_db in U_sDPD_COMMON_CAL */
+#define UL1_DPD_MAX_PTAR_TH_NUM            (CAL_UARFCN_SECTION * UL1_DPD_MAX_PA_LEVEL_NUM) /* refer to pa_idx_th in U_sDPD_COMMON_CAL */
+#define UL1_DPD_MAX_IMPLICIT_RSV_NUM       0
+#define UL1_DPD_MAX_IMPLICIT_NUM           (UL1_DPD_FDB_NUM + UL1_DPD_MAX_PTAR_TH_NUM + UL1_DPD_MAX_IMPLICIT_RSV_NUM)
+#define UL1_DPD_MAX_SET_ALL_DATA_NUM       (7)  /* floor(MMRF_MAX_TOOL_PEER_SIZE_PER_CMD / sizeof(URfTestCmd_SetDpdPaAndDpdFacCalAll_OneBand)) */
+#define UL1_DPD_MAX_GET_ALL_DATA_NUM       (UL1_DPD_MAX_SET_ALL_DATA_NUM)
+#define UL1_DPD_MAX_SET_PARTIAL_DATA_NUM   (239) /* floor(MMRF_MAX_TOOL_PEER_SIZE_PER_CMD / sizeof(URfTestCmd_SetDpdPaAndDpdFacCalPartial_OneBand)) */
+
+/*******************************************************************************
+*
+*  Message structures defined for UL1 TST Interface
+*
+*******************************************************************************/
+#if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
+
+//type1: communicate with ul1tst module, and send the confirm without waiting!
+//type2: communicate with u1ltst module, and wait their confirm, then send back to PC
+//type3: invoke UL1D's API, then send confirm to PC side.
+//type4: no operation, only get FT task's current status, and reply to PC side
+
+typedef enum
+{
+   URF_TEST_CMD_TXACCESS = 0,
+   URF_TEST_CMD_STOP = 1,
+   URF_TEST_CMD_TX_DPCH = 2,
+   URF_TEST_CMD_RX_DPCH = 3,
+   URF_TEST_CMD_RSSI = 4,
+   URF_TEST_CMD_RSCP = 5,
+   URF_TEST_CMD_AFC = 6,
+   URF_TEST_CMD_TX_PAAPC = 7,
+   URF_TEST_CMD_GET_RFID = 8,
+   URF_TEST_CMD_CONFIG_HWTPC = 9,
+   URF_TEST_CMD_GET_PWR_DT_STEP = 10,
+   URF_TEST_CMD_GET_PWR_DT_DAC = 11,
+   URF_TEST_CMD_GET_PWR_DT_DEFAULT_THR = 12,
+   URF_TEST_CMD_SET_IMMEDIATE_BSI = 13,
+   URF_TEST_CMD_GET_IMMEDIATE_BSI = 14,
+   URF_TEST_CMD_CONTINUOUS_RX = 15,
+   URF_TEST_CMD_START_FHC = 16,
+   URF_TEST_CMD_SET_TXDAC_DATA = 17,
+   URF_TEST_CMD_GET_PWR_DET_MEASURE_RES = 18,
+   URF_TEST_CMD_SET_PWR_CTRL_MODE = 19,
+   URF_TEST_CMD_REPLACE_GAIN_TABLE_FOR_CAL = 20,
+   URF_TEST_CMD_START_FHC_NO_WAIT = 21,
+   URF_TEST_CMD_GET_FHC_RESULT = 22,
+   URF_TEST_CMD_QUERY_TARGET_CAPABILITY = 23,
+   URF_TEST_CMD_START_NSFT = 24,
+   URF_TEST_CMD_GET_BIT_COUNT_FOR_SINGLE_ENDED_BER = 25,
+   URF_TEST_CMD_NSFT_SET_ILPC_STEP = 26,
+   URF_TEST_CMD_START_NSFT_EX = 27,
+   URF_TEST_CMD_SET_PA_OCT_LEVEL_DATA = 28,
+   URF_TEST_CMD_START_HSDPA_NSFT = 29,
+   URF_TEST_CMD_START_HSUPA_NSFT = 30,
+   URF_TEST_CMD_START_FHC_EX = 31,
+   URF_TEST_CMD_GET_FHC_EX_RESULT = 32,
+   URF_TEST_CMD_GET_CURRENT_LNA_MODE = 33,
+   URF_TEST_CMD_SET_CAPID = 34,
+   URF_TEST_CMD_GET_MAX_CAPID = 35,
+   URF_TEST_CMD_AFC_EX = 36,
+   URF_TEST_CMD_RSSI_RXD = 37,
+   URF_TEST_CMD_GET_CURRENT_RXD_LNA_MODE = 38,
+   URF_TEST_CMD_SET_RX_BANDWIDTH = 39,
+   URF_TEST_CMD_SET_RX_ANTENNA = 40,
+   URF_TEST_CMD_SET_TX_PA_DRIFT_COMPENSATION = 41,
+   URF_TEST_CMD_SET_ICS_CELL_POWER = 42,
+   URF_TEST_CMD_GET_RF_TEMP_BSI = 43,
+   URF_TEST_CMD_GET_RF_CAPABILITY = 44,
+   URF_TEST_CMD_START_NSFT_LIST_MODE  = 45,
+   URF_TEST_CMD_SET_RF_MIPI_CODEWORD = 46,
+   URF_TEST_CMD_GET_RF_MIPI_CODEWORD = 47,
+   URF_TEST_CMD_GET_TEMPERATURE_INFO = 48,
+   URF_TEST_CMD_RX_GAIN_SWEEP = 49,
+   URF_TEST_CMD_RELOAD_NVRAM = 50,
+   URF_TEST_CMD_CHECK_IF_FUNC_EXIST = 51,
+   URF_TEST_CMD_UBIN_MODE_SETUP = 52,
+   URF_TEST_CMD_SET_RX_PATH_LOSS = 53,
+   URF_TEST_CMD_GET_RX_PATH_LOSS = 54,
+   URF_TEST_CMD_RSSI_LPM = 55,
+   URF_TEST_CMD_RSSI_RXD_LPM = 56,
+   URF_TEST_CMD_CONTINUOUS_RX_LPM = 57,
+   URF_TEST_CMD_NSFT_GET_RSSI = 58,
+   URF_TEST_CMD_SET_RX_CALIBRATION_DATA = 59,
+   URF_TEST_CMD_GET_RX_CALIBRATION_DATA = 60,
+   URF_TEST_CMD_SET_TX_CALIBRATION_DATA = 61,
+   URF_TEST_CMD_GET_TX_CALIBRATION_DATA = 62,
+   URF_TEST_CMD_NSFT_RESET_BER_RESULT = 66,
+   URF_TEST_CMD_FHC_ELNA = 67,
+   URF_TEST_CMD_GET_RSSI_ELNA = 68,
+   URF_TEST_CMD_GET_CONTINUOUS_RSSI_ELNA = 69,
+   URF_TEST_CMD_TX_DPCH_FIX_PGA_GAIN = 70,
+   URF_TEST_CMD_GET_CALIBRATION_INFO_V3 = 71,
+   URF_TEST_CMD_START_FHC_V3 = 72,
+   URF_TEST_CMD_GET_FHC_RESULT_V3 = 73,
+   URF_TEST_CMD_GET_RSSI_V3 = 74,
+   URF_TEST_CMD_GAIN_SELECT_PWR_V3 = 75,
+   URF_TEST_CMD_GAIN_SELECT_LNA_V3 = 76,
+   URF_TEST_CMD_GET_RXTX_CALIBRATION_DATA_V3 = 77,          //after 6293
+   URF_TEST_CMD_SET_RXTX_CALIBRATION_DATA_V3 = 78,          //after 6293
+   URF_TEST_CMD_RSCP_V3 = 79,
+   URF_TEST_CMD_AFC_V3 = 80,
+   URF_TEST_CMD_AFC_CAPID_V3 = 81,
+   URF_TEST_CMD_LOW_POWER_CAL_V3 = 82,
+   URF_TEST_CMD_GET_CALIBRATION_INFO_V5 = 83,               //after 6295
+   URF_TEST_CMD_START_FHC_V5 = 84,                          //after 6295
+   URF_TEST_CMD_GET_FHC_RESULT_V5 = 85,                     //after 6295
+   URF_TEST_CMD_GET_RXTX_CALIBRATION_DATA_V5 = 86,          //after 6295
+   URF_TEST_CMD_SET_RXTX_CALIBRATION_DATA_V5 = 87,          //after 6295
+   URF_TEST_CMD_TRIGGER_IQ_DUMP_MODE_V3 = 88,               //support 6293 Auto IQ dump
+   URF_TEST_CMD_GET_IQ_DUMP_RESULT_V3 = 89,                 //support 6293 Auto IQ dump
+   URF_TEST_CMD_SET_RFEQ_SUBBAND_RESULT_V3 = 90,            //support 6293 Auto IQ dump
+   URF_TEST_CMD_GET_RSSI_V5 = 91,                           //after 6295
+   URF_TEST_CMD_GAIN_SELECT_PWR_V5 = 92,                    //after 6295
+   URF_TEST_CMD_GAIN_SELECT_LNA_V5 = 93,                    //after 6295
+   URF_TEST_CMD_GET_TX_POWER_OFFSET_V5 =94,                 //after 6295
+   URF_TEST_CMD_SET_TX_POWER_OFFSET_V5 =95,                 //after 6295
+   URF_TEST_CMD_GET_CALIBRATION_INFO_V7 = 96,               //6297
+   URF_TEST_CMD_FHC_V7 = 97,                                //6297
+   //URF_TEST_CMD_GET_FHC_RESULT_V7 = 98,                     //6297
+   URF_TEST_CMD_GET_RSSI_V7 = 98,                           //6297
+   URF_TEST_CMD_GAIN_SELECT_PWR_V7 = 99,                    //6297
+   URF_TEST_CMD_GAIN_SELECT_LNA_V7 = 100,                   //6297
+   URF_TEST_CMD_GET_RXTX_CALIBRATION_DATA_V7 = 101,         //6297
+   URF_TEST_CMD_SET_RXTX_CALIBRATION_DATA_V7 = 102,         //6297
+   URF_TEST_CMD_TX_POWER_ADJUST_V7 = 103,                   //6297
+   URF_TEST_CMD_TX_DPCH_V7 = 104,                           //6297
+/*----------------------------------------------------------------------------------------------------*/
+   URF_TEST_CMD_GP_TOOL_COMMAND_START,
+   URF_TEST_CMD_END,
+   URF_TEST_CMD_MAX                     = 0x7FFFFFFF
+} URfTestCmdType;
+typedef struct
+{
+    kal_uint16  ul_uarfcn;      /* UL uarfcn range:????Read from NVRAM?? (9612 ~ 9888) */
+    kal_uint16  dl_psc;         /* 0~511. */
+    kal_uint16  signature;      /* 0~15, for single signature decision. */
+    kal_uint8   pa_mode;        /* 0: High 1: Middle 2: Low */
+    kal_int8    init_power;     /* Assume cpich_rscp=0, ul_interference=0. */
+    kal_uint8   power_step;     /* Preamble power ramping step. 1 ~ 8dB */
+    kal_uint8   max_retrans;    /* 1~64. */
+    kal_uint16  dl_uarfcn;
+    kal_uint8   asc;
+} URfTestCmdTxAccess;
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+#if 0 // no use 
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+#define FDD_MAX_FREQ_LIST 36
+typedef struct
+{
+    kal_uint8   num_freq;
+    kal_uint16  dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_uint8   temperature;
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdRSSI;
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+typedef struct
+{
+    kal_bool    pscan_before_cell_search;   /* True if UL1TST needs power scan before cell search/RSCP. */
+    kal_uint16  dl_freq;    /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+    kal_uint8   sample_num_per_cell;
+    kal_bool    read_sfn;   /* True if we need to do SFN measurement for the found cell. */
+
+    /* Below for RF_SetBBRxParams. */
+    kal_bool    hwAGC;
+    kal_uint8   mode;       /* 0: mode0, 1: mode1. */
+    kal_int16   gain;       /* mode0. */
+    kal_uint8   LNAmode;    /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16  pga;        /* mode1. */
+} URfTestCmdRSCP; //old
+
+typedef struct
+{
+    kal_uint16  dl_freq;    /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+} UTSTCmdRSCPV3lp; //new
+
+
+typedef struct
+{
+    kal_int16    dl_freq;     /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+    kal_uint16    afc_dac;
+    /* Below for RF_SetBBRxParams. */
+    kal_bool     hwAGC;
+    kal_uint8    mode;        /* 0: mode0, 1: mode1. */
+    kal_int16    gain;        /* mode0. */
+    kal_uint8    LNAmode;     /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+    kal_uint16   pga;         /* mode1. */
+} URfTestCmdAFC; //old
+
+typedef struct
+{
+    kal_int16    dl_freq;     /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+    kal_uint16    afc_dac;
+} UTSTCmdAFCV3lp; //new
+
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+
+typedef struct
+{
+
+   kal_bool      b_afc_dac_valid;
+   kal_uint16    u2_afc_dac;
+   kal_uint8     u1_loopbackType;
+   kal_uint8     u1_frame_shift;
+   kal_uint8     u1_rmc_type;
+   kal_uint8     u1_ctfc[4];
+   kal_uint8     u1_bit_pattern;
+
+   kal_int16     i2_dl_freq;
+   kal_int16     i2_dl_psc;
+   kal_int16     i2_dl_ovsf;
+
+   kal_int16     i2_ul_freq;
+   kal_uint16    u2_ul_tfci;
+   kal_uint32    u4_ul_sc_code;
+   kal_bool      b_iq_pwr_valid;
+   kal_uint8     u1_dpcch_pwr;
+   kal_uint8     u1_dpdch_pwr;
+
+}UL1D_RF_NSFT_REQ_T;
+/**
+ * NSFT List Mode command parameter
+ */
+typedef struct
+{
+   kal_bool    afc_dac_valid;
+   kal_uint16  afc_dac;
+   kal_uint8   loopbackType;
+   kal_uint8   frame_shift;
+   kal_uint8   rmc_type;
+   kal_uint8   ctfc[4];
+   kal_uint8   bit_pattern;
+/* DL parameters */
+   kal_int16   dl_freq[50];
+   kal_int16   dl_psc;
+   kal_int16   dl_ovsf;
+/* UL parameters */
+   kal_int16   ul_freq[50];
+   kal_uint16  ul_tfci;
+   kal_uint32  ul_sc_code;
+   kal_bool    iq_pwr_valid;
+   kal_uint8   dpcch_pwr;
+   kal_uint8   dpdch_pwr;
+/* common parameters */
+   kal_uint8   valid_freq;
+   kal_uint16  test_item[50];
+/* the time settings, unit = frame */
+   kal_uint16  full_test_time;
+   kal_uint8   ready_time;
+   kal_uint8   sync_time;
+   kal_uint8   retrial;   
+   kal_uint16  test_time;
+   kal_uint16  rx_rssi_start_time[3];
+   kal_uint8   rx_rssi_duration[3];
+   kal_uint16  rx_ber_start_time;
+   kal_uint8   rx_ber_duration;
+   kal_uint16  ILPC_ABC_time;
+   kal_uint16  ILPC_EF_time;
+   kal_uint16  ILPC_GH_time;
+   kal_uint16  transition_time;
+} URfNsftListModeReq;
+/**
+ * HSPA command parameter
+ */
+typedef struct
+{
+   kal_bool      b_afc_dac_valid;
+   kal_uint16    u2_afc_dac;
+   kal_uint8     u1_loopbackType;
+   kal_uint8     u1_frame_shift;
+   kal_uint8     u1_rmc_type;
+   kal_uint8     u1_ctfc[4];
+   kal_uint8     u1_bit_pattern;
+
+   kal_int16     i2_dl_freq;
+   kal_int16     i2_dl_psc;
+   kal_int16     i2_dl_ovsf;
+
+   kal_int16     i2_ul_freq;
+   kal_uint16    u2_ul_tfci;
+   kal_uint32    u4_ul_sc_code;
+   kal_bool      b_iq_pwr_valid;
+   kal_uint8     u1_dpcch_pwr;
+   kal_uint8     u1_dpdch_pwr;
+   kal_uint8     subTest;
+}URfTestCmdHspaNsft;
+
+typedef struct
+{
+    kal_uint16 measure_count;
+} URfTestCmdGetRfTempSensor;
+
+typedef struct
+{
+    kal_bool    bDataValid;
+    kal_uint32  u4TotalBits;
+    kal_uint32  u4ErrorBits;
+}UL1D_RF_NSFT_BET_BIT_CNT_FOR_BER_CNF_T;
+
+
+typedef struct
+{
+    kal_bool    ok;
+    kal_uint8   num_freq;
+    kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+    kal_int32   rssi[ FDD_MAX_FREQ_LIST ];
+} URfTestResultRSSI;
+
+// R8 both rx path RSSI result
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   num_freq;
+   kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi_rxd[ FDD_MAX_FREQ_LIST ];
+} URfTestResultRSSIRxD;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_int32   NSFT_RSSI;
+   kal_int32   NSFT_RSSI_RXD;
+   kal_int32   cmd_location;
+}URfTestResultNSFTRSSI;
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+typedef struct
+{
+    kal_uint16  psc;        /* Primary scrambling code */
+    kal_int32   tm;         /* Cell frame boundary offset to LST */
+    kal_int16   off;        /* Cell frame number offset to LST */
+    kal_bool    sttd;       /* True for STTD used. */
+    kal_uint8   sample_num;
+    kal_int16   rscp_sum;
+    kal_int16   freq_error;
+} URfTest_cpich_result_T;
+
+#define UL1_MAX_NUM_MEAS_CELL 32
+
+typedef struct
+{
+    kal_bool        ok;
+    kal_uint8       num_cell;
+    URfTest_cpich_result_T  cpich_result[ UL1_MAX_NUM_MEAS_CELL ];
+} URfTestResultRSCP; //old
+
+typedef struct
+{
+    kal_bool        ok;
+    kal_uint8       num_cell;
+    URfTest_cpich_result_T  cpich_result[ UL1_MAX_NUM_MEAS_CELL ];
+} UTSTestResultRSCPV3lp; //new
+
+typedef struct
+{
+    kal_bool       ok;
+    kal_uint16     psc;
+    kal_int32      tm;
+    kal_bool       sttd;
+    kal_uint8      rscp_sum;
+    kal_int16      freq_error;
+
+}URfTestResultAFC; //old
+
+typedef struct
+{
+    kal_bool       ok;
+    kal_uint16     psc;
+    kal_int32      tm;
+    kal_bool       sttd;
+    kal_uint8      rscp_sum;
+    kal_int16      freq_error;
+}UTSTestResultAFCV3lp; //new
+
+typedef struct
+{
+    kal_bool       ok;
+    kal_uint16     psc;
+    kal_int32      tm;
+    kal_bool       sttd;
+    kal_uint8      rscp_sum;
+    kal_int32      freq_error;
+}URfTestResultAFC_Ex; //old
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+typedef struct
+{
+    kal_uint32 m_u4Rfid;
+}URfTestResultRFID;
+
+typedef struct
+{
+    kal_uint8 m_u1Result;
+
+}URfTestResultPwrDtStep;
+
+typedef struct
+{
+    kal_uint16 m_u2Result;
+
+}URfTestResultPwrDtDac;
+
+typedef struct
+{
+    kal_uint8 m_u1Result;
+
+}URfTestResultPwrDtDefaultThr;
+
+typedef struct
+{
+    kal_bool      ok;
+    kal_int8      m_i1CurGainTableState;
+
+}URfTestResultReplaceGainTable;
+
+typedef struct
+{
+   kal_uint32      capability;
+   kal_uint32      band_support;
+   kal_uint32      rxd_band_support;   
+   kal_uint32      padrift_band_support;
+   kal_uint32      wcdma_dpd_band_support;
+}FT_UMTS_MsCapabilityEx;
+
+typedef struct
+{
+    kal_bool   ok;
+    kal_uint8  link_status;
+}FT_UMTS_NSFTLinkStatusReport;
+
+typedef struct 
+{
+    kal_bool    ok;    /*<! ok indicator */
+    kal_uint32  sum;   /*<! the sum of measure_count times of temp sensor result */
+} URfTestResultGetRfTempSensor;
+
+typedef struct
+{
+    kal_bool   ok;
+    kal_uint8  link_status;
+} URfNsftListModeCnf;
+
+typedef struct
+{
+    kal_uint16 rf_band_idx;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+} URfTestCmdSetMIPICodeWord;
+
+typedef struct
+{
+    kal_uint8  status;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+} URfTestResultGetMIPICodeWord;
+
+typedef struct
+{
+    kal_int16 status;
+    kal_int16 tadc_dac;
+    kal_int16 temperature;
+    kal_int16 temp_idx;
+} URfTestResultRfTemperatureInfo;
+
+typedef struct 
+{
+    kal_uint32      result;         // 1: support 0: not support
+    kal_uint32      query_op_code;  // query op code
+}URfCheckIfFuncExist;
+
+typedef  enum
+{
+   CNF_SUCCESS = 0,
+   CNF_GENERAL_FAIL = 1,
+   CNF_NVRAM_READ_FAIL = 2,
+   CNF_FREQ_INVALID = 3,
+   CNF_CMD_INVALID = 4,
+   CNF_NVRAM_SET_FAIL = 5,
+   CNF_TX_DATA_CHECK_FAIL = 6,
+   CNF_TX_STRUCTURE_ERROR = 7,
+   CNF_RX_STRUCTURE_ERROR = 8,
+   CNF_TX_VGA_FREQ_CHECK_FAIL=9,
+   CNF_TX_PWR_DT_FREQ_CHECK_FAIL=10,
+   CNF_GET_RXTX_PEER_BUF_OVERFLOW=11,     //after 6293
+   CNF_ADDRECORD_FAIL=12,                 //after 6293
+   CNF_GET_RXTX_PEER_BUF_ZERO=13          //after 6295
+}  NVRAM_ACCESS_RESULT_MSG;
+
+/*TX/RX calibration data------------------------------------------------------------------------------------->*/
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/*97 get/set command optimization Req--------------------------*/
+typedef struct
+{
+   kal_uint8   rxm_band_num;                       //the number of bands to GET
+   kal_uint8   rxd_band_num;
+   kal_uint8   tx_band_num;
+   kal_uint8   rxm_band_index[8];                  //Band index 
+   kal_uint8   rxd_band_index[8];
+   kal_uint8   tx_band_index[8];
+}UTSTReqGetRxTxCalDataV7lp;
+typedef struct
+{
+   kal_bool    is_uplate_to_NVRAM;                 //write to NVRAM or not
+   kal_uint8   rxm_count;                          //the number of bands to SET
+   kal_uint8   rxd_count;
+   kal_uint8   tx_count;
+   kal_uint16  rxm_offset;
+   kal_uint16  rxd_offset;
+   kal_uint16  tx_offset;
+}UTSTReqSetRxTxCalDataV7lp;           //Local parameter of request  after 6295 set Rx/Tx cal data command
+
+/*97 get/set command optimization Cnf--------------------------*/
+typedef struct
+{
+   kal_bool    ok;
+   NVRAM_ACCESS_RESULT_MSG   error_check;          //for calibration data checking
+   kal_uint8   rxm_count;                          //the number of bands to GET
+   kal_uint8   rxd_count;
+   kal_uint8   tx_count;
+   kal_uint8   padding;
+   kal_uint16  rxm_offset;                         //offset of data in peer buffer
+   kal_uint16  rxd_offset;
+   kal_uint16  tx_offset;
+}UTSTCnfGetRxTxCalDataV7lp;         //Local parameter of confirm  after 6297 get Rx/Tx cal data command 
+typedef struct
+{
+   kal_bool    ok;
+   NVRAM_ACCESS_RESULT_MSG   error_check;          //for calibration data checking
+   kal_uint8   rxm_result_num;                     //the number of bands to SET
+   kal_uint8   rxd_result_num;
+   kal_uint8   tx_result_num;
+   NVRAM_ACCESS_RESULT_MSG  rxm_result[8];         //result status of SET command for each band
+   NVRAM_ACCESS_RESULT_MSG  rxd_result[8];
+   NVRAM_ACCESS_RESULT_MSG  tx_result[8];
+}UTSTCnfSetRxTxCalDataV7lp;           //Local parameter of confirm after 6297 set Rx/Tx cal data command
+
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/*TX/RX calibration data<-------------------------------------------------------------------------------------*/
+
+/*RX calibration data------------------------------------------------------------------------------------->*/
+#define UTST_NVRAM_SIZE_V7 8
+
+typedef  struct
+{
+   kal_uint16   uarfcn;
+   kal_int16    path_loss_HPM[UTST_NVRAM_SIZE_V7];
+   kal_int16    path_loss_LPM[UTST_NVRAM_SIZE_V7];
+   kal_int16    path_loss_TKM[UTST_NVRAM_SIZE_V7];
+}UTST_LNA_PATHLOSS;       //after 6297 LNA pathloss format
+
+typedef struct
+{
+   kal_uint8               band;
+   kal_uint8               rxantpath;  // 1: main path  ,  2 : diversity path
+   kal_int16               temper_offset[CAL_TEMP_SECTION];
+   UTST_LNA_PATHLOSS       loss_of_uarfcn[CAL_UARFCN_SECTION];
+} UTSTPathlossV7;       //after 6297 get/set RX pathloss  (confirm/command : peer buffer)
+
+typedef struct
+{
+   kal_int16               temper_offset[CAL_TEMP_SECTION];
+}UTSTTemperoffsetV7;
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/*RX calibration data----------6293---------------------------------------------------------------------->*/
+#define UTST_NVRAM_SIZE_V3 7
+
+//typedef  struct
+//{
+//   kal_uint16  uarfcn;
+//   kal_int16    path_loss_HPM[UTST_NVRAM_SIZE_V3];
+//   kal_int16    path_loss_LPM[UTST_NVRAM_SIZE_V3];
+//} UTST_LNA_PATHLOSS;       //after 6293 LNA pathloss format
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/*TX calibration data------------------------------------------------------------------------------------->*/
+typedef struct
+{
+   kal_uint16  start;
+   kal_uint16  end;
+} UL1D_sHYSTERESISDATA;
+
+typedef struct
+{
+   kal_uint16  level_0;
+   kal_uint16  level_1;
+} UL1D_sDC2DC;
+
+typedef struct
+{
+   kal_uint16  max_uarfcn;
+   kal_int16   pwr_offset_dB;
+   kal_int16   pwr_offset_txdac;
+} UL1D_sARFCN_SECTION;
+
+typedef struct
+{
+   kal_uint16  dc2dc_level;
+   kal_uint16  vbias_dac;
+   kal_uint8   vm1;
+   kal_uint8   vm2;
+} UL1D_sPADATA;
+
+typedef struct
+{
+   kal_uint8   pa_mode;
+   kal_int8    prf;
+   kal_uint8   dc2dc_lvl;
+   kal_uint8   vm1;
+   kal_uint8   vm2;
+   kal_uint16  vbias_dac;
+   kal_uint16  pa_gain;
+} UL1D_sPMULEVHANDLE;
+
+typedef struct
+{
+   kal_uint8            octlev_num_section;
+   kal_uint8            reserved_byte;
+   kal_uint32           pa_phase_compensation[3];
+   UL1D_sPMULEVHANDLE   pmu_level_handle[8];//8
+   kal_uint16           pa_gain_g12a;
+   kal_uint16           pa_gain_g12b;
+}UL1D_sPAOCTLVLSETTING;
+
+typedef struct
+{
+   UL1D_sPADATA         pa_data;
+   kal_uint16           vga_dac[NUMBER_OF_VGA_DAC];
+   UL1D_sARFCN_SECTION  vga_comp_by_subband[CAL_UARFCN_SECTION];
+   kal_int16            vga_comp_by_temperature[8][2];
+} UL1D_sTXPOWERDATA;
+
+typedef struct
+{
+   kal_uint8            pwr_dt_thr;
+   kal_uint8            pwr_dt_section;
+   kal_uint16           pwr_dt_dac[CAL_PWR_DETECTOR_SECTION];
+   kal_int16            pwr_dt_value[CAL_PWR_DETECTOR_SECTION];
+   UL1D_sARFCN_SECTION  pwr_dt_comp_by_subband[CAL_UARFCN_SECTION];
+   kal_int16            pwr_dt_comp_by_temperature[8][2];
+} UL1D_sPWTDTDATA;
+
+typedef struct
+{
+   UL1D_sDC2DC             pa_dc2dc;
+   UL1D_sTXPOWERDATA       power_dac[3];
+   UL1D_sHYSTERESISDATA    tx_hvsteresis[2];
+   UL1D_sPWTDTDATA         pwr_dt_data;
+} UL1D_sRAMPDATA;
+
+typedef struct
+{
+   kal_uint8               band;
+   UL1D_sRAMPDATA          txdacData;
+   UL1D_sPAOCTLVLSETTING   txPAOCTLevelData;
+} URfTestTXDaTaItem;
+
+/*******************************************************************************
+ * WCDMA DPD common
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_WCDMA_DPD_91 = 0,
+   URF_TEST_WCDMA_DPD_92 = 1,
+   URF_TEST_WCDMA_DPD_93 = 2,
+   URF_TEST_WCDMA_DPD_95 = 3
+}URfTest_Wcdma_Dpd_Generation;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_START_DPD_FAC_CAL_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_START_DPD_INVALID               = 0,
+   URF_TEST_START_DPD_OK                    = 1,
+   URF_TEST_START_DPD_PEER_SIZE_MISMATCH    = 2,
+   URF_TEST_START_DPD_EXCEED_TTG_LIMIT_INIT = 3,
+   URF_TEST_START_DPD_EXCEED_TTG_LIMIT      = 4,
+   URF_TEST_START_DPD_NEGATIVE_PA_GAIN      = 5,
+   URF_TEST_START_DPD_LARGE_PA_GAIN_DIFF    = 6   
+
+}URfTest_StartDpdFacCal_Status;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+   kal_uint16 cal_band[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_StartDpd_ReqInfo;
+
+typedef struct
+{
+   kal_uint8  status; /* URfTest_StartDpdPaAndDpdFacCal_Status */
+   kal_uint16 curr_band_idx;    
+   kal_uint32 curr_subband_idx;
+   kal_uint32 curr_gain_idx;   
+   kal_int16  curr_pa_gain;
+   
+}URfTestCmd_StartDpd_CnfInfo;
+
+typedef struct
+{
+   kal_uint16 band_idx;
+   kal_uint16 apt_ref_channel;
+   kal_int16  tpc_wanted_p_offset;
+   
+}URfTest_AptRefChannel_OneBand;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTest_AptRefChannel_OneBand wcdma_apt_channel_info[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_StartDpdPaAndDpdFacCal_ReqPdu;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_SET_DPD_FAC_RESULT_V3 and MMRF_TEST_CMD_GET_DPD_FAC_RESULT_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_SET_DPD_INVALID            = 0,
+   URF_TEST_SET_DPD_OK                 = 1,
+   URF_TEST_SET_DPD_PEER_SIZE_MISMATCH = 2,
+   URF_TEST_SET_DPD_INVALID_BAND       = 3
+   
+}URfTest_SetDpdFacCal_Status;
+
+typedef enum
+{
+   URF_TEST_GET_DPD_INVALID            = 0,
+   URF_TEST_GET_DPD_OK                 = 1,
+   URF_TEST_GET_DPD_INVALID_BAND       = 2   
+   
+}URfTest_GetDpdFacCal_Status;
+
+typedef struct
+{
+   /* Tool can set several band in one set command */
+   kal_uint16 num_of_band;
+
+}URfTestCmd_SetDpdAll_ReqInfo;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+   kal_uint8  status; /* URfTest_SetDpdFacCal_Status */
+
+}URfTestCmd_SetDpdAll_CnfInfo;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+
+}URfTestCmd_SetDpdPartial_ReqInfo;
+
+typedef struct
+{
+   kal_uint16 num_of_band;
+   kal_uint8  status; /* URfTest_SetDpdPaAndDpdFacCal_Status */
+
+}URfTestCmd_SetDpdPartial_CnfInfo;
+
+typedef struct
+{   
+   kal_uint16           band_idx;
+   kal_uint8            dpd_cal_done;
+   kal_int16            dpd_tr[CAL_UARFCN_SECTION];
+
+   /* ramp */   
+   kal_int16            vga_comp_subband[UL1D_DPD_MAX_PA_MODE_NUM][CAL_UARFCN_SECTION];
+   kal_int16            vga_comp_temperature[UL1D_DPD_MAX_PA_MODE_NUM][UL1_DPD_MAX_PA_LEVEL_NUM];
+   UL1D_sHYSTERESISDATA tx_hysteresis[UL1D_DPD_MAX_PA_HYST_NUM];
+
+   /* paoct */
+   kal_uint8            octlev_num_section;
+   kal_uint32           pa_phase_compensation[UL1D_DPD_MAX_PA_MODE_NUM];
+   UL1D_sPMULEVHANDLE   pmu_level_handle[UL1_DPD_MAX_PA_LEVEL_NUM];
+
+}URfTest_SetGetDpd_TpcPeer;
+
+typedef struct
+{
+   kal_uint8  lut[UL1_DPD_MAX_AM_LUT_GAIN_NUM][MMDPD_MAX_AM_LUT_PWR_NUM];
+
+}URfTest_DPDAMLutSubBand;
+
+typedef struct
+{
+   kal_int8  lut[UL1_DPD_MAX_PM_LUT_GAIN_NUM][MMDPD_MAX_PM_LUT_PWR_NUM];
+
+}URfTest_DPDPMLutSubBand;
+
+typedef struct
+{
+   kal_int16               dpdImplicitArray[UL1_DPD_MAX_IMPLICIT_NUM]; /* For the parameters whose name will not be shown in cal file */	
+   URfTest_DPDAMLutSubBand am_lut_subband[CAL_UARFCN_SECTION];
+   URfTest_DPDPMLutSubBand pm_lut_subband[CAL_UARFCN_SECTION];
+
+}URfTest_SetGetDpd_DpdPeer;
+
+typedef struct
+{   
+   URfTest_SetGetDpd_TpcPeer dpdtpc_peer;
+   URfTest_SetGetDpd_DpdPeer dpd_peer;
+
+}URfTestCmd_SetDpdFacCalAll_OneBand, URfTestCmd_GetDpdFacCalAll_OneBand;
+
+typedef struct
+{
+   URfTest_SetGetDpd_TpcPeer dpdtpc_peer;
+
+}URfTestCmd_SetDpdFacCalPartial_OneBand;
+
+typedef struct
+{             
+   kal_uint16 num_of_band;
+   kal_uint16 band_idx[MAX_SUPPORTED_BAND_INDEX];
+             
+}URfTestCmd_GetDpdAll_ReqInfo;
+
+typedef struct
+{
+   kal_uint8  get_status; /* URfTest_GetDpdPaAndDpdFacCal_Status */
+   kal_uint16 num_of_band;
+
+}URfTestCmd_GetDpdAll_CnfInfo;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTestCmd_GetDpdFacCalAll_OneBand get_peer[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_GetDpdFacCalAll_CnfPdu;
+
+typedef struct
+{  
+   URfTestCmd_SetDpdFacCalAll_OneBand set_all_peer[MAX_SUPPORTED_BAND_INDEX];
+   
+}URfTestCmd_SetDpdFacCalAll_ReqPdu;
+
+typedef struct
+{
+   URfTestCmd_SetDpdFacCalPartial_OneBand set_partial_peer[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_SetDpdFacCalPartial_ReqPdu;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_SET_DPD_PATH_DELAY_SEARCH_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_SET_DPD_DELAY_INVALID            = 0,
+   URF_TEST_SET_DPD_DELAY_VALID              = 1,
+   URF_TEST_SET_DPD_DELAY_PEER_SIZE_MISMATCH = 2
+   
+}URfTest_SetDpdPathDelaySearchV3_Status;
+
+typedef struct
+{
+   /* Tool can set several band in one set command */
+   kal_uint16 band_num;
+
+}URfTestCmd_SetDpdPathDelaySearchV3_ReqInfo;
+
+typedef struct
+{
+   kal_uint16   rf_band;
+   kal_uint16   subband_freq[CAL_UARFCN_SECTION];
+   kal_int16    dpd_tr[CAL_UARFCN_SECTION];
+
+}URfTest_SetDpdPathDelaySearchV3_ReqPeer_OneBand;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTest_SetDpdPathDelaySearchV3_ReqPeer_OneBand dpd_one_band[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_SetDpdPathDelaySearchV3_ReqPdu;
+
+/* Confirm */
+typedef struct
+{
+   kal_uint16 band_num;
+   kal_uint16 status;
+
+}URfTestCmd_SetDpdPathDelaySearchV3_CnfInfo;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_START_DPD_PATH_DELAY_SEARCH_V3
+ ******************************************************************************/
+typedef enum
+{
+   URF_TEST_START_DPD_DELAY_INVALID       = 0,
+   URF_TEST_START_DPD_DELAY_VALID         = 1,
+   URF_TEST_START_DPD_DELAY_TIMEOUT       = 2,
+   URF_TEST_START_DPD_DELAY_SEARCH_FAILED = 3
+}URfTest_StartDpdPathDelaySearchV3_Status;
+
+/* Request */
+typedef struct
+{
+   kal_uint16 test_times;
+   kal_uint16 search_band[MAX_SUPPORTED_BAND_INDEX];
+}URfTestCmd_StartDpdPathDelaySearchV3_ReqInfo;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_GET_DPD_PATH_DELAY_SEARCH_V3
+ ******************************************************************************/
+ 
+/* Request */
+typedef struct
+{             
+   kal_uint16        band_num;
+   kal_uint16        rf_band_info[MAX_SUPPORTED_BAND_INDEX];
+   
+}URfTestCmd_GetDpdPathDelaySearchV3_ReqInfo;
+
+
+/* Confirm */
+
+typedef enum
+{
+   URF_TEST_GET_DPD_DELAY_INVALID = 0,
+   URF_TEST_GET_DPD_DELAY_VALID   = 1   
+   
+}URfTest_GetDpdPathDelaySearchV3_Status;
+
+typedef struct
+{
+   kal_uint16 band_num;
+   kal_uint16 get_status; /* URfTest_GetDpdPathDelaySearchV3_Status */
+
+}URfTestCmd_GetDpdPathDelaySearchV3_CnfInfo;
+
+typedef struct
+{
+   kal_uint16   rf_band;
+   kal_int16    dpd_tr[CAL_UARFCN_SECTION];
+
+}URfTest_GetDpdPathDelaySearchV3_CnfPeer_OneBand;
+
+/* struct for GP tool */
+typedef struct
+{
+   URfTest_GetDpdPathDelaySearchV3_CnfPeer_OneBand dpd_delay_one_band[MAX_SUPPORTED_BAND_INDEX];
+
+}URfTestCmd_GetDpdPathDelaySearchV3_CnfPdu;
+
+/*******************************************************************************
+ * MMRF_TEST_CMD_SET_DPD_FAC_RESULT_V3 and MMRF_TEST_CMD_GET_DPD_FAC_RESULT_V3
+ ******************************************************************************/
+/* Reuqest */
+typedef enum
+{
+   URF_TEST_TRAD_CAL_EXE_INVALID = 0,
+   URF_TEST_TRAD_CAL_EXE_START   = 1,
+   URF_TEST_TRAD_CAL_EXE_END     = 2
+   
+}URfTest_TradCal_Exe_Status;
+
+typedef struct
+{
+   kal_uint32 exe_status; /* URfTest_TradCal_Exe_Status */
+   
+}URfTestCmd_TradCal_ReqInfo;
+
+/* Confirm */
+typedef enum
+{
+   URF_TEST_TRAD_CAL_CMD_INVALID = 0,
+   URF_TEST_TRAD_CAL_CMD_OK      = 1
+   
+}URfTest_TradCal_Cmd_Status;
+
+typedef struct
+{
+   kal_uint32 cmd_status; /* URfTest_TradCal_Cmd_Status */
+   
+}URfTestCmd_TradCal_CnfInfo;
+
+/******************************************************************************/
+/*TX calibration data<-------------------------------------------------------------------------------------*/
+
+typedef  enum
+{
+   SETUP_FAIL_GENERAL = 0,
+   SETUP_FAIL_TCM_MISMATCH = 1,
+   SETUP_FAIL_TDD_TIMER_STILL_RUNNING = 2,
+}  UBIN_MODE_SETUP_FAIL_MSG;
+
+typedef struct
+{
+    kal_bool                ok;
+    kal_int8                setup_result;
+} URfTestResultUbinModeSetup;
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/*------------------------------6297 Get FHC Information from TST---------------------------------------*/
+#define UL1TST_WCDMA_BAND_SUPPORT_V7 8
+#define UL1TST_HPM_POINT_V7 8
+#define UL1TST_LPM_POINT_V7 5
+#define UL1TST_TKM_POINT_V7 1
+
+typedef struct
+{
+   kal_uint8 calibration_band_number;
+   kal_uint8 calibration_band[UL1TST_WCDMA_BAND_SUPPORT_V7];         // band 1 : band index = 0
+}UTSTReqGetCalInfoV7lp;  // request local parameter
+
+typedef struct
+{
+   kal_uint8 support_band_number;
+}UTSTCnfGetCalInfoV7lp; // conform local parameter
+
+typedef struct
+{
+   kal_uint8   band;
+   kal_uint8   cal_point_hpm;
+   kal_uint8   cal_point_lpm;
+   kal_uint8   cal_point_tkm;
+   kal_uint8   rx_cal_sequency[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];
+   kal_int16   rx_cal_dl_power_min[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];  //s.5
+   kal_int16   rx_cal_dl_power_max[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];  //s.5
+   kal_int16   rx_cal_dl_power[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];      //s.5
+   kal_uint8   rx_lna_mode[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];
+   kal_uint8   rx_location_idx[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];
+   kal_bool    rxloss_usage[3][UL1TST_HPM_POINT_V7];
+}UTSTCnfGetCalInfoV7pb; 
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/*------------------------------6297 START FHC---------------------------------------*/
+#define UL1TST_FHC_FREQUENCY_NUMBER  15
+
+typedef struct
+{
+   kal_uint8   cal_band_number;
+   kal_uint8   cal_band[UL1TST_WCDMA_BAND_SUPPORT_V7];
+   kal_uint8   antenna_setting;
+   kal_uint8   step_duration;
+}UTSTReqFHCV7lp;
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+typedef struct
+{
+/*common*/
+   kal_uint8   band;
+   kal_uint8   freq_count;
+   kal_uint8   pwr_count;
+   kal_uint8   hpm_cal_point;
+   kal_uint8   lpm_cal_point;
+   kal_uint8   tkm_cal_point;
+/*RX*/
+   kal_uint8   pwr_mode[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7]; //0:HPM 1:LPM 2:TKM
+   kal_uint8   rx_cal_sequency[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];
+/*TX*/
+   kal_uint8   pa_mode[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];
+   kal_uint8   vga_dac_tpc_idx[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];
+   kal_uint8   pa_section[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];
+   kal_uint16  pa_gain[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];
+/*RX*/
+   kal_int16   rx_cal_dl_power[UL1TST_HPM_POINT_V7+UL1TST_LPM_POINT_V7+UL1TST_TKM_POINT_V7];
+/*UARFCN*/
+   kal_uint16  dl_uarfcn[UL1TST_FHC_FREQUENCY_NUMBER];
+   kal_uint16  ul_uarfcn[UL1TST_FHC_FREQUENCY_NUMBER];
+/*Initial file data*/
+   URfTestTXDaTaItem      tx_cal_data_info;
+   UTSTTemperoffsetV7     rx_temperoffset_info;
+   UTSTTemperoffsetV7     rxd_temperoffset_info;
+}UTSTReqFHCV7pb;    //band unit  it depends on local parameter cal band number expend to array
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/*------------------------------6297 GET FHC RESULT----------------------------------------*/
+typedef struct
+{
+   kal_uint16     ul_uarfcn;
+   kal_int16      pd_value_h;
+   kal_int16      pd_value_m;
+   kal_int16      pd_value_l;
+} UL1TST_FHC_PD_RESULT_INFO ;
+
+typedef struct
+{
+   kal_uint16  dl_uarfcn;
+   kal_int16   hpm_rssi[UL1TST_HPM_POINT_V7];
+   kal_int16   lpm_rssi[UL1TST_LPM_POINT_V7];
+   kal_int16   tkm_rssi[UL1TST_TKM_POINT_V7];
+} UL1TST_FHC_PATHLOSS_RESULT_INFO ;
+
+typedef struct
+{
+   kal_uint8                        band;
+   UL1TST_FHC_PD_RESULT_INFO        pd_result[UL1TST_FHC_FREQUENCY_NUMBER];
+   UL1TST_FHC_PATHLOSS_RESULT_INFO  rx_rssi_result[UL1TST_FHC_FREQUENCY_NUMBER];
+   UL1TST_FHC_PATHLOSS_RESULT_INFO  rxd_rssi_result[UL1TST_FHC_FREQUENCY_NUMBER];
+} UTSTCnfFHCResultV7pb ;     //band unit
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   error_code;
+   kal_uint8   band_number;      // indicate how many band's report in peer buffer
+} UTSTCnfFHCResultV7lp;
+/*for 93-95 co-file , "Gen":stand for any generation- add in api ready*/
+typedef UTSTCnfFHCResultV7pb UTSTCnfGetFHCResultGenpb;
+#if 0
+/* under construction !*/
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/*-----------------------------6297 GET RSSI-----------------------------------------*/
+typedef struct
+{
+   kal_bool    hwAGC;
+   kal_bool    conti_rssi;
+   kal_uint8   temperature;
+   kal_uint8   antenna_path;
+   kal_uint8   power_mode; //0:HPM 1:LPM 2:talking mode
+   kal_uint16  uarfcn;
+   kal_uint16  rx_rf_gain;
+   kal_uint16  rxd_rf_gain;
+   kal_uint16  rx_digital_gain;
+   kal_uint16  rxd_digital_gain;
+} UTSTReqGetRSSIV7lp;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   rx_lna_mode;
+   kal_uint8   rxd_lna_mode;
+   kal_uint16  uarfcn;
+   kal_int16   rx_rssi;
+   kal_int16   rxd_rssi;
+   kal_uint16  rx_used_gain;
+   kal_uint16  rxd_used_gain;
+} UTSTCnfGetRSSIV7lp;
+/*for 93-95 co-file , "Gen":stand for any generation-add in API ready*/
+typedef UTSTCnfGetRSSIV7lp UTSTCnfGetRSSIGenlp;
+/*-----------------------------6297 power to gain-----------------------------------------*/
+typedef struct
+{
+   kal_uint8   antenna_path;
+   kal_uint8   power_mode; //0:HPM 1:LPM 2:talking mode
+   kal_uint8   rx_cal_sequency;
+   kal_int16   rx_dl_power;
+} UTSTReqPwrtoGainV7lp;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint16  rx_digital_gain;
+   kal_uint16  rxd_digital_gain;
+   kal_uint16  rx_rf_gain;
+   kal_uint16  rxd_rf_gain;
+}UTSTCnfPwrtoGainV7lp;
+
+/*-----------------------------6297 lna to gain-----------------------------------------*/
+typedef struct
+{
+   kal_uint8   band;
+   kal_uint8   antenna_path;
+   kal_uint8   power_mode; //0:HPM 1:LPM 2:talking mode
+   kal_uint8   rx_lna_mode;
+   kal_uint8   rxd_lna_mode;
+} UTSTReqLnatoGainV7lp;
+
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint16  rx_digital_gain;
+   kal_uint16  rxd_digital_gain;
+   kal_uint16  rx_rf_gain;
+   kal_uint16  rxd_rf_gain;
+   kal_int16   dl_power;
+}UTSTCnfLnatoGainV7lp;
+
+/*-----------------------------6297 TX power adjust-----------------------------------------*/
+typedef struct
+{
+   kal_int8 adjust_pwr;
+}UTSTReqTxPwrAdjustV7lp;
+
+typedef struct
+{
+   kal_bool ok;
+   kal_int16 current_power;
+}UTSTCnfTxPwrAdjustV7lp;
+/*-----------------------------6297 DPCH TX-----------------------------------------*/
+typedef struct
+{
+    kal_uint16  ul_freq;
+    kal_int16   psc;        /* 0~511. */
+    kal_uint32  sc_code;    /* Scrambling code #. 0 ~ 16777215 */
+    kal_uint8   power_ctrl_mode;
+    kal_uint8   pa_mode;
+    kal_int16   prf;
+    kal_uint16  afc_dac;
+    kal_uint8   dpcch_pwr;
+    kal_uint8   dpdch_pwr;
+
+    /* Below for UL1D_RF_Meta_SetTxInfo. */
+    kal_bool    no_loop_ctrl;
+
+    /* Below for setPaApcDac. */
+    kal_uint8   rf_band;
+    kal_uint8   vm1;
+    kal_uint8   vm2;
+    kal_uint16  dc2dc_dac;
+    kal_uint16  vbias_dac;
+    kal_bool    pwr_det;
+    kal_uint16  apc_dac;
+    kal_bool    pa_octlev_ctrl_used;
+}UTSTReqTxDPChV7lp;
+
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/*-----------------------------6293 ATE tool T-put-----------------------------------------*/
+//trigger IQ dump
+typedef struct
+{
+   kal_uint16   enable_iq_dump;              //enable or disable IQ dump mode.
+   kal_uint16   ant_idx;                 //0=RX main antenna, 1=RX diversity antenna.
+}UTSTReqTriggerIqDumpModeV3lp;  // request local parameter
+
+typedef struct
+{
+   kal_uint16   dump_status;             //1=enable IQ dump mode successfully
+}UTSTCnfTriggerIqDumpModeV3lp; // conform local parameter
+
+//get IQ dump result
+typedef struct
+{
+   kal_uint16   is_data_ready;           //1=IQ raw data is ready
+   kal_uint16   data_section_length;     //length of IQ raw data in corresponding peer buffer
+}UTSTCnfGetIqDumpResultV3lp; // confirm local parameter
+
+typedef struct
+{
+   kal_int16   i_data;
+   kal_int16   q_data;
+}UTSTCnfGetIqDumpResultV3pb;// confirm peer buffer :RFEQ unit 
+//set RFEQ
+typedef struct
+{
+   kal_uint16   rfeq_set_num; //number of subband RFEQ to update
+}UTSTReqSetRfeqSubbandV3lp;   // request local parameter
+
+typedef struct
+{
+   kal_uint16    band;                   //UMTS band
+   kal_uint16    subband_idx;            //which sub-band that user want to fill
+   kal_uint16    max_uarfcn;             //max uarfcn of this subband
+   kal_uint8     ant_idx;                //which antenna should be write in this command. 0: RX Main, 1:RX Div
+   kal_bool      rfeq_enable;            //RFEQ enable or not. 
+   kal_int16     rfeq_coef_real[7];      //RFEQ real part coefficient. 7 taps.
+   kal_int16     rfeq_coef_imag[7];      //RFEQ image part coefficient. 7 taps. 	
+}UTSTReqSetRfeqSubbandV3pb;  // request peer buffer : subband unit
+
+typedef struct
+{
+   kal_uint16   is_rfeq_set;             //1=RFEQ is set to NVRAM successfully
+}UTSTCnfSetRfeqSubbandV3lp; // confirm local parameter
+
+/*----------------------------------------------------------------------*/
+/*-----------------------------6295 get/set NSFT TX POWER offset-------------------------*/
+typedef struct
+{
+   kal_uint8 band;
+}UTSTReqGetTXpowerOffsetV5lp;
+
+typedef struct
+{
+   kal_uint8 band;
+   kal_int16 offset;
+}UTSTCnfGetTXpowerOffsetV5lp;
+
+typedef struct
+{
+   kal_bool updatenvram;
+   kal_uint8 band;
+   kal_uint16 ul_uarfcn;
+   kal_int16 offset;
+}UTSTReqSetTXpowerOffsetV5lp;
+
+typedef struct
+{
+   kal_bool ok;
+}UTSTCnfSetTXpowerOffsetV5lp;
+/*---------------------------------------------------------------------------------------*/
+typedef struct
+{
+   URfTestCmdType   urf_test_cmd_type;
+   void           (*handler)( ilm_struct* );
+}UL1TST_RF_TEST_HANDLER_T;
+/* ------------------------------------------------------------------------------------------- *\
+|*                                                   U_RESET_BIT_COUNT                                                                             *|
+\* ------------------------------------------------------------------------------------------- */
+
+typedef struct
+{
+   kal_uint32  meaningless;
+} URFTestCmdResetBERResult;
+
+typedef struct
+{
+   kal_bool ok;
+   kal_uint32  u4TotalBits;
+   kal_uint32  u4ErrorBits;
+} URFTestResultResetBERResult;
+/*---------------------------------------------------------------------------------------------*/
+typedef union
+{
+   kal_uint8                                 m_u1RfBand;
+   kal_uint8                                 m_u1PwrCtrlMode;
+   kal_uint8                                 m_u1TableType;                // 1: special table for calibration, 2: normal table
+   kal_uint8                                 m_u1ILPCStep;
+   kal_uint16                                m_u2TxPclIndex;
+   kal_uint16                                rf_band_idx;
+/* PA drift compensation */
+   kal_uint8                                 is_PaDrift;                   /*R8< \brief the parameter to UL1 for PA drift compensation setting (1: turn on, 0: turn off) */
+/* R8 RF tool */
+   kal_uint8                                 is_5mhz;
+   kal_uint8                                 is_main;
+   kal_uint32                                m_rBSIData;
+   kal_uint32                                m_rBSIAddr;
+/* DCXO development */
+   kal_uint32                                m_u4CapId;
+/* WM Switch */
+   kal_uint8                                 ubin_fdd_mode_init;           //  1 : UBIN mode Init 3G FDD ,      0 : UBIN mode de-init 3G FDD
+   URfTestCmdAFC                             afc;
+   URfTestCmdRSCP                            rscp;
+   URfTestCmdType                            query_op_code;
+   //URfTestCmdTxDPCh                          txdpch;
+   URfTestCmdTxAccess                        txaccess;
+   URfTestCmdSetMIPICodeWord                 set_mipi_cw_param;
+   URfTestCmdGetRfTempSensor                 rfTemperature;
+   kal_int32                                 m_i4IcsCellPower;             /**< \brief pass cell power to UL1 to choose the best initial gain for ICS */
+   URFTestCmdResetBERResult                  resetBERResult;
+   UTSTCmdRSCPV3lp                           rscp_v3_lp;
+   UTSTCmdAFCV3lp                            afc_v3_lp;
+   //UTSTReqGetCalInfoV5lp                     get_cal_info_v5_lp;           //6295 get FHC infomation from RFD & FEC
+   //UTSTReqFHCV5lp                            fhc_control_v5_lp;            //6295 FHC flow control infomation
+   //URfTestCmd_GetRxTxCalData_ReqParam_V5     get_RxTx_cal_data_command_v5_lp;  //after6295
+   //URfTestCmd_SetRxTxCalData_ReqParam_V5     set_RxTx_cal_data_command_v5_lp;  //after6295
+   //UTSTReqGetRSSIV5lp                        get_rssi_v5_lp;               //6295 RF tool RSSI
+   //UTSTReqPwrtoGainV5lp                      pwr_to_gain_v5_lp;            //6295 Tradk, NSFT
+   //UTSTReqLnatoGainV5lp                      lna_to_gain_v5_lp;            //6295 RF tool get RSSI calculator
+   UTSTReqTriggerIqDumpModeV3lp              trigger_iq_dump_v3_lp;    //Trigger IQ dump
+   UTSTReqSetRfeqSubbandV3lp                 set_rfeq_subband_v3_lp;   //Set RFEQ subband result
+   UTSTReqGetTXpowerOffsetV5lp               get_tx_power_offset_v5_lp;    //6295 get TX power offset in NSFT
+   UTSTReqSetTXpowerOffsetV5lp               set_tx_power_offset_v5_lp;    //6295 set TX power offset in NSFT
+   UTSTReqGetCalInfoV7lp                     get_cal_info_v7_lp;
+   UTSTReqFHCV7lp                            fhc_control_v7_lp;
+   UTSTReqGetRxTxCalDataV7lp                 get_RxTx_cal_data_v7_lp;
+   UTSTReqSetRxTxCalDataV7lp                 set_RxTx_cal_data_v7_lp;
+   UTSTReqGetRSSIV7lp                        get_rssi_v7_lp;
+   UTSTReqPwrtoGainV7lp                      pwr_to_gain_v7_lp;
+   UTSTReqLnatoGainV7lp                      lna_to_gain_v7_lp;
+   UTSTReqTxPwrAdjustV7lp                    tx_pwr_adjust_v7_lp;
+   UTSTReqTxDPChV7lp                         txdpch_v7_lp;
+}URfTestCmdParam;
+
+typedef union
+{
+   kal_bool                                  ok;
+   kal_uint8                                 nvramAccessResult;
+   kal_uint8                                 currentLnaMode;
+   kal_int16                                 m_u2PwrDetResult;
+   kal_uint32                                bsi_data;
+   kal_uint32                                m_u4MaxCapId;
+   FT_UMTS_MsCapabilityEx                    m_rTargetCapability;
+   FT_UMTS_NSFTLinkStatusReport              m_rNSFTLinkStatusReport;
+   URfNsftListModeCnf                        m_rNSFTListModeLinkStatusReport;
+   UL1D_RF_NSFT_BET_BIT_CNT_FOR_BER_CNF_T    m_rNSFTBERResult;
+   URfTestResultAFC                          afc;
+   URfTestResultRFID                         rfid;
+   URfCheckIfFuncExist                       CheckIfFuncExist;
+   URfTestResultAFC_Ex                       afc_ex;
+   URfTestResultPwrDtDac                     pwr_dt_dac;
+   URfTestResultPwrDtStep                    pwr_dt_step;
+   URfTestResultGetRfTempSensor              rfTemperature;
+   URfTestResultGetMIPICodeWord              get_mipi_cw_param;
+   URfTestResultPwrDtDefaultThr              pwr_dt_default_thr;
+   URfTestResultReplaceGainTable             replace_gain_table;
+   URfTestResultRfTemperatureInfo            rfTemperatureInfo;
+   URfTestResultUbinModeSetup                ubin_mode_setup_result;
+   URfTestResultNSFTRSSI                     ft_rpt_nsft_rssi;                   /*for getting RSSI value during NSFT*/
+   URFTestResultResetBERResult               resetBERResult;
+   //UTSTCnfGetCalInfoV5lp                     cnf_get_cal_info_v5_lp;          //6295 get calibration information
+   //UTSTCnfFHCV5lp                            cnf_fhc_control_v5_lp;           //6295 FHC flow control infomation
+   //UTSTCnfGetFHCResultV5lp                   cnf_fhc_report_v5_lp;            //6295 fhc report
+   //URfTestCmd_GetRxTxCalData_CnfParam_V5     get_RxTx_cal_data_process_result_v5_lp; //6295 get data
+   //URfTestCmd_SetRxTxCalData_CnfParam_V5     set_RxTx_cal_data_process_result_v5_lp; //6295 set data
+   //UTSTCnfGetRSSIV5lp                        cnf_get_rssi_v5_lp;              //6295 RF tool RSSI
+   //UTSTCnfPwrtoGainV5lp                      cnf_pwr_to_gain_v5_lp;           //6295 Tradk, NSFT
+   //UTSTCnfLnatoGainV5lp                      cnf_lna_to_gain_v5_lp;           //6295 RF tool get RSSI calculator
+   UTSTCnfTriggerIqDumpModeV3lp              cnf_trigger_iq_dump_v3_lp;     //Trigger IQ dump
+   UTSTCnfGetIqDumpResultV3lp                cnf_get_iq_data_v3_lp;         //Get IQ dump result
+   UTSTCnfSetRfeqSubbandV3lp                 cnf_set_rfeq_subband_v3_lp;    //Set RFEQ subband result
+   UTSTCnfGetTXpowerOffsetV5lp               cnf_get_tx_power_offset_v5_lp;   //6295 get TX power offset in NSFT
+   UTSTCnfSetTXpowerOffsetV5lp               cnf_set_tx_power_offset_v5_lp;   //6295 set TX power offset in NSFT
+   UTSTCnfGetCalInfoV7lp                     cnf_get_cal_info_v7_lp;
+   //UTSTCnfFHCV7lp                            cnf_fhc_control_v7_lp;
+   UTSTCnfFHCResultV7lp                      cnf_fhc_report_v7_lp;
+   UTSTCnfGetRxTxCalDataV7lp                 cnf_get_RxTx_cal_data_v7_lp;
+   UTSTCnfSetRxTxCalDataV7lp                 cnf_set_RxTx_cal_data_v7_lp;
+   UTSTCnfGetRSSIV7lp                        cnf_get_rssi_v7_lp;
+   UTSTCnfPwrtoGainV7lp                      cnf_pwr_to_gain_v7_lp;
+   UTSTCnfLnatoGainV7lp                      cnf_lna_to_gain_v7_lp;
+   UTSTCnfTxPwrAdjustV7lp                    cnf_tx_pwr_adjust_v7_lp;
+} URfTestResultParam;
+
+typedef struct
+{
+    FT_HDR
+    URfTestCmdType     type;
+    URfTestCmdParam    param;
+} ft_urf_test_req_T;
+
+typedef struct
+{
+    FT_HDR
+    URfTestCmdType     type;
+    URfTestResultParam param;
+} ft_urf_test_cnf_T;
+
+typedef ft_urf_test_req_T ft_to_ul1tst_struct;
+typedef ft_urf_test_cnf_T ul1tst_to_ft_struct;
+
+typedef ft_urf_test_req_T ft_urf_test_req_id_struct;
+typedef ft_urf_test_cnf_T ft_urf_test_cnf_id_struct;
+
+typedef struct
+{
+   kal_uint32  param_not_used;
+}UTST_pb_null_struct;
+
+#endif  // #if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
+
+#endif // #ifndef __FT_MSG_UL1RF_H__
diff --git a/mcu/interface/middleware/meta/ft_msg_util.h b/mcu/interface/middleware/meta/ft_msg_util.h
new file mode 100644
index 0000000..ba9ca78
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_msg_util.h
@@ -0,0 +1,250 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_util.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Messages definition of UTIL category of FT Library
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef __FT_MSG_UTIL_H__
+#define __FT_MSG_UTIL_H__
+#include "ft_msg_common.h"
+
+/*******************************************************************************
+*
+*  Message structures defined for utility command 
+*
+*******************************************************************************/
+
+typedef enum {
+FT_UTILCMD_CHECK_IF_FUNC_EXIST = 0
+    ,FT_UTILCMD_CHECK_IF_ISP_SUPPORT
+    ,FT_UTILCMD_QUERY_BT_MODULE_ID
+    ,FT_UTILCMD_ENABLE_WATCHDOG_TIMER
+    ,FT_UTILCMD_CHECK_IF_ACOUSTIC16_SUPPORT
+    ,FT_UTILCMD_CHECK_IF_AUDIOPARAM45_SUPPORT
+    ,FT_UTILCMD_CHECK_IF_LOW_COST_SINGLE_BANK_FLASH
+    ,FT_UTILCMD_QUERY_PMIC_ID
+    ,FT_UTILCMD_BT_POWER_ON
+    ,FT_UTILCMD_LED_LIGHT_LEVEL
+    ,FT_UTILCMD_VIBRATOR_ONOFF
+    ,FT_UTILCMD_QUERY_LOCAL_TIME
+    ,FT_UTILCMD_CHECK_IF_WIFI_ALC_SUPPORT
+    ,FT_UTILCMD_RF_ITC_PCL
+    ,FT_UTILCMD_CHECK_IF_DRC_SUPPORT
+    ,FT_UTILCMD_CHECK_IF_BT_POWERON
+    ,FT_UTILCMD_MAIN_SUB_LCD_LIGHT_LEVEL
+    ,FT_UTILCMD_CHECK_IF_ULC_FAT_SUPPORT
+    ,FT_UTILCMD_CHECK_IF_SMART_PHONE_MODEM_SUPPORT
+    ,FT_UTILCMD_CHECK_TARGET_META_REQUIRED_VERS
+    ,FT_UTILCMD_SET_TARGET_CHECK_PARAS
+    //-------------- check if target need to perform NVRAM read/write security check
+    ,FT_UTILCMD_CHECK_IF_TARGET_NV_SEC_ON
+    ,FT_UTILCMD_REBOOT_TO_NORMAL_MODE // reboot target to normal mode
+    ,FT_UTILCMD_QUERY_BT_WIFI_SINGLE_ANTENNA_CAP
+    ,FT_UTILCMD_SET_ANTENNA_PATH_TO_BT
+    ,FT_UTILCMD_SET_ANTENNA_PATH_TO_WIFI
+    ,FT_UTILCMD_QUERY_TARGET_OPTION_INFO
+    ,FT_UTILCMD_QUERY_LIMITED_STATE
+    ,FT_UTILCMD_QUERY_VPA_VOLTAGE_LIST
+    ,FT_UTILCMD_QUERY_DRIVE_AVAILABLE_FOR_FILE_SIZE
+    ,FT_UTILCMD_QUERY_MAX_CTRL_BUFFER_SIZE
+    ,FT_UTILCMD_QUERY_ADC_MODULE_SUPPORT
+    ,FT_UTILCMD_QUERY_RTC_MODULE_SUPPORT
+    ,FT_UTILCMD_QUERY_META_MODE_TRACE
+    ,FT_UTILCMD_ENABLE_META_MODE_TRACE
+    ,FT_UTILCMD_QUERY_MODEM_MODE
+    ,FT_UTILCMD_END
+} FtUtilCmdType;
+
+typedef struct {
+    kal_uint32        query_ft_msg_id;
+    kal_uint32        query_op_code;
+} FtUtilCheckIfFuncExist;
+
+typedef struct {
+    kal_uint8        led_light_level;
+} FtLEDLevel;
+
+typedef struct {
+    kal_uint8        lcd_type;
+    kal_uint8        lcd_light_level;
+} FtLCDLevel;
+
+typedef struct {
+    kal_uint8        onoff;
+} FtVibratorOnOff;
+
+typedef struct {
+    kal_uint16        interval;
+} FtWatchDog;
+
+
+typedef enum 
+{
+    META_VERSION_USER_DEFINE
+   ,META_VERSION_META_DLL_UTIL_VER
+   ,META_VERSION_TYPE_END
+}META_VERSION_TYPE;
+
+typedef struct 
+{
+    META_VERSION_TYPE   m_eVerType;
+    kal_bool            b_AssertWhenVerCheckFail;  
+    kal_uint32          m_u4MainVersion;  
+    kal_uint32          m_u4MinorVersion; 
+    kal_uint32          m_u4BuildNum;     
+}META_UTIL_CHECK_TARGET_VER_REQ_T;
+
+
+typedef struct 
+{ 
+    kal_bool    m_bCheckPass;
+    kal_uint32  m_u4TargetMainVersion;  
+    kal_uint32  m_u4TargetMinorVersion;
+    kal_uint32  m_u4TargetBuildNum;   
+}META_UTIL_CHECK_TARGET_VER_CNF_T;  // store in peer buffer  for backward compaibility
+
+typedef struct 
+{
+    kal_bool   b_TargetAssertCheckFlag;
+    kal_bool   b_SetCurRecvMsgTimes;
+    kal_uint8  m_u1CurRecvMsgTimes;  
+}META_UTIL_SET_ASSERT_CHECK_PARAs_REQ_T;
+
+
+typedef union {
+    FtUtilCheckIfFuncExist                  CheckIfFuncExist;
+    FtWatchDog                              WatchDog;
+    FtLEDLevel                              LEDLevel;
+    FtLCDLevel                              LCDLevel;
+    FtVibratorOnOff                         VibrOnOff;
+    META_UTIL_CHECK_TARGET_VER_REQ_T        m_rCheckMetaVerReq;
+    META_UTIL_SET_ASSERT_CHECK_PARAs_REQ_T  m_rSetPwrOffParasReq;
+    kal_uint32                              dummy;        // extend alignment to 4 bytes
+    kal_uint32                              requestedFileSize;
+    kal_uint8                               trace_mode;
+} FtUtilCmdReq_U;
+
+typedef struct 
+{
+    kal_uint8        rtc_sec;    /* seconds after the minute   - [0,59]  */
+    kal_uint8        rtc_min;    /* minutes after the hour     - [0,59]  */
+    kal_uint8        rtc_hour;   /* hours after the midnight   - [0,23]  */
+    kal_uint8        rtc_day;    /* day of the month           - [1,31]  */
+    kal_uint8        rtc_mon;    /* months                        - [1,12] */
+    kal_uint8        rtc_wday;   /* days in a week               - [1,7] */
+    kal_uint8        rtc_year;   /* years                      - [0,127] */
+} FtRtc;
+
+#define META_LIPTON_OPTION_ON   0x00000001
+#define META_TC01_OPTION_ON     0x00000002
+#define META_AST_TD_OPTION_ON   0x00000004
+typedef union {
+    FtUtilCheckIfFuncExist  CheckIfFuncExist;
+    kal_uint8               bt_module_id;
+    kal_uint8               pmic_id;
+    FtRtc                   rtc;
+    kal_uint32              rf_pcl;
+    kal_bool                m_bNVSecOn;
+    kal_bool                m_bBTWiFiSingleAntenna;
+    kal_uint32              m_u4TargetOptionInfo;
+    kal_uint32              dummy;// extend alignment to 4 bytes
+    kal_uint32              m_u4LimitedStateIndicator;
+    kal_int16               driveLetter;
+    kal_uint32              maxControlBufferSize;
+    kal_uint8               module_support;
+    kal_uint8               trace_mode; 
+    kal_uint8               modem_mode;	
+} FtUtilCmdCnf_U;
+
+typedef struct
+{
+    /// number of elements in the list
+    kal_uint32 validNumber;
+    /// voltage list (unit: micro volt 10^-6)
+    kal_uint32 voltageList[255];
+    /// register value of each voltageList
+    kal_uint32 registerValue[255];
+}FtUtilCmdCnfVpaVoltageList;
+
+typedef struct {
+    FT_HDR
+    FtUtilCmdType   type;
+    FtUtilCmdReq_U  cmd;
+} FT_UTILITY_COMMAND_REQ;
+
+typedef struct {
+    FT_HDR
+    FtUtilCmdType   type;
+    FtUtilCmdCnf_U  result;
+    kal_uint32      status;
+} FT_UTILITY_COMMAND_CNF;
+
+#endif // #ifndef __FT_MSG_UTIL_H__
diff --git a/mcu/interface/middleware/meta/ft_public.h b/mcu/interface/middleware/meta/ft_public.h
new file mode 100644
index 0000000..8c0efab
--- /dev/null
+++ b/mcu/interface/middleware/meta/ft_public.h
@@ -0,0 +1,136 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_public.h
+ *
+ * Project:
+ * --------
+ *   MTK6208
+ *
+ * Description:
+ * ------------
+ *   FT public stuff
+ *
+ * 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 FT_PUBLIC_H
+#define FT_PUBLIC_H
+
+#include "kal_general_types.h"
+#ifdef	__cplusplus
+extern "C"
+#endif
+
+/* FT event group bit map */
+#define FT_UL1_UPDATE_RUNTIME_EVENT     0x00000001 // first bit
+
+	
+#ifdef	__cplusplus
+}
+#endif
+
+#endif
+
diff --git a/mcu/interface/middleware/meta/fta_msg.h b/mcu/interface/middleware/meta/fta_msg.h
new file mode 100644
index 0000000..c37d35f
--- /dev/null
+++ b/mcu/interface/middleware/meta/fta_msg.h
@@ -0,0 +1,103 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ft_msg_common.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   FTA message definitions for META commnuication
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef _FTA_MSG_H_
+#define _FTA_MSG_H_
+typedef struct
+{
+    kal_uint8  ref_count;
+    kal_uint16 msg_len;
+    kal_uint8  m_u1Dummy;
+}fta_basic_req_struct;
+
+typedef struct
+{
+	  kal_uint8  ref_count;
+    kal_uint16 msg_len;
+    kal_uint8  m_u1Dummy;
+    kal_uint8  status;
+}fta_basic_cnf_struct;
+#endif // _FTA_MSG_H_
diff --git a/mcu/interface/middleware/meta/ftc_msg.h b/mcu/interface/middleware/meta/ftc_msg.h
new file mode 100644
index 0000000..a92cb5e
--- /dev/null
+++ b/mcu/interface/middleware/meta/ftc_msg.h
@@ -0,0 +1,108 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   ftc_msg.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   FTC message definitions for META commnuication
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef _FTC_MSG_H_
+#define _FTC_MSG_H_
+#include "kal_public_defs.h"
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8  m_u1Dummy;
+} ftc_basic_req_struct;
+
+typedef struct
+{
+    LOCAL_PARA_HDR
+    kal_uint8  m_u1Dummy;
+    kal_uint8  status;
+} ftc_basic_cnf_struct;
+#endif // _FT_MSG_H_
diff --git a/mcu/interface/middleware/meta/l1tst_nsft_lm_public.h b/mcu/interface/middleware/meta/l1tst_nsft_lm_public.h
new file mode 100644
index 0000000..5dfa207
--- /dev/null
+++ b/mcu/interface/middleware/meta/l1tst_nsft_lm_public.h
@@ -0,0 +1,9 @@
+#if (defined __MD93__)
+#include "l1tst_nsft_lm_public_gen93.h"
+#elif (defined __MD95__)
+#include "l1tst_nsft_lm_public_gen95.h"
+#elif (defined __MD97__)||(defined __MD97P__)
+#include "l1tst_nsft_lm_public_gen97.h"
+#else
+#error "[ERROR] Invalid MD generation"
+#endif
diff --git a/mcu/interface/middleware/meta/l1tst_nsft_lm_public_gen93.h b/mcu/interface/middleware/meta/l1tst_nsft_lm_public_gen93.h
new file mode 100644
index 0000000..5d3484e
--- /dev/null
+++ b/mcu/interface/middleware/meta/l1tst_nsft_lm_public_gen93.h
@@ -0,0 +1,259 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   l1tst_nsft_lm_public.h
+ *
+ * Project:
+ * --------
+ *   MOLY Software
+ *
+ * Description:
+ * ------------
+ *   NSFT list mode public definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *============================================================================
+ *             HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+
+#ifndef __L1TST_NSFT_LM_PUBLIC_H__
+#define __L1TST_NSFT_LM_PUBLIC_H__
+
+#include "l1_types_public.h"
+
+/* ========== *\
+|* Definition *|
+\* ================================================================================================ */
+#define MAX_TSET_NUM_IN_CHMEAS  8
+
+typedef enum
+{
+   NSFT_LM_MCS_TYPE_GMSK = 0,
+   NSFT_LM_MCS_TYPE_EPSK = 1,
+   NSFT_LM_MCS_TYPE_MAX  = 0xFFFF
+} NsftListModType;
+
+typedef enum
+{
+   NSFT_LM_CMD_NULL    = 0,
+   NSFT_LM_CMD_SYNC    = 1,
+   NSFT_LM_CMD_TRIGGER = 2,
+   NSFT_LM_CMD_CHMEAS  = 3,
+   NSFT_LM_CMD_STOP    = 4,
+   NSFT_LM_CMD_END     = 0xFFFF
+} NsftListCmdType;
+
+typedef enum
+{
+   NSFT_LM_EXECUTION_NULL    = 0,
+   NSFT_LM_EXECUTION_INIT    = 1,
+   NSFT_LM_EXECUTION_START   = 2,
+   NSFT_LM_EXECUTION_DONE    = 3,
+   NSFT_LM_EXECUTION_FAIL    = 4,
+   NSFT_LM_EXECUTION_STA_MAX = 0xFFFF
+} NsftListCmdStatus;
+
+typedef kal_int16    NsftListPower;    // in unit of 1/8 dBm
+typedef kal_int16    NsftListPCL;      // in unit of PCL
+
+/*==================================================================================================*/
+
+/* ================================= *\
+|* Definition of Command's Structure *|
+\* ================================================================================================ */
+/* Structure for Sync------------------------------------------------------------------------------ */
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   NsftListModType   RTX_types; //RXD use TCh, so Sync need know Mod type
+   NsftListPower     sync_power;  // in unit of 1/8 dBm
+   TimeSlot          sync_slot_offset;
+} NsftListCmd_Sync_t;
+#else
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   NsftListPower     sync_power;  // in unit of 1/8 dBm
+   TimeSlot          sync_slot_offset;
+} NsftListCmd_Sync_t;
+#endif
+/* Structure for Trigger--------------------------------------------------------------------------- */
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   TSC               TSC;
+   NsftListModType   RTX_types;
+   NsftListPCL       TX_power;    // in format of PCL
+} NsftListCmd_Trigger_t;
+
+/* Structure for Channel measurement--------------------------------------------------------------- */
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   TSC               TSC;
+   NsftListModType   RTX_types;                              // GMSK/EPSK
+   NsftListPCL       TX_power[MAX_TSET_NUM_IN_CHMEAS];       // in format of PCL
+   NsftListPower     RX_power;                               // in unit of 1/8 dBm
+   kal_uint16        repeat_count[MAX_TSET_NUM_IN_CHMEAS];   // in unit of radio block
+} NsftListCmd_ChMeas_t;
+
+/* Structure for stop LM--------------------------------------------------------------------------- */
+typedef struct
+{
+   kal_uint16        command_id;
+} NsftListCmd_Stop_t;
+
+/* Structure for command union--------------------------------------------------------------------- */
+typedef union
+{
+   NsftListCmd_Sync_t      sync;
+   NsftListCmd_Trigger_t   trigger;
+   NsftListCmd_ChMeas_t    test;
+   NsftListCmd_Stop_t      stop;
+} NsftListCmd_t;
+/*================================================================================================= */
+
+/* =============================== *\
+|* Definition of Reort's Structure *|
+\* ================================================================================================ */
+typedef struct
+{
+   kal_uint16        command_id;
+   NsftListCmdType   type;
+   NsftListCmdStatus status;      // NSFT LM specific error code
+} NsftListRpt_Com_t;
+
+/* Structure for Sync------------------------------------------------------------------------------ */
+typedef struct
+{
+   NsftListRpt_Com_t common;
+   uint16            retry_counts;
+   kal_int16         new_afc_dac;
+   kal_int32         detected_foe;
+} NsftListRpt_Sync_t;
+
+/* Structure for Trigger--------------------------------------------------------------------------- */
+typedef struct
+{
+   NsftListRpt_Com_t common;
+} NsftListRpt_Trigger_t;
+
+/* Structure for Channel measurement--------------------------------------------------------------- */
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+typedef struct
+{
+   NsftListRpt_Com_t common;
+   kal_uint16        RX_level[GSM_RF_MAX_RX_ANT_NUM];    // in unit of 1/8 dBm
+   kal_uint32        BER_sum;
+   kal_uint32        BER_frame_count;
+} NsftListRpt_ChMeas_t;
+#else
+typedef struct
+{
+   NsftListRpt_Com_t common;
+   kal_uint16        RX_level;    // in unit of 1/8 dBm
+   kal_uint32        BER_sum;
+   kal_uint32        BER_frame_count;
+} NsftListRpt_ChMeas_t;
+#endif
+
+/* Structure for stop LM--------------------------------------------------------------------------- */
+typedef NsftListRpt_Trigger_t NsftListRpt_Stop_t;
+
+/* Structure for report union---------------------------------------------------------------------- */
+typedef union
+{
+   NsftListRpt_Com_t       common;
+   NsftListRpt_Sync_t      sync;
+   NsftListRpt_Trigger_t   trigger;
+   NsftListRpt_ChMeas_t    test;
+   NsftListRpt_Stop_t      stop;
+} NsftListRpt_t;
+/*================================================================================================= */
+
+/* ============================ *\
+|* NSFT List Mode API Prototype *|
+\* ================================================================================================ */
+/* NSFT List Mode message handler for FT----------------------------------------------------------- */
+void L1TST_NsftList_message_handler(void* ilmPtr);
+/*================================================================================================= */
+
+/**
+ * Parameter for MSG_ID_MAL_TO_GSM_LM_REQ.
+ */
+typedef struct
+{
+    NsftListCmdType commandType;
+    NsftListCmd_t   commandBuffer;
+} nsft_lm_req_struct;
+
+/**
+ * Parameter for MSG_ID_GSM_LM_TO_MAL_RF_WAIT_IND
+ */
+typedef struct
+{
+    kal_uint32         reportCount;
+    NsftListRpt_t      outputParameter;
+} NsftList_RPT_Q_ENTRY_T;
+
+#endif  /* _L1TST_NSFT_LM_PUBLIC_H */
diff --git a/mcu/interface/middleware/meta/l1tst_nsft_lm_public_gen95.h b/mcu/interface/middleware/meta/l1tst_nsft_lm_public_gen95.h
new file mode 100644
index 0000000..5d3484e
--- /dev/null
+++ b/mcu/interface/middleware/meta/l1tst_nsft_lm_public_gen95.h
@@ -0,0 +1,259 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   l1tst_nsft_lm_public.h
+ *
+ * Project:
+ * --------
+ *   MOLY Software
+ *
+ * Description:
+ * ------------
+ *   NSFT list mode public definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *============================================================================
+ *             HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+
+#ifndef __L1TST_NSFT_LM_PUBLIC_H__
+#define __L1TST_NSFT_LM_PUBLIC_H__
+
+#include "l1_types_public.h"
+
+/* ========== *\
+|* Definition *|
+\* ================================================================================================ */
+#define MAX_TSET_NUM_IN_CHMEAS  8
+
+typedef enum
+{
+   NSFT_LM_MCS_TYPE_GMSK = 0,
+   NSFT_LM_MCS_TYPE_EPSK = 1,
+   NSFT_LM_MCS_TYPE_MAX  = 0xFFFF
+} NsftListModType;
+
+typedef enum
+{
+   NSFT_LM_CMD_NULL    = 0,
+   NSFT_LM_CMD_SYNC    = 1,
+   NSFT_LM_CMD_TRIGGER = 2,
+   NSFT_LM_CMD_CHMEAS  = 3,
+   NSFT_LM_CMD_STOP    = 4,
+   NSFT_LM_CMD_END     = 0xFFFF
+} NsftListCmdType;
+
+typedef enum
+{
+   NSFT_LM_EXECUTION_NULL    = 0,
+   NSFT_LM_EXECUTION_INIT    = 1,
+   NSFT_LM_EXECUTION_START   = 2,
+   NSFT_LM_EXECUTION_DONE    = 3,
+   NSFT_LM_EXECUTION_FAIL    = 4,
+   NSFT_LM_EXECUTION_STA_MAX = 0xFFFF
+} NsftListCmdStatus;
+
+typedef kal_int16    NsftListPower;    // in unit of 1/8 dBm
+typedef kal_int16    NsftListPCL;      // in unit of PCL
+
+/*==================================================================================================*/
+
+/* ================================= *\
+|* Definition of Command's Structure *|
+\* ================================================================================================ */
+/* Structure for Sync------------------------------------------------------------------------------ */
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   NsftListModType   RTX_types; //RXD use TCh, so Sync need know Mod type
+   NsftListPower     sync_power;  // in unit of 1/8 dBm
+   TimeSlot          sync_slot_offset;
+} NsftListCmd_Sync_t;
+#else
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   NsftListPower     sync_power;  // in unit of 1/8 dBm
+   TimeSlot          sync_slot_offset;
+} NsftListCmd_Sync_t;
+#endif
+/* Structure for Trigger--------------------------------------------------------------------------- */
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   TSC               TSC;
+   NsftListModType   RTX_types;
+   NsftListPCL       TX_power;    // in format of PCL
+} NsftListCmd_Trigger_t;
+
+/* Structure for Channel measurement--------------------------------------------------------------- */
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   TSC               TSC;
+   NsftListModType   RTX_types;                              // GMSK/EPSK
+   NsftListPCL       TX_power[MAX_TSET_NUM_IN_CHMEAS];       // in format of PCL
+   NsftListPower     RX_power;                               // in unit of 1/8 dBm
+   kal_uint16        repeat_count[MAX_TSET_NUM_IN_CHMEAS];   // in unit of radio block
+} NsftListCmd_ChMeas_t;
+
+/* Structure for stop LM--------------------------------------------------------------------------- */
+typedef struct
+{
+   kal_uint16        command_id;
+} NsftListCmd_Stop_t;
+
+/* Structure for command union--------------------------------------------------------------------- */
+typedef union
+{
+   NsftListCmd_Sync_t      sync;
+   NsftListCmd_Trigger_t   trigger;
+   NsftListCmd_ChMeas_t    test;
+   NsftListCmd_Stop_t      stop;
+} NsftListCmd_t;
+/*================================================================================================= */
+
+/* =============================== *\
+|* Definition of Reort's Structure *|
+\* ================================================================================================ */
+typedef struct
+{
+   kal_uint16        command_id;
+   NsftListCmdType   type;
+   NsftListCmdStatus status;      // NSFT LM specific error code
+} NsftListRpt_Com_t;
+
+/* Structure for Sync------------------------------------------------------------------------------ */
+typedef struct
+{
+   NsftListRpt_Com_t common;
+   uint16            retry_counts;
+   kal_int16         new_afc_dac;
+   kal_int32         detected_foe;
+} NsftListRpt_Sync_t;
+
+/* Structure for Trigger--------------------------------------------------------------------------- */
+typedef struct
+{
+   NsftListRpt_Com_t common;
+} NsftListRpt_Trigger_t;
+
+/* Structure for Channel measurement--------------------------------------------------------------- */
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+typedef struct
+{
+   NsftListRpt_Com_t common;
+   kal_uint16        RX_level[GSM_RF_MAX_RX_ANT_NUM];    // in unit of 1/8 dBm
+   kal_uint32        BER_sum;
+   kal_uint32        BER_frame_count;
+} NsftListRpt_ChMeas_t;
+#else
+typedef struct
+{
+   NsftListRpt_Com_t common;
+   kal_uint16        RX_level;    // in unit of 1/8 dBm
+   kal_uint32        BER_sum;
+   kal_uint32        BER_frame_count;
+} NsftListRpt_ChMeas_t;
+#endif
+
+/* Structure for stop LM--------------------------------------------------------------------------- */
+typedef NsftListRpt_Trigger_t NsftListRpt_Stop_t;
+
+/* Structure for report union---------------------------------------------------------------------- */
+typedef union
+{
+   NsftListRpt_Com_t       common;
+   NsftListRpt_Sync_t      sync;
+   NsftListRpt_Trigger_t   trigger;
+   NsftListRpt_ChMeas_t    test;
+   NsftListRpt_Stop_t      stop;
+} NsftListRpt_t;
+/*================================================================================================= */
+
+/* ============================ *\
+|* NSFT List Mode API Prototype *|
+\* ================================================================================================ */
+/* NSFT List Mode message handler for FT----------------------------------------------------------- */
+void L1TST_NsftList_message_handler(void* ilmPtr);
+/*================================================================================================= */
+
+/**
+ * Parameter for MSG_ID_MAL_TO_GSM_LM_REQ.
+ */
+typedef struct
+{
+    NsftListCmdType commandType;
+    NsftListCmd_t   commandBuffer;
+} nsft_lm_req_struct;
+
+/**
+ * Parameter for MSG_ID_GSM_LM_TO_MAL_RF_WAIT_IND
+ */
+typedef struct
+{
+    kal_uint32         reportCount;
+    NsftListRpt_t      outputParameter;
+} NsftList_RPT_Q_ENTRY_T;
+
+#endif  /* _L1TST_NSFT_LM_PUBLIC_H */
diff --git a/mcu/interface/middleware/meta/l1tst_nsft_lm_public_gen97.h b/mcu/interface/middleware/meta/l1tst_nsft_lm_public_gen97.h
new file mode 100644
index 0000000..15745d2
--- /dev/null
+++ b/mcu/interface/middleware/meta/l1tst_nsft_lm_public_gen97.h
@@ -0,0 +1,269 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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:
+ * ---------
+ *   l1tst_nsft_lm_public.h
+ *
+ * Project:
+ * --------
+ *   MOLY Software
+ *
+ * Description:
+ * ------------
+ *   NSFT list mode public definition.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *============================================================================
+ *             HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+
+#ifndef __L1TST_NSFT_LM_PUBLIC_H__
+#define __L1TST_NSFT_LM_PUBLIC_H__
+
+#include "l1_types_public.h"
+
+/* ========== *\
+|* Definition *|
+\* ================================================================================================ */
+#define MAX_TSET_NUM_IN_CHMEAS  8
+
+typedef enum
+{
+   NSFT_LM_MCS_TYPE_GMSK = 0,
+   NSFT_LM_MCS_TYPE_EPSK = 1,
+   NSFT_LM_MCS_TYPE_MAX  = 0xFFFF
+} NsftListModType;
+
+typedef enum
+{
+   NSFT_LM_CMD_NULL    = 0,
+   NSFT_LM_CMD_SYNC    = 1,
+   NSFT_LM_CMD_TRIGGER = 2,
+   NSFT_LM_CMD_CHMEAS  = 3,
+   NSFT_LM_CMD_STOP    = 4,
+   NSFT_LM_CMD_END     = 0xFFFF
+} NsftListCmdType;
+
+typedef enum
+{
+   NSFT_LM_EXECUTION_NULL    = 0,
+   NSFT_LM_EXECUTION_INIT    = 1,
+   NSFT_LM_EXECUTION_START   = 2,
+   NSFT_LM_EXECUTION_DONE    = 3,
+   NSFT_LM_EXECUTION_FAIL    = 4,
+   NSFT_LM_EXECUTION_STA_MAX = 0xFFFF
+} NsftListCmdStatus;
+
+typedef kal_int16    NsftListPower;    // in unit of 1/8 dBm
+typedef kal_int16    NsftListPCL;      // in unit of PCL
+
+/*==================================================================================================*/
+
+/* ================================= *\
+|* Definition of Command's Structure *|
+\* ================================================================================================ */
+/* Structure for Sync------------------------------------------------------------------------------ */
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   NsftListModType   RTX_types; //RXD use TCh, so Sync need know Mod type
+   NsftListPower     sync_power;  // in unit of 1/8 dBm
+   TimeSlot          sync_slot_offset;
+} NsftListCmd_Sync_t;
+#else
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   NsftListPower     sync_power;  // in unit of 1/8 dBm
+   TimeSlot          sync_slot_offset;
+} NsftListCmd_Sync_t;
+#endif
+/* Structure for Trigger--------------------------------------------------------------------------- */
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   TSC               TSC;
+   NsftListModType   RTX_types;
+   NsftListPCL       TX_power;    // in format of PCL
+} NsftListCmd_Trigger_t;
+
+/* Structure for Channel measurement--------------------------------------------------------------- */
+typedef struct
+{
+   kal_uint16        command_id;
+   FrequencyBand     RF_band;
+   ARFCN             ARFCN;
+   TSC               TSC;
+   NsftListModType   RTX_types;                              // GMSK/EPSK
+   NsftListPCL       TX_power[MAX_TSET_NUM_IN_CHMEAS];       // in format of PCL
+   NsftListPower     RX_power;                               // in unit of 1/8 dBm
+   kal_uint16        repeat_count[MAX_TSET_NUM_IN_CHMEAS];   // in unit of radio block
+} NsftListCmd_ChMeas_t;
+
+/* Structure for stop LM--------------------------------------------------------------------------- */
+typedef struct
+{
+   kal_uint16        command_id;
+} NsftListCmd_Stop_t;
+
+/* Structure for command union--------------------------------------------------------------------- */
+typedef union
+{
+   NsftListCmd_Sync_t      sync;
+   NsftListCmd_Trigger_t   trigger;
+   NsftListCmd_ChMeas_t    test;
+   NsftListCmd_Stop_t      stop;
+} NsftListCmd_t;
+/*================================================================================================= */
+
+/* =============================== *\
+|* Definition of Reort's Structure *|
+\* ================================================================================================ */
+typedef struct
+{
+   kal_uint16        command_id;
+   NsftListCmdType   type;
+   NsftListCmdStatus status;      // NSFT LM specific error code
+} NsftListRpt_Com_t;
+
+/* Structure for Sync------------------------------------------------------------------------------ */
+typedef struct
+{
+   NsftListRpt_Com_t common;
+   uint16            retry_counts;
+#if IS_AFC_CAPABILITY_ENHANCEMENT_SUPPORT
+   kal_uint16        new_afc_dac;
+#else
+   kal_int16         new_afc_dac;
+#endif
+   kal_int32         detected_foe;
+} NsftListRpt_Sync_t;
+
+/* Structure for Trigger--------------------------------------------------------------------------- */
+typedef struct
+{
+   NsftListRpt_Com_t common;
+} NsftListRpt_Trigger_t;
+
+/* Structure for Channel measurement--------------------------------------------------------------- */
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+typedef struct
+{
+   NsftListRpt_Com_t common;
+   kal_uint16        RX_level[GSM_RF_MAX_RX_ANT_NUM];    // in unit of 1/8 dBm
+   kal_uint32        BER_sum;
+   kal_uint32        BER_frame_count;
+} NsftListRpt_ChMeas_t;
+#else
+typedef struct
+{
+   NsftListRpt_Com_t common;
+   kal_uint16        RX_level;    // in unit of 1/8 dBm
+   kal_uint32        BER_sum;
+   kal_uint32        BER_frame_count;
+} NsftListRpt_ChMeas_t;
+#endif
+
+/* Structure for stop LM--------------------------------------------------------------------------- */
+typedef NsftListRpt_Trigger_t NsftListRpt_Stop_t;
+
+/* Structure for report union---------------------------------------------------------------------- */
+typedef union
+{
+   NsftListRpt_Com_t       common;
+   NsftListRpt_Sync_t      sync;
+   NsftListRpt_Trigger_t   trigger;
+   NsftListRpt_ChMeas_t    test;
+   NsftListRpt_Stop_t      stop;
+} NsftListRpt_t;
+/*================================================================================================= */
+
+/* ============================ *\
+|* NSFT List Mode API Prototype *|
+\* ================================================================================================ */
+/* NSFT List Mode message handler for FT----------------------------------------------------------- */
+void L1TST_NsftList_message_handler(void* ilmPtr);
+/*================================================================================================= */
+
+/**
+ * Parameter for MSG_ID_MAL_TO_GSM_LM_REQ.
+ */
+typedef struct
+{
+    NsftListCmdType commandType;
+    NsftListCmd_t   commandBuffer;
+} nsft_lm_req_struct;
+
+/**
+ * Parameter for MSG_ID_GSM_LM_TO_MAL_RF_WAIT_IND
+ */
+typedef struct
+{
+    kal_uint32         reportCount;
+    NsftListRpt_t      outputParameter;
+} NsftList_RPT_Q_ENTRY_T;
+
+#endif  /* _L1TST_NSFT_LM_PUBLIC_H */
diff --git a/mcu/interface/middleware/meta/l1tst_public.h b/mcu/interface/middleware/meta/l1tst_public.h
new file mode 100644
index 0000000..1ab3fe9
--- /dev/null
+++ b/mcu/interface/middleware/meta/l1tst_public.h
@@ -0,0 +1,9 @@
+#if (defined __MD93__)
+#include "l1tst_public_gen93.h"
+#elif (defined __MD95__)
+#include "l1tst_public_gen95.h"
+#elif (defined __MD97__)||(defined __MD97P__)
+#include "l1tst_public_gen97.h"
+#else
+#error "[ERROR] Invalid MD generation"
+#endif
diff --git a/mcu/interface/middleware/meta/l1tst_public_gen93.h b/mcu/interface/middleware/meta/l1tst_public_gen93.h
new file mode 100644
index 0000000..da20024
--- /dev/null
+++ b/mcu/interface/middleware/meta/l1tst_public_gen93.h
@@ -0,0 +1,784 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   l1tst_public.h
+ *
+ * Project:
+ * --------
+ *   MTK6208
+ *
+ * Description:
+ * ------------
+ *   L1 test mode public interface
+ *
+ * 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!
+ * 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!
+ * 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!
+ * 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!
+ * 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!
+ * 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!!
+ *==============================================================================
+ *******************************************************************************/
+
+#include "l1_types_public.h"
+#include "l1_option.h"
+#include "mph_types.h"
+#include "kal_general_types.h"
+#include "l1_kal.h"
+
+#if MD_DRV_IS_NSFT_LIST_MODE_SUPPORT
+#include "l1tst_nsft_lm_public.h"
+#endif
+
+#ifndef l1tst_public_h
+#define l1tst_public_h
+#define MS_CAPABILITY_GSM               0x00000001
+#define MS_CAPABILITY_GPRS              0x00000002
+#define MS_CAPABILITY_EDGE_RX           0x00000004
+#define MS_CAPABILITY_EDGE_8PSK_TX      0x00000008
+#define MS_CAPABILITY_8PM               0x00000010
+#define MS_CAPABILITY_FHC               0x00000020
+#define MS_CAPABILITY_LC                0x00000040
+#define MS_CAPABILITY_NSFT              0x00000080
+#define MS_CAPABILITY_TCVCXO            0x00000100
+#define MS_CAPABILITY_TXPC_CL_GMSK      0x00000200
+#define MS_CAPABILITY_TXPC_OL           0x00000400
+#define MS_CAPABILITY_TXPC_CL_TEMP      0x00000800
+#define MS_CAPABILITY_TXPC_CL_EPSK      0x00001000
+#define MS_CAPABILITY_LNAMODE           0x00002000
+#define MS_CAPABILITY_TXPC_AUX_TEMP_ADC 0x00004000
+#define MS_CAPABILITY_TXPC_BSI_TEMP_ADC 0x00008000
+
+#define MS_BAND_SUPPORT_GSM400          0x00000001
+#define MS_BAND_SUPPORT_GSM850          0x00000002
+#define MS_BAND_SUPPORT_GSM900          0x00000004
+#define MS_BAND_SUPPORT_DCS1800         0x00000008
+#define MS_BAND_SUPPORT_PCS1900         0x00000010
+
+#define CAL_RX_LNA_MODE_HIGH            0x0001
+#define CAL_RX_LNA_MODE_MID             0x0002
+#define CAL_RX_LNA_MODE_LOW             0x0004
+#define CAL_RX_LNA_MODE_SESL            0x0008  // for single-end saw-less
+#define CAL_RX_LNA_W_COEF               0x0010
+#define CAL_RX_ELNA_HIGH_SENSITIVITY    0x0020  // elna+G6 for sensitivity
+#define CAL_RX_ELNA_BYPASS_LOW_MAXPIN   0x0040  // elna bypass+G1 for Max Pin
+
+
+
+#define CAL_TXPC_OL                     0x0001
+#define CAL_TXPC_CL_GMSK                0x0002
+#define CAL_TXPC_CL_EPSK                0x0004
+#define CAL_TXPC_CL_TEMP                0x0008
+
+#define NVRAM_GET_SET_RX_PATHLOSS       0x0001  //for RF_TEST_CMD_GET_RX_PATH_LOSS & RF_TEST_CMD_SET_RX_PATH_LOSS  &  SET/GET PATHLOSS V3 for 93
+
+
+typedef enum
+{
+   AFC_2_SEC
+  ,AFC_33_SEC
+} AfcCalType;
+
+typedef enum
+{
+   AFC_DAC_RANGE_1023
+  ,AFC_DAC_RANGE_8191
+} AfcCalDacRange;
+
+typedef enum
+{
+   Band400  = 0x0
+  ,Band850  = 0x1
+  ,Band900  = 0x2
+  ,Band1800 = 0x4
+  ,Band1900 = 0x8 
+} BandBitMap;
+
+typedef enum
+{
+   TEMP_RANGE_M10_65
+  ,TEMP_RANGE_M10_90
+} TempRangeVersion;
+
+typedef struct
+{
+// bool              ok;
+   uint32            capability;
+   uint32            band_support;
+} MsCapabilityEx;
+
+// MS Capability
+typedef  struct
+{
+   unsigned short    support_gsm        :1;
+   unsigned short    support_gprs       :1;
+   unsigned short    support_edge_rx    :1;
+   unsigned short    support_epsk_tx    :1;
+   unsigned short    support_8pm        :1;
+   unsigned short    support_fhc        :1;
+   unsigned short    support_nsft       :1;
+   unsigned short    band_gsm400        :1;
+   unsigned short    band_gsm850        :1;
+   unsigned short    band_gsm900        :1;
+   unsigned short    band_dcs1800       :1;
+   unsigned short    band_pcs1900       :1;
+   unsigned short    ps_epsk_tx_disable :1;   /* Set as bit-1 when __EPSK_TX_SW_SWITCH_OFF__ is defined. */
+   unsigned short    reserved0          :3;
+} MsCapability;
+
+// Factory Mode Calibration Item
+typedef  struct
+{
+   unsigned short    is_capable      :1;
+   unsigned short    is_mandatory    :1;
+   unsigned short    parameters      :14;
+} FacModCalItm;
+
+typedef struct
+{
+   FacModCalItm      cap_id;                            //  0
+   FacModCalItm      afc;                               //  1
+   FacModCalItm      rx_pathloss;                       //  2
+   FacModCalItm      tx_pcl;                            //  3
+   FacModCalItm      tx_subband;                        //  4
+   FacModCalItm      trx_offset;                        //  5
+   FacModCalItm      tx_iq;                             //  6
+   FacModCalItm      tx_fb_dac;                         //  7
+   FacModCalItm      tx_slope_skew;                     //  8
+   FacModCalItm      w_coef;                            //  9
+   FacModCalItm      txpc;                              // 10
+   FacModCalItm      temp_adc;                          // 11
+   FacModCalItm      remove_32k_xo;                     // 12
+   FacModCalItm      co_crystal;                        // 13
+   FacModCalItm      high_lna_sp;                       // 14
+   FacModCalItm      mid_lna_sp;                        // 15
+   FacModCalItm      low_lna_sp;                        // 16
+   FacModCalItm      bat_temp_comp;                     // 17
+   FacModCalItm      dts_gain_cmb;                      // 18
+   FacModCalItm      uts_band_cmb;                      // 19
+   FacModCalItm      co_temp_adc;                       // 20
+   FacModCalItm      adjustable_lna_mode_pathloss;      // 21
+   FacModCalItm      gain_rf_cal;                       // 22
+   FacModCalItm      bypass_check_fixafc_nvram;         // 23
+   FacModCalItm      multi_rat_tadc_bitmap;             // 24
+   FacModCalItm      multi_rat_afc_bitmap;              // 25
+   FacModCalItm      adjustable_lna_mode_pathloss_v2;   // 26
+   FacModCalItm      temperature_info;                  // 27
+   FacModCalItm      dt_coexistence_info;               // 28
+   FacModCalItm      thermal_sensor_type;               // 29
+   FacModCalItm      nsft_listmode;                     // 30
+   FacModCalItm      worldmode_id_info;                 // 31
+   FacModCalItm      crystal_on_pmic_enable;            // 32
+   FacModCalItm      low_pcl_subband_cal;               // 33
+   FacModCalItm      fhc_dts_extra_fb_enable;           // 34
+   FacModCalItm      sawless_lna_sp;                    // 35
+   FacModCalItm      nvram_access_interface;            // 36
+   FacModCalItm      elna_support_band_bitmap;          // 37
+   FacModCalItm      elna_high_sp;                      // 38
+   FacModCalItm      elna_mid_sp;                       // 39
+   FacModCalItm      elna_low_sp;                       // 40
+   FacModCalItm      elna_w_coef_sp;                    // 41
+   FacModCalItm      elna_mid_sawless_sp;               // 42
+   FacModCalItm      elna_high_sensitivity_sp;          // 43
+   FacModCalItm      elna_bypass_low_maxpin_sp;         // 44
+   FacModCalItm      elna_bypass_gain_threshold;        // 45
+   FacModCalItm      elna_bypass_support_band_bitmap;   // 46
+   FacModCalItm      sinwave_afc_get_temp_freq;         // 47
+   FacModCalItm      wcoef_setget_cmd_support;          // 48
+   FacModCalItm      tx_setget_cmd_support;             // 49
+   FacModCalItm      nsft_adjust_tpo_support;           // 50
+   FacModCalItm      rxd_v5_cmd_support;                // 51
+   FacModCalItm      rxd_support_band_bitmap;           // 52
+} FacModCal;
+
+typedef struct
+{
+   uint16            cap_itm_offset;
+   uint16            fmc_itm_offset;
+   MsCapability      cap_itm;
+   FacModCal         fmc_itm;
+} MsCapabilityExV2;
+
+#if MD_DRV_IS_FHC_SUPPORT
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN             arfcn;
+   int16             dac_value[33];
+   Gain              gain;
+   int16             repeat_cnt; // repetitive test counts (frames) for each AFC DAC value
+   bool              capid_cal;  // capid calibration ctrl
+   bool              linear_cal; // 33 stages calibration ctrl
+   int32             capid_min;  // min value for capid range
+   int32             capid_max;  // max value for capid range
+} DSSAfc; 
+
+typedef enum
+{
+   GSM_LNA_NULL,  //For old CMD, tool will not set gsm_lna_mode
+   GSM_LNA_HIGH,
+   GSM_LNA_MID,
+   GSM_LNA_LOW,
+   GSM_LNA_W_COEF,
+   GSM_LNA_SAWLESS_MID,
+   GSM_ELNA_HIGH_SENSITIVITY,  //For Sensitivity, elna+G6
+   GSM_ELNA_BYPASS_LOW_MAXPIN  //For Max Pin, elna bypass+G1
+}LNA_Cal_Type;
+
+/*Gen 95 RXD*/
+typedef enum
+{
+   GSM_RX_CAL_SEQ_V5_NULL = 0,
+   GSM_RX_CAL_SEQ_V5_UTRA_HIGH = 1,
+   GSM_RX_CAL_SEQ_V5_HIGH = 2,
+   GSM_RX_CAL_SEQ_V5_MID = 3,
+   GSM_RX_CAL_SEQ_V5_MID_SAWLESS = 4,
+   GSM_RX_CAL_SEQ_V5_LOW = 5,
+   GSM_RX_CAL_SEQ_V5_BYPASS_LOW = 6,
+   GSM_RX_CAL_SEQ_V5_WCOEF = 7
+} LNACalSeqV5_E;   //LNA_Cal_Type  Gen95   //Must the same as RfTestRxCalSeqV5_E
+
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN                    arfcn;
+     //Gain                        gain[6]; 
+   kal_int16                 repeat_cnt; 
+   kal_int16            dl_cell_power;  //it is DL Power for each frame   // 1/8dBm
+   LNACalSeqV5_E       gsm_lna_mode [GSM_RF_MAX_RX_ANT_NUM];
+} DSSPL;    //DSSPL_MultiAnt;
+#else
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN             arfcn;
+   Gain              gain[6];       // gain for rx slot 0/1/2/3/4/5
+   int16             repeat_cnt;    // repetitive test counts (frames) for each ARFCN value
+   LNA_Cal_Type      gsm_lna_mode;  //0(Null) 1(high) 2(mid) 3(low) 4(w-coef) 5(sawless mid) 6(elna+G6) 7(elna bypass+G1)
+} DSSPL; 
+#endif
+
+typedef struct
+{
+   bool              afc_cal;
+   bool              pl_cal;
+   int8              sync_sb_num;  // the SB frame numbers needed for sync process before path loss calibration
+   uint16            step_cnt;     //int8 -> uint16 to match size 512
+   int16             power;        // the power level expected to measure from test set
+   DSSAfc            AfcDSS;
+   DSSPL             PathLossDSS[L1_MAX_DTS_STEP_CNT-2];
+   int16             lpm_sb_num;   // the SB frame numbers for DCXO LPM calibration
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   uint8             Antenna;   // GSM_AntDimension
+#endif
+} DTSParam;
+/*
+typedef struct
+{
+   AfcParams        *afc_params;
+   Report           *report;
+} DTSMParams;
+*/
+typedef struct
+{
+// DTSMParams        params;
+   intx              path_loss_cnt;
+   intx              freq_offset;
+   intx              capid_freq_offset_min;
+   intx              capid_freq_offset[FHC_MAX_CAPID_SEARCH_NUM];
+   int32             capid_search_order[FHC_MAX_CAPID_SEARCH_NUM];
+   int32             capid;
+   int32             capid_high;
+   int32             capid_low;   
+   int32             capid_best;
+   int16             afc_dac;
+   int16             arfcn;
+   int16             capid_cnt;
+   int16             repeat_index;
+   int8              state;
+   int8              capid_index;
+   int8              capid_okay_cnt;
+   int8              afc_dac_index;
+   int8              sb_okay_cnt;
+   uint8             sb_fail_cnt;
+   uint8             fb_fail_cnt;
+   bool              pl_started;
+   bool              rst_dts_idx_at_pl_cal_started;
+   bool              pre_capid_cal_ok[FHC_PRE_CAPID_SEARCH_NUM];
+} sDTSM;
+
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN             arfcn;
+   int8              timeslot_per_frame;
+   int8              apc_dac_pcl_sel;      // 2: gain step index, 1: apc_dac, 0: apc_pcl
+   int16             apc_dac_pcl_value[4];
+// uint8             pa_vbias_val;
+   uint8             pa_vbias_val[4];
+   uint8             is_low_pcl[4];
+   CodingScheme      cs[4];
+   int32             repeat_cnt;
+   int16             afc_dac_value;
+   int8              tsc;
+   APCTxPattern      pattern;
+   uint16            pattern_data;
+} USSApc;
+
+typedef struct
+{
+   uint16            step_cnt;  //int8 -> uint16 to match size 512
+   int16             high_apc_dcoffset[FrequencyBandCount];
+   USSApc            ApcUSS[L1_MAX_UTS_STEP_CNT];   
+} UTSParam;
+#endif
+/* Functions provided by l1tst_cfg.c */
+void L1TST_Init(void);
+void L1TST_Stop(void);
+void L1TST_SelectFrequencyBand1900( bool selected );
+void L1TST_SetBBTXCfg( const sBBTXCfg *param );
+void L1TST_GetBBTXCfg( sBBTXCfg *param );
+intx L1TST_GetBBTXVer(void);
+int  L1TST_GetCrystalCapRange(void);
+uint32 L1TST_GetBandSupport(void);
+uint16 L1TST_Get_EPSK_TX_Support(void);
+uint16 L1TST_Get_TCVCXO_Support(void);
+void GL1TST_DispatchMessage(ilm_struct *ilm_ptr);
+void L1TST_RF_SetRampApcLevel( int rf_band, int power_level, int apc_dac );
+bool L1TST_CheckAvailableBands( FrequencyBand band );
+bool L1TST_CheckAvailableARFCNs( ARFCN arfcn );
+void L1TST_MsCapability( MsCapabilityEx *msCapabilityEx );
+void L1TST_MsCapabilityV2( MsCapabilityExV2 *ms_cap );
+void L1TST_TXPC_CL_GetAllADC( void *buff, int8 is_EPSK );
+void L1TST_TXPC_CL_GetAllTEMP( void *buff, int8 is_EPSK );
+void L1TST_TXPC_CL_GetSubband( int rf_band, void *buff, int8 is_EPSK );
+uint16 L1TST_TXPC_CL_GetOneADC( int rf_band, int power_level, int8 is_EPSK );
+uint16 L1TST_TXPC_GetTemperature( void );
+#if MD_DRV_IS_FHC_SUPPORT
+void L1TST_StartDTSCal( DTSParam *dtsData );
+void L1TST_StartUTSCal( UTSParam *utsData );
+sDTSM* L1TST_FHCLog(void);
+#endif
+
+#if MD_DRV_IS_NSFT_SUPPORT
+   #if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   void L1TST_StartNSFTProc( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn,
+                             Power BCh_dl_power, Power TCh_dl_power, TSC tsc, TimeSlot TCh_slot,
+                             Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs );
+   void L1TST_NSFTProc_ChangeChannel( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn,
+                                      Power BCh_dl_power, Power TCh_dl_power, TSC tsc, TimeSlot TCh_slot,
+                                      Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs );
+   #else
+   void L1TST_StartNSFTProc( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn, 
+                             Gain BCh_gain, Gain TCh_gain, TSC tsc, TimeSlot TCh_slot, 
+                             Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs);
+   void L1TST_NSFTProc_ChangeChannel ( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn, 
+                                       Gain BCh_gain, Gain TCh_gain, TSC tsc, TimeSlot TCh_slot, 
+                                       Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs);
+   #endif //#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__) 
+void L1TST_NSFTProc_ChangePower( Power txPowerLev);
+void L1TST_StopNSFTProc( void );
+void L1TST_StopNSFT_RecoverToMetaState( void );
+void L1TST_SetupSingleEndBERData( uint32 tst_cnt );
+void L1TST_ReportSingleEndBERDone( uint32* seBER_SUM, uint32* curr_cnt );
+void L1TST_SetupRXLEVData( void );
+   #if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   void L1TST_ReportRXLEV( uint16 RXLEV[] );
+   #else
+   void L1TST_ReportRXLEV( uint16 *RXLEV );
+   #endif
+void L1TST_ReportRXQual( uint16 BER_PERMILLAGE, uint8 *RXQual );
+#endif //#if MD_DRV_IS_NSFT_SUPPORT
+
+/* Functions provided by l1tst_pm.c */
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+void L1TST_PowerScan( ARFCN  arfcn, int8 sampleNoPerFrame, Gain gain, Gain gain_rxd, int16 frames, FrequencyBand band );
+#else
+void L1TST_PowerScan(ARFCN arfcn, int8 sampleNoPerFrame, Gain gain, int16 frames);
+#endif
+
+#if MD_DRV_IS_W_CANCELLATION_SUPPORT
+   #if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   void L1TST_IR_PowerScan( ARFCN  arfcn, int8 sampleNoPerFrame, Gain gain, Gain gain_rxd, int16 frames, int8 if_flag, FrequencyBand band );
+   #else
+   void L1TST_IR_PowerScan( ARFCN  arfcn, int8 sampleNoPerFrame, Gain gain, int16 frames, int8 if_flag );
+   #endif
+#endif
+
+/* Functions provided by l1tst_fcb.c */
+void L1TST_FCBControl(ARFCN arfcn, int16 dacValue, Gain gain);
+intx L1TST_FCBGetFreqOffset(void);
+
+/* Functions provided by l1tst_nbtx.c */
+void L1TST_NormalBurstTx(ARFCN  arfcn, BSIC bsic, int8 bitmask,
+                         Power txPowerLev, int16 frames, int16 dacValue, APCTxPattern pattern);
+
+/* Functions provided by l1tst_cont.c */
+void L1TST_ContinuousTx(ARFCN arfcn, ContTxPattern pattern,uint16 patternData, bool onOff, uint16 modtype, Power PowerLev);
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+void L1TST_ContinuousRx( FrequencyBand band, ARFCN arfcn, Gain gain, Gain gain_rxd, bool onOff );
+#else
+void L1TST_ContinuousRx(ARFCN arfcn, Gain gain, bool onOff);
+#endif
+
+/* Functions provided by l1tst_pdtch.c */
+#if (MD_DRV_IS_GPRS || MD_DRV_IS_MULTISLOT_TX_SUPPORT)
+void L1TST_MultiSlotTx( ARFCN  arfcn, BSIC bsic, int8 timeSlotmask, Power powerLev[4],
+                        CodingScheme cs[4], TimingAdvance ta, int32 frames, int16 dacValue,
+                        bool isEgprs, APCTxPattern pattern, uint16 patternData );
+#endif
+
+#if MD_DRV_IS_TX_GAIN_RF_CALIBRATION_SUPPORT
+void L1TST_TxGainRFSetting(ARFCN  arfcn, BSIC bsic, CodingScheme cs, TimingAdvance ta, 
+                           int32 frames, int16 dacValue, bool isEgprs, APCTxPattern pattern, 
+                           uint16 patternData,  uint16 paGain, uint16 paVbias, uint16 rfGainIndex );
+uint8 L1TST_Query_Grf_Number( void );
+int16* L1TST_Query_Baseband_Power( void );
+#endif
+
+/* Functions provided by l1tst_afc.c */
+void L1TST_SetAfcDacValue( int16 dacValue );
+uint16 L1TST_GetAfcDacValueAtTRXOffsetCalibration(void);
+void L1TST_SetAFcData( int16 calibrated_dac_default, intx calibrated_int_slope );
+void L1TST_SetDcxoPowerMode(kal_uint8 mode);
+
+#if MD_DRV_IS_EPSK_TX_SUPPORT
+void L1TST_RF_SetRampApcLevelEPSK( int rf_band, int power_level, int apc_dac );
+#endif
+
+typedef void (*CalibraHandlerCallback)(kal_int32 u4Result);
+bool L1TST_Begin32KCalibration( CalibraHandlerCallback cb );
+void L1TST_Get32KCalibrationResult( kal_uint32 fmResult );
+
+void L1TST_UpdateCalibrationData( kal_uint32 cal_lid );
+uint16 L1TST_Query_L1D_Mode( void );
+
+#endif
diff --git a/mcu/interface/middleware/meta/l1tst_public_gen95.h b/mcu/interface/middleware/meta/l1tst_public_gen95.h
new file mode 100644
index 0000000..d2745f9
--- /dev/null
+++ b/mcu/interface/middleware/meta/l1tst_public_gen95.h
@@ -0,0 +1,795 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   l1tst_public.h
+ *
+ * Project:
+ * --------
+ *   MTK6208
+ *
+ * Description:
+ * ------------
+ *   L1 test mode public interface
+ *
+ * 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!
+ * 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!
+ *
+ * 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!
+ *
+ * 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!
+ * 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!
+ * 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!!
+ *==============================================================================
+ *******************************************************************************/
+
+#include "l1_types_public.h"
+#include "l1_option.h"
+#include "mph_types.h"
+#include "kal_general_types.h"
+#include "l1_kal.h"
+
+#if MD_DRV_IS_NSFT_LIST_MODE_SUPPORT
+#include "l1tst_nsft_lm_public.h"
+#endif
+
+#ifndef l1tst_public_h
+#define l1tst_public_h
+#define MS_CAPABILITY_GSM               0x00000001
+#define MS_CAPABILITY_GPRS              0x00000002
+#define MS_CAPABILITY_EDGE_RX           0x00000004
+#define MS_CAPABILITY_EDGE_8PSK_TX      0x00000008
+#define MS_CAPABILITY_8PM               0x00000010
+#define MS_CAPABILITY_FHC               0x00000020
+#define MS_CAPABILITY_LC                0x00000040
+#define MS_CAPABILITY_NSFT              0x00000080
+#define MS_CAPABILITY_TCVCXO            0x00000100
+#define MS_CAPABILITY_TXPC_CL_GMSK      0x00000200
+#define MS_CAPABILITY_TXPC_OL           0x00000400
+#define MS_CAPABILITY_TXPC_CL_TEMP      0x00000800
+#define MS_CAPABILITY_TXPC_CL_EPSK      0x00001000
+#define MS_CAPABILITY_LNAMODE           0x00002000
+#define MS_CAPABILITY_TXPC_AUX_TEMP_ADC 0x00004000
+#define MS_CAPABILITY_TXPC_BSI_TEMP_ADC 0x00008000
+
+#define MS_BAND_SUPPORT_GSM400          0x00000001
+#define MS_BAND_SUPPORT_GSM850          0x00000002
+#define MS_BAND_SUPPORT_GSM900          0x00000004
+#define MS_BAND_SUPPORT_DCS1800         0x00000008
+#define MS_BAND_SUPPORT_PCS1900         0x00000010
+
+#define CAL_RX_LNA_MODE_HIGH            0x0001
+#define CAL_RX_LNA_MODE_MID             0x0002
+#define CAL_RX_LNA_MODE_LOW             0x0004
+#define CAL_RX_LNA_MODE_SESL            0x0008  // for single-end saw-less
+#define CAL_RX_LNA_W_COEF               0x0010
+#define CAL_RX_ELNA_HIGH_SENSITIVITY    0x0020  // elna+G6 for sensitivity
+#define CAL_RX_ELNA_BYPASS_LOW_MAXPIN   0x0040  // elna bypass+G1 for Max Pin
+
+
+
+#define CAL_TXPC_OL                     0x0001
+#define CAL_TXPC_CL_GMSK                0x0002
+#define CAL_TXPC_CL_EPSK                0x0004
+#define CAL_TXPC_CL_TEMP                0x0008
+
+#define NVRAM_GET_SET_RX_PATHLOSS       0x0001  //for RF_TEST_CMD_GET_RX_PATH_LOSS & RF_TEST_CMD_SET_RX_PATH_LOSS  &  SET/GET PATHLOSS V3 for 93
+
+
+typedef enum
+{
+   AFC_2_SEC
+  ,AFC_33_SEC
+} AfcCalType;
+
+typedef enum
+{
+   AFC_DAC_RANGE_1023
+  ,AFC_DAC_RANGE_8191
+} AfcCalDacRange;
+
+typedef enum
+{
+   Band400  = 0x0
+  ,Band850  = 0x1
+  ,Band900  = 0x2
+  ,Band1800 = 0x4
+  ,Band1900 = 0x8 
+} BandBitMap;
+
+typedef enum
+{
+   TEMP_RANGE_M10_65
+  ,TEMP_RANGE_M10_90
+} TempRangeVersion;
+
+typedef struct
+{
+// bool              ok;
+   uint32            capability;
+   uint32            band_support;
+} MsCapabilityEx;
+
+// MS Capability
+typedef  struct
+{
+   unsigned short    support_gsm        :1;
+   unsigned short    support_gprs       :1;
+   unsigned short    support_edge_rx    :1;
+   unsigned short    support_epsk_tx    :1;
+   unsigned short    support_8pm        :1;
+   unsigned short    support_fhc        :1;
+   unsigned short    support_nsft       :1;
+   unsigned short    band_gsm400        :1;
+   unsigned short    band_gsm850        :1;
+   unsigned short    band_gsm900        :1;
+   unsigned short    band_dcs1800       :1;
+   unsigned short    band_pcs1900       :1;
+   unsigned short    ps_epsk_tx_disable :1;   /* Set as bit-1 when __EPSK_TX_SW_SWITCH_OFF__ is defined. */
+   unsigned short    reserved0          :3;
+} MsCapability;
+
+// Factory Mode Calibration Item
+typedef  struct
+{
+   unsigned short    is_capable      :1;
+   unsigned short    is_mandatory    :1;
+   unsigned short    parameters      :14;
+} FacModCalItm;
+
+typedef struct
+{
+   FacModCalItm      cap_id;                            //  0
+   FacModCalItm      afc;                               //  1
+   FacModCalItm      rx_pathloss;                       //  2
+   FacModCalItm      tx_pcl;                            //  3
+   FacModCalItm      tx_subband;                        //  4
+   FacModCalItm      trx_offset;                        //  5
+   FacModCalItm      tx_iq;                             //  6
+   FacModCalItm      tx_fb_dac;                         //  7
+   FacModCalItm      tx_slope_skew;                     //  8
+   FacModCalItm      w_coef;                            //  9
+   FacModCalItm      txpc;                              // 10
+   FacModCalItm      temp_adc;                          // 11
+   FacModCalItm      remove_32k_xo;                     // 12
+   FacModCalItm      co_crystal;                        // 13
+   FacModCalItm      high_lna_sp;                       // 14
+   FacModCalItm      mid_lna_sp;                        // 15
+   FacModCalItm      low_lna_sp;                        // 16
+   FacModCalItm      bat_temp_comp;                     // 17
+   FacModCalItm      dts_gain_cmb;                      // 18
+   FacModCalItm      uts_band_cmb;                      // 19
+   FacModCalItm      co_temp_adc;                       // 20
+   FacModCalItm      adjustable_lna_mode_pathloss;      // 21
+   FacModCalItm      gain_rf_cal;                       // 22
+   FacModCalItm      bypass_check_fixafc_nvram;         // 23
+   FacModCalItm      multi_rat_tadc_bitmap;             // 24
+   FacModCalItm      multi_rat_afc_bitmap;              // 25
+   FacModCalItm      adjustable_lna_mode_pathloss_v2;   // 26
+   FacModCalItm      temperature_info;                  // 27
+   FacModCalItm      dt_coexistence_info;               // 28
+   FacModCalItm      thermal_sensor_type;               // 29
+   FacModCalItm      nsft_listmode;                     // 30
+   FacModCalItm      worldmode_id_info;                 // 31
+   FacModCalItm      crystal_on_pmic_enable;            // 32
+   FacModCalItm      low_pcl_subband_cal;               // 33
+   FacModCalItm      fhc_dts_extra_fb_enable;           // 34
+   FacModCalItm      sawless_lna_sp;                    // 35
+   FacModCalItm      nvram_access_interface;            // 36
+   FacModCalItm      elna_support_band_bitmap;          // 37
+   FacModCalItm      elna_high_sp;                      // 38
+   FacModCalItm      elna_mid_sp;                       // 39
+   FacModCalItm      elna_low_sp;                       // 40
+   FacModCalItm      elna_w_coef_sp;                    // 41
+   FacModCalItm      elna_mid_sawless_sp;               // 42
+   FacModCalItm      elna_high_sensitivity_sp;          // 43
+   FacModCalItm      elna_bypass_low_maxpin_sp;         // 44
+   FacModCalItm      elna_bypass_gain_threshold;        // 45
+   FacModCalItm      elna_bypass_support_band_bitmap;   // 46
+   FacModCalItm      sinwave_afc_get_temp_freq;         // 47
+   FacModCalItm      wcoef_setget_cmd_support;          // 48
+   FacModCalItm      tx_setget_cmd_support;             // 49
+   FacModCalItm      nsft_adjust_tpo_support;           // 50
+   FacModCalItm      rxd_v5_cmd_support;                // 51
+   FacModCalItm      rxd_support_band_bitmap;           // 52
+   FacModCalItm      mlna_type_v7;                      // 53
+   FacModCalItm      rxlev_precision_extend;            // 54
+} FacModCal;
+
+typedef struct
+{
+   uint16            cap_itm_offset;
+   uint16            fmc_itm_offset;
+   MsCapability      cap_itm;
+   FacModCal         fmc_itm;
+} MsCapabilityExV2;
+
+#if MD_DRV_IS_FHC_SUPPORT
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN             arfcn;
+   int16             dac_value[33];
+   Gain              gain;
+   int16             repeat_cnt; // repetitive test counts (frames) for each AFC DAC value
+   bool              capid_cal;  // capid calibration ctrl
+   bool              linear_cal; // 33 stages calibration ctrl
+   int32             capid_min;  // min value for capid range
+   int32             capid_max;  // max value for capid range
+} DSSAfc; 
+
+typedef enum
+{
+   GSM_LNA_NULL,  //For old CMD, tool will not set gsm_lna_mode
+   GSM_LNA_HIGH,
+   GSM_LNA_MID,
+   GSM_LNA_LOW,
+   GSM_LNA_W_COEF,
+   GSM_LNA_SAWLESS_MID,
+   GSM_ELNA_HIGH_SENSITIVITY,  //For Sensitivity, elna+G6
+   GSM_ELNA_BYPASS_LOW_MAXPIN  //For Max Pin, elna bypass+G1
+}LNA_Cal_Type;
+
+/*Gen 95 RXD*/
+typedef enum
+{
+   GSM_RX_CAL_SEQ_V5_NULL = 0,
+   GSM_RX_CAL_SEQ_V5_UTRA_HIGH = 1,
+   GSM_RX_CAL_SEQ_V5_HIGH = 2,
+   GSM_RX_CAL_SEQ_V5_MID = 3,
+   GSM_RX_CAL_SEQ_V5_MID_SAWLESS = 4,
+   GSM_RX_CAL_SEQ_V5_LOW = 5,
+   GSM_RX_CAL_SEQ_V5_BYPASS_LOW = 6,
+   GSM_RX_CAL_SEQ_V5_WCOEF = 7
+} LNACalSeqV5_E;   //LNA_Cal_Type  Gen95   //Must the same as RfTestRxCalSeqV5_E
+
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN                    arfcn;
+     //Gain                        gain[6]; 
+   kal_int16                 repeat_cnt; 
+   kal_int16            dl_cell_power;  //it is DL Power for each frame   // 1/8dBm
+   LNACalSeqV5_E       gsm_lna_mode [GSM_RF_MAX_RX_ANT_NUM];
+} DSSPL;    //DSSPL_MultiAnt;
+#else
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN             arfcn;
+   Gain              gain[6];       // gain for rx slot 0/1/2/3/4/5
+   int16             repeat_cnt;    // repetitive test counts (frames) for each ARFCN value
+   LNA_Cal_Type      gsm_lna_mode;  //0(Null) 1(high) 2(mid) 3(low) 4(w-coef) 5(sawless mid) 6(elna+G6) 7(elna bypass+G1)
+} DSSPL; 
+#endif
+
+typedef struct
+{
+   bool              afc_cal;
+   bool              pl_cal;
+   int8              sync_sb_num;  // the SB frame numbers needed for sync process before path loss calibration
+   uint16            step_cnt;     //int8 -> uint16 to match size 512
+   int16             power;        // the power level expected to measure from test set
+   DSSAfc            AfcDSS;
+   DSSPL             PathLossDSS[L1_MAX_DTS_STEP_CNT-2];
+   int16             lpm_sb_num;   // the SB frame numbers for DCXO LPM calibration
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   uint8             Antenna;   // GSM_AntDimension
+#endif
+} DTSParam;
+/*
+typedef struct
+{
+   AfcParams        *afc_params;
+   Report           *report;
+} DTSMParams;
+*/
+typedef struct
+{
+// DTSMParams        params;
+   intx              path_loss_cnt;
+   intx              freq_offset;
+   intx              capid_freq_offset_min;
+   intx              capid_freq_offset[FHC_MAX_CAPID_SEARCH_NUM];
+   int32             capid_search_order[FHC_MAX_CAPID_SEARCH_NUM];
+   int32             capid;
+   int32             capid_high;
+   int32             capid_low;   
+   int32             capid_best;
+   int16             afc_dac;
+   int16             arfcn;
+   int16             capid_cnt;
+   int16             repeat_index;
+   int8              state;
+   int8              capid_index;
+   int8              capid_okay_cnt;
+   int8              afc_dac_index;
+   int8              sb_okay_cnt;
+   uint8             sb_fail_cnt;
+   uint8             fb_fail_cnt;
+   bool              pl_started;
+   bool              rst_dts_idx_at_pl_cal_started;
+   bool              pre_capid_cal_ok[FHC_PRE_CAPID_SEARCH_NUM];
+} sDTSM;
+
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN             arfcn;
+   int8              timeslot_per_frame;
+   int8              apc_dac_pcl_sel;      // 2: gain step index, 1: apc_dac, 0: apc_pcl
+   int16             apc_dac_pcl_value[4];
+// uint8             pa_vbias_val;
+   uint8             pa_vbias_val[4];
+   uint8             is_low_pcl[4];
+   CodingScheme      cs[4];
+   int32             repeat_cnt;
+   int16             afc_dac_value;
+   int8              tsc;
+   APCTxPattern      pattern;
+   uint16            pattern_data;
+} USSApc;
+
+typedef struct
+{
+   uint16            step_cnt;  //int8 -> uint16 to match size 512
+   int16             high_apc_dcoffset[FrequencyBandCount];
+   USSApc            ApcUSS[L1_MAX_UTS_STEP_CNT];   
+} UTSParam;
+#endif
+/* Functions provided by l1tst_cfg.c */
+void L1TST_Init(void);
+void L1TST_Stop(void);
+void L1TST_SelectFrequencyBand1900( bool selected );
+void L1TST_SetBBTXCfg( const sBBTXCfg *param );
+void L1TST_GetBBTXCfg( sBBTXCfg *param );
+intx L1TST_GetBBTXVer(void);
+int  L1TST_GetCrystalCapRange(void);
+uint32 L1TST_GetBandSupport(void);
+uint16 L1TST_Get_EPSK_TX_Support(void);
+uint16 L1TST_Get_TCVCXO_Support(void);
+void GL1TST_DispatchMessage(ilm_struct *ilm_ptr);
+void L1TST_RF_SetRampApcLevel( int rf_band, int power_level, int apc_dac );
+bool L1TST_CheckAvailableBands( FrequencyBand band );
+bool L1TST_CheckAvailableARFCNs( ARFCN arfcn );
+#if defined(__ATERFTX_ERROR_HANDLE_ENHANCE__)
+bool L1TST_CheckBandARFCNisMatch( uint8 band, ARFCN arfcn );
+#endif  //__ATERFTX_ERROR_HANDLE_ENHANCE__
+void L1TST_MsCapability( MsCapabilityEx *msCapabilityEx );
+void L1TST_MsCapabilityV2( MsCapabilityExV2 *ms_cap );
+void L1TST_TXPC_CL_GetAllADC( void *buff, int8 is_EPSK );
+void L1TST_TXPC_CL_GetAllTEMP( void *buff, int8 is_EPSK );
+void L1TST_TXPC_CL_GetSubband( int rf_band, void *buff, int8 is_EPSK );
+uint16 L1TST_TXPC_CL_GetOneADC( int rf_band, int power_level, int8 is_EPSK );
+uint16 L1TST_TXPC_GetTemperature( void );
+#if MD_DRV_IS_FHC_SUPPORT
+void L1TST_StartDTSCal( DTSParam *dtsData );
+void L1TST_StartUTSCal( UTSParam *utsData );
+sDTSM* L1TST_FHCLog(void);
+#endif
+
+#if MD_DRV_IS_NSFT_SUPPORT
+   #if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   void L1TST_StartNSFTProc( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn,
+                             Power BCh_dl_power, Power TCh_dl_power, TSC tsc, TimeSlot TCh_slot,
+                             Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs );
+   void L1TST_NSFTProc_ChangeChannel( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn,
+                                      Power BCh_dl_power, Power TCh_dl_power, TSC tsc, TimeSlot TCh_slot,
+                                      Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs );
+   #else
+   void L1TST_StartNSFTProc( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn, 
+                             Gain BCh_gain, Gain TCh_gain, TSC tsc, TimeSlot TCh_slot, 
+                             Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs);
+   void L1TST_NSFTProc_ChangeChannel ( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn, 
+                                       Gain BCh_gain, Gain TCh_gain, TSC tsc, TimeSlot TCh_slot, 
+                                       Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs);
+   #endif //#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__) 
+void L1TST_NSFTProc_ChangePower( Power txPowerLev);
+void L1TST_StopNSFTProc( void );
+void L1TST_StopNSFT_RecoverToMetaState( void );
+void L1TST_SetupSingleEndBERData( uint32 tst_cnt );
+void L1TST_ReportSingleEndBERDone( uint32* seBER_SUM, uint32* curr_cnt );
+void L1TST_SetupRXLEVData( void );
+   #if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   void L1TST_ReportRXLEV( uint16 RXLEV[] );
+   #else
+   void L1TST_ReportRXLEV( uint16 *RXLEV );
+   #endif
+void L1TST_ReportRXQual( uint16 BER_PERMILLAGE, uint8 *RXQual );
+#endif //#if MD_DRV_IS_NSFT_SUPPORT
+
+/* Functions provided by l1tst_pm.c */
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+void L1TST_PowerScan( ARFCN  arfcn, int8 sampleNoPerFrame, Gain gain, Gain gain_rxd, int16 frames, FrequencyBand band );
+#else
+void L1TST_PowerScan(ARFCN arfcn, int8 sampleNoPerFrame, Gain gain, int16 frames);
+#endif
+
+#if MD_DRV_IS_W_CANCELLATION_SUPPORT
+   #if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   void L1TST_IR_PowerScan( ARFCN  arfcn, int8 sampleNoPerFrame, Gain gain, Gain gain_rxd, int16 frames, int8 if_flag, FrequencyBand band );
+   #else
+   void L1TST_IR_PowerScan( ARFCN  arfcn, int8 sampleNoPerFrame, Gain gain, int16 frames, int8 if_flag );
+   #endif
+#endif
+
+/* Functions provided by l1tst_fcb.c */
+void L1TST_FCBControl(ARFCN arfcn, int16 dacValue, Gain gain);
+intx L1TST_FCBGetFreqOffset(void);
+
+/* Functions provided by l1tst_nbtx.c */
+void L1TST_NormalBurstTx(ARFCN  arfcn, BSIC bsic, int8 bitmask,
+                         Power txPowerLev, int16 frames, int16 dacValue, APCTxPattern pattern);
+
+/* Functions provided by l1tst_cont.c */
+void L1TST_ContinuousTx(ARFCN arfcn, ContTxPattern pattern,uint16 patternData, bool onOff, uint16 modtype, Power PowerLev);
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+void L1TST_ContinuousRx( FrequencyBand band, ARFCN arfcn, Gain gain, Gain gain_rxd, bool onOff );
+#else
+void L1TST_ContinuousRx(ARFCN arfcn, Gain gain, bool onOff);
+#endif
+
+/* Functions provided by l1tst_pdtch.c */
+#if (MD_DRV_IS_GPRS || MD_DRV_IS_MULTISLOT_TX_SUPPORT)
+void L1TST_MultiSlotTx( ARFCN  arfcn, BSIC bsic, int8 timeSlotmask, Power powerLev[4],
+                        CodingScheme cs[4], TimingAdvance ta, int32 frames, int16 dacValue,
+                        bool isEgprs, APCTxPattern pattern, uint16 patternData );
+#endif
+
+#if MD_DRV_IS_TX_GAIN_RF_CALIBRATION_SUPPORT
+void L1TST_TxGainRFSetting(ARFCN  arfcn, BSIC bsic, CodingScheme cs, TimingAdvance ta, 
+                           int32 frames, int16 dacValue, bool isEgprs, APCTxPattern pattern, 
+                           uint16 patternData,  uint16 paGain, uint16 paVbias, uint16 rfGainIndex );
+uint8 L1TST_Query_Grf_Number( void );
+int16* L1TST_Query_Baseband_Power( void );
+#endif
+
+/* Functions provided by l1tst_afc.c */
+void L1TST_SetAfcDacValue( int16 dacValue );
+uint16 L1TST_GetAfcDacValueAtTRXOffsetCalibration(void);
+void L1TST_SetAFcData( int16 calibrated_dac_default, intx calibrated_int_slope );
+void L1TST_SetDcxoPowerMode(kal_uint8 mode);
+
+#if MD_DRV_IS_EPSK_TX_SUPPORT
+void L1TST_RF_SetRampApcLevelEPSK( int rf_band, int power_level, int apc_dac );
+#endif
+
+typedef void (*CalibraHandlerCallback)(kal_int32 u4Result);
+bool L1TST_Begin32KCalibration( CalibraHandlerCallback cb );
+void L1TST_Get32KCalibrationResult( kal_uint32 fmResult );
+
+void L1TST_UpdateCalibrationData( kal_uint32 cal_lid );
+uint16 L1TST_Query_L1D_Mode( void );
+
+#endif
diff --git a/mcu/interface/middleware/meta/l1tst_public_gen97.h b/mcu/interface/middleware/meta/l1tst_public_gen97.h
new file mode 100644
index 0000000..608a452
--- /dev/null
+++ b/mcu/interface/middleware/meta/l1tst_public_gen97.h
@@ -0,0 +1,866 @@
+/*****************************************************************************
+*  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) 2005
+*
+*  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).
+*
+*****************************************************************************/
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2001
+*
+*******************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   l1tst_public.h
+ *
+ * Project:
+ * --------
+ *   MTK6208
+ *
+ * Description:
+ * ------------
+ *   L1 test mode public interface
+ *
+ * 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!
+ * 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!
+ * 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!
+ * 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!
+ * 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!
+ * 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!!
+ *==============================================================================
+ *******************************************************************************/
+
+#include "l1_types_public.h"
+#include "l1_option.h"
+#include "mph_types.h"
+#include "kal_general_types.h"
+#include "l1_kal.h"
+
+#if MD_DRV_IS_NSFT_LIST_MODE_SUPPORT
+#include "l1tst_nsft_lm_public.h"
+#endif
+
+#ifndef l1tst_public_h
+#define l1tst_public_h
+#define MS_CAPABILITY_GSM               0x00000001
+#define MS_CAPABILITY_GPRS              0x00000002
+#define MS_CAPABILITY_EDGE_RX           0x00000004
+#define MS_CAPABILITY_EDGE_8PSK_TX      0x00000008
+#define MS_CAPABILITY_8PM               0x00000010
+#define MS_CAPABILITY_FHC               0x00000020
+#define MS_CAPABILITY_LC                0x00000040
+#define MS_CAPABILITY_NSFT              0x00000080
+#define MS_CAPABILITY_TCVCXO            0x00000100
+#define MS_CAPABILITY_TXPC_CL_GMSK      0x00000200
+#define MS_CAPABILITY_TXPC_OL           0x00000400
+#define MS_CAPABILITY_TXPC_CL_TEMP      0x00000800
+#define MS_CAPABILITY_TXPC_CL_EPSK      0x00001000
+#define MS_CAPABILITY_LNAMODE           0x00002000
+#define MS_CAPABILITY_TXPC_AUX_TEMP_ADC 0x00004000
+#define MS_CAPABILITY_TXPC_BSI_TEMP_ADC 0x00008000
+
+#define MS_BAND_SUPPORT_GSM400          0x00000001
+#define MS_BAND_SUPPORT_GSM850          0x00000002
+#define MS_BAND_SUPPORT_GSM900          0x00000004
+#define MS_BAND_SUPPORT_DCS1800         0x00000008
+#define MS_BAND_SUPPORT_PCS1900         0x00000010
+
+#define CAL_RX_LNA_MODE_HIGH            0x0001
+#define CAL_RX_LNA_MODE_MID             0x0002
+#define CAL_RX_LNA_MODE_LOW             0x0004
+#define CAL_RX_LNA_MODE_SESL            0x0008  // for single-end saw-less
+#define CAL_RX_LNA_W_COEF               0x0010
+#define CAL_RX_ELNA_HIGH_SENSITIVITY    0x0020  // elna+G6 for sensitivity
+#define CAL_RX_ELNA_BYPASS_LOW_MAXPIN   0x0040  // elna bypass+G1 for Max Pin
+
+
+
+#define CAL_TXPC_OL                     0x0001
+#define CAL_TXPC_CL_GMSK                0x0002
+#define CAL_TXPC_CL_EPSK                0x0004
+#define CAL_TXPC_CL_TEMP                0x0008
+
+#define NVRAM_GET_SET_RX_PATHLOSS       0x0001  //for RF_TEST_CMD_GET_RX_PATH_LOSS & RF_TEST_CMD_SET_RX_PATH_LOSS  &  SET/GET PATHLOSS V3 for 93
+
+
+typedef enum
+{
+   AFC_2_SEC
+  ,AFC_33_SEC
+} AfcCalType;
+
+typedef enum
+{
+   AFC_DAC_RANGE_1023
+  ,AFC_DAC_RANGE_8191
+} AfcCalDacRange;
+
+typedef enum
+{
+   Band400  = 0x0
+  ,Band850  = 0x1
+  ,Band900  = 0x2
+  ,Band1800 = 0x4
+  ,Band1900 = 0x8 
+} BandBitMap;
+
+typedef enum
+{
+   TEMP_RANGE_M10_65
+  ,TEMP_RANGE_M10_90
+} TempRangeVersion;
+
+typedef struct
+{
+// bool              ok;
+   uint32            capability;
+   uint32            band_support;
+} MsCapabilityEx;
+
+// MS Capability
+typedef  struct
+{
+   unsigned short    support_gsm        :1;
+   unsigned short    support_gprs       :1;
+   unsigned short    support_edge_rx    :1;
+   unsigned short    support_epsk_tx    :1;
+   unsigned short    support_8pm        :1;
+   unsigned short    support_fhc        :1;
+   unsigned short    support_nsft       :1;
+   unsigned short    band_gsm400        :1;
+   unsigned short    band_gsm850        :1;
+   unsigned short    band_gsm900        :1;
+   unsigned short    band_dcs1800       :1;
+   unsigned short    band_pcs1900       :1;
+   unsigned short    ps_epsk_tx_disable :1;   /* Set as bit-1 when __EPSK_TX_SW_SWITCH_OFF__ is defined. */
+   unsigned short    reserved0          :3;
+} MsCapability;
+
+// Factory Mode Calibration Item
+typedef  struct
+{
+   unsigned short    is_capable      :1;
+   unsigned short    is_mandatory    :1;
+   unsigned short    parameters      :14;
+} FacModCalItm;
+
+typedef struct
+{
+   FacModCalItm      cap_id;                            //  0
+   FacModCalItm      afc;                               //  1
+   FacModCalItm      rx_pathloss;                       //  2
+   FacModCalItm      tx_pcl;                            //  3
+   FacModCalItm      tx_subband;                        //  4
+   FacModCalItm      trx_offset;                        //  5
+   FacModCalItm      tx_iq;                             //  6
+   FacModCalItm      tx_fb_dac;                         //  7
+   FacModCalItm      tx_slope_skew;                     //  8
+   FacModCalItm      w_coef;                            //  9
+   FacModCalItm      txpc;                              // 10
+   FacModCalItm      temp_adc;                          // 11
+   FacModCalItm      remove_32k_xo;                     // 12
+   FacModCalItm      co_crystal;                        // 13
+   FacModCalItm      high_lna_sp;                       // 14
+   FacModCalItm      mid_lna_sp;                        // 15
+   FacModCalItm      low_lna_sp;                        // 16
+   FacModCalItm      bat_temp_comp;                     // 17
+   FacModCalItm      dts_gain_cmb;                      // 18
+   FacModCalItm      uts_band_cmb;                      // 19
+   FacModCalItm      co_temp_adc;                       // 20
+   FacModCalItm      adjustable_lna_mode_pathloss;      // 21
+   FacModCalItm      gain_rf_cal;                       // 22
+   FacModCalItm      bypass_check_fixafc_nvram;         // 23
+   FacModCalItm      multi_rat_tadc_bitmap;             // 24
+   FacModCalItm      multi_rat_afc_bitmap;              // 25
+   FacModCalItm      adjustable_lna_mode_pathloss_v2;   // 26
+   FacModCalItm      temperature_info;                  // 27
+   FacModCalItm      dt_coexistence_info;               // 28
+   FacModCalItm      thermal_sensor_type;               // 29
+   FacModCalItm      nsft_listmode;                     // 30
+   FacModCalItm      worldmode_id_info;                 // 31
+   FacModCalItm      crystal_on_pmic_enable;            // 32
+   FacModCalItm      low_pcl_subband_cal;               // 33
+   FacModCalItm      fhc_dts_extra_fb_enable;           // 34
+   FacModCalItm      sawless_lna_sp;                    // 35
+   FacModCalItm      nvram_access_interface;            // 36
+   FacModCalItm      elna_support_band_bitmap;          // 37
+   FacModCalItm      elna_high_sp;                      // 38
+   FacModCalItm      elna_mid_sp;                       // 39
+   FacModCalItm      elna_low_sp;                       // 40
+   FacModCalItm      elna_w_coef_sp;                    // 41
+   FacModCalItm      elna_mid_sawless_sp;               // 42
+   FacModCalItm      elna_high_sensitivity_sp;          // 43
+   FacModCalItm      elna_bypass_low_maxpin_sp;         // 44
+   FacModCalItm      elna_bypass_gain_threshold;        // 45
+   FacModCalItm      elna_bypass_support_band_bitmap;   // 46
+   FacModCalItm      sinwave_afc_get_temp_freq;         // 47
+   FacModCalItm      wcoef_setget_cmd_support;          // 48
+   FacModCalItm      tx_setget_cmd_support;             // 49
+   FacModCalItm      nsft_adjust_tpo_support;           // 50
+   FacModCalItm      rxd_v5_cmd_support;                // 51
+   FacModCalItm      rxd_support_band_bitmap;           // 52
+   FacModCalItm      mlna_type_v7;                      // 53
+   FacModCalItm      rxlev_precision_extend;            // 54
+   FacModCalItm      telematics_volt_temp_enhance;      // 55
+} FacModCal;
+
+typedef struct
+{
+   uint16            cap_itm_offset;
+   uint16            fmc_itm_offset;
+   MsCapability      cap_itm;
+   FacModCal         fmc_itm;
+} MsCapabilityExV2;
+
+#if MD_DRV_IS_FHC_SUPPORT
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN             arfcn;
+   #if IS_AFC_CAPABILITY_ENHANCEMENT_SUPPORT
+   uint16            dac_value[33]; //Modify from int16 to uint16
+   #else
+   int16             dac_value[33];
+   #endif
+   Gain              gain;
+   int16             repeat_cnt; // repetitive test counts (frames) for each AFC DAC value
+   bool              capid_cal;  // capid calibration ctrl
+   bool              linear_cal; // 33 stages calibration ctrl
+   int32             capid_min;  // min value for capid range
+   int32             capid_max;  // max value for capid range
+} DSSAfc; 
+
+typedef enum
+{
+   GSM_LNA_NULL,  //For old CMD, tool will not set gsm_lna_mode
+   GSM_LNA_HIGH,
+   GSM_LNA_MID,
+   GSM_LNA_LOW,
+   GSM_LNA_W_COEF,
+   GSM_LNA_SAWLESS_MID,
+   GSM_ELNA_HIGH_SENSITIVITY,  //For Sensitivity, elna+G6
+   GSM_ELNA_BYPASS_LOW_MAXPIN  //For Max Pin, elna bypass+G1
+}LNA_Cal_Type;
+
+/*Gen 95 RXD*/
+typedef enum
+{
+   GSM_RX_CAL_SEQ_V5_NULL = 0,
+   GSM_RX_CAL_SEQ_V5_UTRA_HIGH = 1,
+   GSM_RX_CAL_SEQ_V5_HIGH = 2,
+   GSM_RX_CAL_SEQ_V5_MID = 3,
+   GSM_RX_CAL_SEQ_V5_MID_SAWLESS = 4,
+   GSM_RX_CAL_SEQ_V5_LOW = 5,
+   GSM_RX_CAL_SEQ_V5_BYPASS_LOW = 6,
+   GSM_RX_CAL_SEQ_V5_WCOEF = 7
+} LNACalSeqV5_E;   //LNA_Cal_Type  Gen95   //Must the same as RfTestRxCalSeqV5_E
+
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN                    arfcn;
+     //Gain                        gain[6]; 
+   kal_int16                 repeat_cnt; 
+   kal_int16            dl_cell_power;  //it is DL Power for each frame   // 1/8dBm
+   LNACalSeqV5_E       gsm_lna_mode [GSM_RF_MAX_RX_ANT_NUM];
+} DSSPL;    //DSSPL_MultiAnt;
+#else
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN             arfcn;
+   Gain              gain[6];       // gain for rx slot 0/1/2/3/4/5
+   int16             repeat_cnt;    // repetitive test counts (frames) for each ARFCN value
+   LNA_Cal_Type      gsm_lna_mode;  //0(Null) 1(high) 2(mid) 3(low) 4(w-coef) 5(sawless mid) 6(elna+G6) 7(elna bypass+G1)
+} DSSPL; 
+#endif
+
+typedef struct
+{
+   bool              afc_cal;
+   bool              pl_cal;
+   int8              sync_sb_num;  // the SB frame numbers needed for sync process before path loss calibration
+   uint16            step_cnt;     //int8 -> uint16 to match size 512
+   int16             power;        // the power level expected to measure from test set
+   DSSAfc            AfcDSS;
+   DSSPL             PathLossDSS[L1_MAX_DTS_STEP_CNT-2];
+   int16             lpm_sb_num;   // the SB frame numbers for DCXO LPM calibration
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   uint8             Antenna;   // GSM_AntDimension
+#endif
+} DTSParam;
+/*
+typedef struct
+{
+   AfcParams        *afc_params;
+   Report           *report;
+} DTSMParams;
+*/
+typedef struct
+{
+// DTSMParams        params;
+   intx              path_loss_cnt;
+   intx              freq_offset;
+   intx              capid_freq_offset_min;
+   intx              capid_freq_offset[FHC_MAX_CAPID_SEARCH_NUM];
+   int32             capid_search_order[FHC_MAX_CAPID_SEARCH_NUM];
+   int32             capid;
+   int32             capid_high;
+   int32             capid_low;   
+   int32             capid_best;
+   #if IS_AFC_CAPABILITY_ENHANCEMENT_SUPPORT
+   uint16            afc_dac; //Modify from int16 to uint16
+   #else
+   int16             afc_dac;
+   #endif
+   int16             arfcn;
+   int16             capid_cnt;
+   int16             repeat_index;
+   int8              state;
+   int8              capid_index;
+   int8              capid_okay_cnt;
+   int8              afc_dac_index;
+   int8              sb_okay_cnt;
+   uint8             sb_fail_cnt;
+   uint8             fb_fail_cnt;
+   bool              pl_started;
+   bool              rst_dts_idx_at_pl_cal_started;
+   bool              pre_capid_cal_ok[FHC_PRE_CAPID_SEARCH_NUM];
+} sDTSM;
+
+typedef struct
+{
+   FrequencyBand     band;
+   ARFCN             arfcn;
+   int8              timeslot_per_frame;
+   int8              apc_dac_pcl_sel;      // 2: gain step index, 1: apc_dac, 0: apc_pcl
+   int16             apc_dac_pcl_value[4];
+// uint8             pa_vbias_val;
+   uint8             pa_vbias_val[4];
+   uint8             is_low_pcl[4];
+   CodingScheme      cs[4];
+   int32             repeat_cnt;
+   #if IS_AFC_CAPABILITY_ENHANCEMENT_SUPPORT
+   uint16            afc_dac_value;
+   #else
+   int16             afc_dac_value;
+   #endif
+   int8              tsc;
+   APCTxPattern      pattern;
+   uint16            pattern_data;
+} USSApc;
+
+typedef struct
+{
+   uint16            step_cnt;  //int8 -> uint16 to match size 512
+   int16             high_apc_dcoffset[FrequencyBandCount];
+   USSApc            ApcUSS[L1_MAX_UTS_STEP_CNT];   
+} UTSParam;
+#endif
+/* Functions provided by l1tst_cfg.c */
+void L1TST_Init(void);
+void L1TST_Stop(void);
+void L1TST_SelectFrequencyBand1900( bool selected );
+void L1TST_SetBBTXCfg( const sBBTXCfg *param );
+void L1TST_GetBBTXCfg( sBBTXCfg *param );
+intx L1TST_GetBBTXVer(void);
+int  L1TST_GetCrystalCapRange(void);
+uint32 L1TST_GetBandSupport(void);
+uint16 L1TST_Get_EPSK_TX_Support(void);
+uint16 L1TST_Get_TCVCXO_Support(void);
+void GL1TST_DispatchMessage(ilm_struct *ilm_ptr);
+void L1TST_RF_SetRampApcLevel( int rf_band, int power_level, int apc_dac );
+bool L1TST_CheckAvailableBands( FrequencyBand band );
+bool L1TST_CheckAvailableARFCNs( ARFCN arfcn );
+#if defined(__ATERFTX_ERROR_HANDLE_ENHANCE__)
+bool L1TST_CheckBandARFCNisMatch( uint8 band, ARFCN arfcn );
+#endif  //__ATERFTX_ERROR_HANDLE_ENHANCE__
+void L1TST_MsCapability( MsCapabilityEx *msCapabilityEx );
+void L1TST_MsCapabilityV2( MsCapabilityExV2 *ms_cap );
+void L1TST_TXPC_CL_GetAllADC( void *buff, int8 is_EPSK );
+void L1TST_TXPC_CL_GetAllTEMP( void *buff, int8 is_EPSK );
+void L1TST_TXPC_CL_GetSubband( int rf_band, void *buff, int8 is_EPSK );
+uint16 L1TST_TXPC_CL_GetOneADC( int rf_band, int power_level, int8 is_EPSK );
+uint16 L1TST_TXPC_GetTemperature( void );
+#if MD_DRV_IS_FHC_SUPPORT
+void L1TST_StartDTSCal( DTSParam *dtsData );
+void L1TST_StartUTSCal( UTSParam *utsData );
+sDTSM* L1TST_FHCLog(void);
+#endif
+
+#if MD_DRV_IS_NSFT_SUPPORT
+   #if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   void L1TST_StartNSFTProc( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn,
+                             Power BCh_dl_power, Power TCh_dl_power, TSC tsc, TimeSlot TCh_slot,
+                             Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs );
+   void L1TST_NSFTProc_ChangeChannel( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn,
+                                      Power BCh_dl_power, Power TCh_dl_power, TSC tsc, TimeSlot TCh_slot,
+                                      Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs );
+   #else
+   void L1TST_StartNSFTProc( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn, 
+                             Gain BCh_gain, Gain TCh_gain, TSC tsc, TimeSlot TCh_slot, 
+                             Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs);
+   void L1TST_NSFTProc_ChangeChannel ( FrequencyBand band, ARFCN BCh_arfcn, ARFCN TCh_arfcn, 
+                                       Gain BCh_gain, Gain TCh_gain, TSC tsc, TimeSlot TCh_slot, 
+                                       Power txPowerLev, bool IS_EPSK_TX, CodingScheme epsk_cs);
+   #endif //#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__) 
+void L1TST_NSFTProc_ChangePower( Power txPowerLev);
+void L1TST_StopNSFTProc( void );
+void L1TST_StopNSFT_RecoverToMetaState( void );
+void L1TST_SetupSingleEndBERData( uint32 tst_cnt );
+void L1TST_ReportSingleEndBERDone( uint32* seBER_SUM, uint32* curr_cnt );
+void L1TST_SetupRXLEVData( void );
+   #if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   void L1TST_ReportRXLEV( uint16 RXLEV[] );
+   #else
+   void L1TST_ReportRXLEV( uint16 *RXLEV );
+   #endif
+void L1TST_ReportRXQual( uint16 BER_PERMILLAGE, uint8 *RXQual );
+#endif //#if MD_DRV_IS_NSFT_SUPPORT
+
+/* Functions provided by l1tst_pm.c */
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+void L1TST_PowerScan( ARFCN  arfcn, int8 sampleNoPerFrame, Gain gain, Gain gain_rxd, int16 frames, FrequencyBand band );
+#else
+void L1TST_PowerScan(ARFCN arfcn, int8 sampleNoPerFrame, Gain gain, int16 frames);
+#endif
+
+#if MD_DRV_IS_W_CANCELLATION_SUPPORT
+   #if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+   void L1TST_IR_PowerScan( ARFCN  arfcn, int8 sampleNoPerFrame, Gain gain, Gain gain_rxd, int16 frames, int8 if_flag, FrequencyBand band );
+   #else
+   void L1TST_IR_PowerScan( ARFCN  arfcn, int8 sampleNoPerFrame, Gain gain, int16 frames, int8 if_flag );
+   #endif
+#endif
+
+/* Functions provided by l1tst_fcb.c */
+#if IS_AFC_CAPABILITY_ENHANCEMENT_SUPPORT
+void L1TST_FCBControl(ARFCN arfcn, uint16 dacValue, Gain gain);
+#else
+void L1TST_FCBControl(ARFCN arfcn, int16 dacValue, Gain gain);
+#endif
+intx L1TST_FCBGetFreqOffset(void);
+
+/* Functions provided by l1tst_nbtx.c */
+#if IS_AFC_CAPABILITY_ENHANCEMENT_SUPPORT
+void L1TST_NormalBurstTx(ARFCN  arfcn, BSIC bsic, int8 bitmask,
+                         Power txPowerLev, int16 frames, uint16 dacValue, APCTxPattern pattern);
+#else
+void L1TST_NormalBurstTx(ARFCN  arfcn, BSIC bsic, int8 bitmask,
+                         Power txPowerLev, int16 frames, int16 dacValue, APCTxPattern pattern);
+#endif
+
+/* Functions provided by l1tst_cont.c */
+void L1TST_ContinuousTx(ARFCN arfcn, ContTxPattern pattern,uint16 patternData, bool onOff, uint16 modtype, Power PowerLev);
+#if defined(__2G_RX_DIVERSITY_PATH_SUPPORT__)
+void L1TST_ContinuousRx( FrequencyBand band, ARFCN arfcn, Gain gain, Gain gain_rxd, bool onOff );
+#else
+void L1TST_ContinuousRx(ARFCN arfcn, Gain gain, bool onOff);
+#endif
+
+/* Functions provided by l1tst_pdtch.c */
+#if (MD_DRV_IS_GPRS || MD_DRV_IS_MULTISLOT_TX_SUPPORT)
+   #if IS_AFC_CAPABILITY_ENHANCEMENT_SUPPORT
+void L1TST_MultiSlotTx( ARFCN  arfcn, BSIC bsic, int8 timeSlotmask, Power powerLev[4],
+                        CodingScheme cs[4], TimingAdvance ta, int32 frames, uint16 dacValue,
+                        bool isEgprs, APCTxPattern pattern, uint16 patternData );
+   #else
+void L1TST_MultiSlotTx( ARFCN  arfcn, BSIC bsic, int8 timeSlotmask, Power powerLev[4],
+                        CodingScheme cs[4], TimingAdvance ta, int32 frames, int16 dacValue,
+                        bool isEgprs, APCTxPattern pattern, uint16 patternData );
+   #endif
+#endif
+
+#if MD_DRV_IS_TX_GAIN_RF_CALIBRATION_SUPPORT
+   #if IS_AFC_CAPABILITY_ENHANCEMENT_SUPPORT
+//void L1TST_TxGainRFSetting(ARFCN  arfcn, BSIC bsic, CodingScheme cs, TimingAdvance ta,
+//                           int32 frames, uint16 dacValue, bool isEgprs, APCTxPattern pattern,
+//                           uint16 patternData,  uint16 paGain, uint16 paVbias, uint16 rfGainIndex );
+   #else
+void L1TST_TxGainRFSetting(ARFCN  arfcn, BSIC bsic, CodingScheme cs, TimingAdvance ta, 
+                           int32 frames, int16 dacValue, bool isEgprs, APCTxPattern pattern, 
+                           uint16 patternData,  uint16 paGain, uint16 paVbias, uint16 rfGainIndex );
+   #endif
+uint8 L1TST_Query_Grf_Number( void );
+int16* L1TST_Query_Baseband_Power( void );
+#endif
+
+/* Functions provided by l1tst_afc.c */
+#if IS_AFC_CAPABILITY_ENHANCEMENT_SUPPORT
+void L1TST_SetAfcDacValue( uint16 dacValue );
+#else
+void L1TST_SetAfcDacValue( int16 dacValue );
+#endif
+uint16 L1TST_GetAfcDacValueAtTRXOffsetCalibration(void);
+void L1TST_SetAFcData( int16 calibrated_dac_default, intx calibrated_int_slope );
+void L1TST_SetDcxoPowerMode(kal_uint8 mode);
+
+#if MD_DRV_IS_EPSK_TX_SUPPORT
+void L1TST_RF_SetRampApcLevelEPSK( int rf_band, int power_level, int apc_dac );
+#endif
+
+typedef void (*CalibraHandlerCallback)(kal_int32 u4Result);
+bool L1TST_Begin32KCalibration( CalibraHandlerCallback cb );
+void L1TST_Get32KCalibrationResult( kal_uint32 fmResult );
+
+void L1TST_UpdateCalibrationData( kal_uint32 cal_lid );
+uint16 L1TST_Query_L1D_Mode( void );
+
+//For fix xl1sim build warning
+void L1SM_BeginMetaMode32KCalibration( void );
+void L1D_SinWave_Detection( bool is_sin_wave );
+//void L1D_CalibrateGainMismatch( void );
+#if IS_AFC_CAPABILITY_ENHANCEMENT_SUPPORT   //uint16 dacValue
+unsigned long L1TST_MultiSlotTx_with_AUXADCRead( ARFCN  arfcn, BSIC bsic, int8 timeSlotmask, Power powerLev[4],
+                                         CodingScheme cs[4], TimingAdvance ta, int32 frames, uint16 dacValue,
+                                         bool isEgprs, APCTxPattern pattern, uint16 patternData );
+
+#else
+unsigned long L1TST_MultiSlotTx_with_AUXADCRead( ARFCN  arfcn, BSIC bsic, int8 timeSlotmask, Power powerLev[4],
+                                         CodingScheme cs[4], TimingAdvance ta, int32 frames, int16 dacValue,
+                                         bool isEgprs, APCTxPattern pattern, uint16 patternData );
+#endif
+#ifdef MTK_SLEEP_ENABLE
+void L1SM_WakeUp( void );
+#endif
+
+
+void L1TST_ReInitAFCData( void );
+
+#endif
diff --git a/mcu/interface/middleware/meta/ul1tst_msg.h b/mcu/interface/middleware/meta/ul1tst_msg.h
new file mode 100644
index 0000000..550f4c6
--- /dev/null
+++ b/mcu/interface/middleware/meta/ul1tst_msg.h
@@ -0,0 +1,9 @@
+#if (defined __MD93__)
+#include "ul1tst_msg_gen93.h"
+#elif (defined __MD95__)
+#include "ul1tst_msg_gen95.h"
+#elif (defined __MD97__) || (defined __MD97P__)
+#include "ul1tst_msg_gen97.h"
+#else
+#error "[ERROR] Invalid MD generation"
+#endif
diff --git a/mcu/interface/middleware/meta/ul1tst_msg_gen93.h b/mcu/interface/middleware/meta/ul1tst_msg_gen93.h
new file mode 100644
index 0000000..e888606
--- /dev/null
+++ b/mcu/interface/middleware/meta/ul1tst_msg_gen93.h
@@ -0,0 +1,976 @@
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2005
+*
+*  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:
+ * ---------
+ * ul1tst_msg.h
+ *
+ * Project:
+ * --------
+ *   MT6268 Project
+ *
+ * Description:
+ * ------------
+ *   ul1tst_msg.h
+ *
+ * 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!
+ * 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!
+ *
+ * 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!
+ * 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 UL1TST_MSG_H
+#define UL1TST_MSG_H
+
+/*===============================================================================*/
+
+#include "kal_general_types.h"
+//#include "nvram_data_items.h"
+#include "kal_public_defs.h"
+
+#include "ft_msg_ul1rf.h"
+/*===============================================================================*/
+
+//#ifdef MT6268T
+typedef enum
+{
+   UL1TST_CMD_TXACCESS = 0   
+   ,UL1TST_CMD_TX_DPCH
+   ,UL1TST_CMD_RX_DPCH
+   ,UL1TST_CMD_RSSI
+   ,UL1TST_CMD_RSSI_RXD  /**< \breif R8 get both rx path RSSI */
+   ,UL1TST_CMD_RSSI_CONT
+   ,UL1TST_CMD_RSCP
+   ,UL1TST_CMD_AFC      //anthony 0514
+   ,UL1TST_CMD_MQC      //20081114 congo, add msg for mobile quick caliration
+   ,UL1TST_CMD_NSFT 
+   ,UL1TST_CMD_HSDPA_NSFT
+   ,UL1TST_CMD_HSUPA_NSFT
+   ,UL1TST_CMD_STOP 
+   ,UL1TST_CMD_MQC_OCTLEV
+   ,UL1TST_CMD_MQC_EXT  //rxd, gvgabb0
+   ,UL1TST_CMD_AFC_EXT  //Add msg for DCXO to do multi-bin detection (ics_mode=CFE_MODE1)
+   ,UL1TST_CMD_RELOAD_NVRAM
+   ,UL1TST_CMD_ANT_MODE     /**< \brief R8 set rx path: 0:none 1:main 2:diversity: 3: both */
+   ,UL1TST_CMD_PA_DRIFT_SWITCH  // PA drift compensation switch message
+   ,UL1TST_CMD_RX_CELL_POWER    // configure the Rx cell power before cell search
+   ,UL1TST_CMD_GET_RF_TEMP /*20*/      // Get the RF Temperature sensor reading (parameter:UL1TSTCmdGetRfTempSensor)
+   ,UL1TST_CMD_GET_RF_CAPABILITY /*21*/  // Get the RF capability (no parameter)
+   ,UL1TST_CMD_GET_MIPI_PA_CW_NUMBER /*22*/   
+   ,UL1TST_CMD_LIST_MODE	//for list mode
+   ,UL1TST_CMD_GET_RF_MIPI_CODEWORD /*24*/
+   ,UL1TST_CMD_SET_RF_MIPI_CODEWORD /*25*/
+   ,UL1TST_CMD_GET_RF_TEMP_INFO /*26*/
+   ,UL1TST_CMD_RX_GAIN_SWEEP /* 27 */
+   ,UL1TST_CMD_END
+} UL1TSTCmdType;
+
+typedef struct
+{
+    kal_uint16	 ul_uarfcn;		/* UL uarfcn range:????Read from NVRAM?? (9612 ~ 9888) */	
+    kal_uint16  dl_uarfcn;
+    kal_uint16	 dl_psc;		   /* 0~511. */
+    kal_uint8   signature;	   /* 0~15, for single signature decision. */
+    kal_uint8   pa_mode;	   /* 0: high 1: middle 2: low */
+    kal_int8    init_power;	/* Assume cpich_rscp=0, ul_interference=0. */
+    kal_uint8   power_step;   /* Preamble power ramping step. 1 ~ 8dB */	
+    kal_uint8   max_retrans;	/* 1~64 */
+    kal_uint8   asc;          /* 0~7 */
+} UL1TSTCmdTxAccess;
+
+typedef struct
+{
+   //kal_int16	dl_freq;
+   kal_int16	ul_freq;
+   kal_int16	psc;		        /* 0~511. */
+   kal_uint32	sc_code;         /* Scrambling code #. 0 ~ 16777215 */
+   kal_uint8   power_ctrl_mode;
+   kal_uint8 	pa_mode;
+   kal_uint16 	idx;
+   kal_uint16	afc_dac;
+   kal_uint8	dpcch_pwr;
+   kal_uint8	dpdch_pwr;
+	
+   /* Below for UL1D_RF_Meta_SetTxInfo. */
+   /* Below for setPaApcDac. */	
+   kal_uint8 	rf_band;
+   kal_uint8   vm1;
+   kal_uint8   vm2;
+   kal_uint16  dc2dc_dac;
+   kal_uint16  vbias_dac;
+   kal_bool    pwr_det;
+   kal_uint16 	apc_dac;
+   kal_uint16  pa_dac;		
+} UL1TSTCmdTxDPCh;	//Anthony
+
+typedef struct
+{
+	kal_int16	dl_freq;
+	kal_int16	psc;	/* 0~511. */
+	kal_uint8	ssc;	/* 0~15. */
+	kal_int16	ovsf;	/* 0~sf-1. */
+	kal_uint16	afc_dac;
+	
+	/* Below for RF_SetBBRxParams. */
+	kal_bool 	hwAGC;
+	kal_uint8	mode;		/* 0: mode0, 1: mode1. */
+	kal_int16	gain;		/* mode0. */
+	kal_uint8	LNAmode;	/* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+	kal_uint16	pga;		/* mode1. */
+} UL1TSTCmdRxDPCh;
+
+//for list mode
+#define MAX_LM_VALID_FREQ 50
+typedef struct
+{
+   /* common parameters */
+   kal_bool   afc_dac_valid;
+   kal_uint16	afc_dac;
+   kal_uint8  loopbackType;//0: no loopback, 1: loopback type 1, 2: loopback type 2
+   kal_uint8  frame_shift;//default=0, depends on Test Machine
+   kal_uint8  rmc_type;//1: 12.2k, 2: 64k, 3: 144k, 4: 384k
+   kal_uint8  ctfc[4];//8960=0,1,2,3; cmu200=0,2,1,3
+   kal_uint8  bit_pattern;//0: single ended ber disable, 1: all one, 2: all zero
+   /* DL parameters */
+   kal_int16	dl_freq[MAX_LM_VALID_FREQ];
+   kal_int16	dl_psc;/* 0~511. */
+   kal_int16	dl_ovsf;//RMC12.2k: <128, but test set not allow all ovsf,
+	                 //RMC12.2k default ovsf=9
+   /* UL parameters */
+   kal_int16	ul_freq[MAX_LM_VALID_FREQ];
+   kal_uint16	ul_tfci;
+   kal_uint32	ul_sc_code;	/* Scrambling code #. 0 ~ 16777215 */
+   kal_bool   iq_pwr_valid;//valid dpcch, dpdch power
+   kal_uint8	dpcch_pwr;//default 8, depends on testing requirement
+   kal_uint8	dpdch_pwr;//default 15, depends on testing requirement
+
+   /* common parameters */
+   kal_uint8	valid_freq; //valid count of dl/ul freq.
+   kal_uint16   test_item[MAX_LM_VALID_FREQ]; //bit0:reserved. bit1:single end BER. bit2:RSSI measure. bit3:reserved. bit4:reserved. bit5:ILPC_ABC. bit6:ILPC_EF. bit7:ILPC_GH.	
+   /* the time settings, unit = frame */
+   kal_uint16   full_test_time;//the total time of one freq.
+   kal_uint8    ready_time; // for first sync after TX transmit
+   kal_uint8	sync_time; //the time of sync, from cs_start to LBK is 26 frame
+   kal_uint8    retrial; //just for first sync
+   kal_uint16	test_time; //the time of test for max&min TX power tests
+   kal_uint16   rx_rssi_start_time[3]; //RSSI start time for 3 LNA mode
+   kal_uint8    rx_rssi_duration[3];
+   kal_uint16   rx_ber_start_time; //BER start time
+   kal_uint8    rx_ber_duration;
+   kal_uint16	ILPC_ABC_time; //the time of ILPC ABC
+   kal_uint16	ILPC_EF_time; //the time of ILPC EF
+   kal_uint16	ILPC_GH_time; //the time of ILPC GH
+   kal_uint16	transition_time; //the limitation of UE state machine is 4 frame at least
+} UL1TSTCmdLISTMODE;
+
+typedef struct
+{
+   /* common parameters */
+   kal_bool   afc_dac_valid;
+   kal_uint16	afc_dac;
+   kal_uint8  loopbackType;//0: no loopback, 1: loopback type 1, 2: loopback type 2
+   kal_uint8  frame_shift;//default=0, depends on Test Machine
+   kal_uint8  rmc_type;//1: 12.2k, 2: 64k, 3: 144k, 4: 384k
+   kal_uint8  ctfc[4];//8960=0,1,2,3; cmu200=0,2,1,3
+   kal_uint8  bit_pattern;//0: single ended ber disable, 1: all one, 2: all zero
+   /* DL parameters */
+   kal_int16	dl_freq;
+	 kal_int16	dl_psc;/* 0~511. */
+	 kal_int16	dl_ovsf;//RMC12.2k: <128, but test set not allow all ovsf,
+	                 //RMC12.2k default ovsf=9
+	 /* UL parameters */
+   kal_int16	ul_freq;
+   kal_uint16	ul_tfci;
+	 kal_uint32	ul_sc_code;	/* Scrambling code #. 0 ~ 16777215 */
+	 kal_bool   iq_pwr_valid;//valid dpcch, dpdch power
+	 kal_uint8	dpcch_pwr;//default 8, depends on testing requirement
+	 kal_uint8	dpdch_pwr;//default 15, depends on testing requirement
+
+	 kal_uint8   subtest; // for DPA/UPA use
+} UL1TSTCmdNSFT;
+
+#define FDD_MAX_FREQ_LIST 36
+typedef struct
+{
+	kal_uint8	num_freq;
+	kal_int16	dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int16	scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int16   settings;    //  PCC  SRX/LNA Settings
+	kal_uint8   srxcfg;
+	kal_uint8	vcocfg;
+	kal_uint8   lnaport;
+	kal_uint8   temperature;
+	
+	/* Below for RF_SetBBRxParams. */
+	kal_bool 	hwAGC;
+	kal_uint8	mode;		/* 0: mode0, 1: mode1. */
+	kal_int16	gain[2];		/* mode0. */
+	kal_uint8	LNAmode[2];	/* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+	kal_uint16	pga[2];		/* mode1. */
+   kal_uint8   lpm_mode;   /* 0: normal LNA gain mode , 1: low power LNA gain mode. */
+	
+	kal_bool rssi_continue;
+} UL1TSTCmdRSSI;
+
+typedef struct
+{
+	kal_bool	pscan_before_cell_search;	/* True if UL1TST needs power scan before cell search/RSCP. */
+	kal_int16	dl_freq;	/* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+	kal_uint8	sample_num_per_cell;
+	kal_bool	read_sfn;	/* True if we need to do SFN measurement for the found cell. */
+	
+	/* Below for RF_SetBBRxParams. */
+	kal_bool 	hwAGC;
+	kal_uint8	mode;		/* 0: mode0, 1: mode1. */
+	kal_int16	gain;		/* mode0. */
+	kal_uint8	LNAmode;	/* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+	kal_uint16	pga;		/* mode1. */
+} UL1TSTCmdRSCP;
+
+typedef struct
+{
+// kal_bool	pscan_before_cell_search;      /* True if UL1TST needs power scan before cell search/RSCP. */
+   kal_int16	dl_freq;	               /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+// kal_uint8	sample_num_per_cell;
+// kal_bool	read_sfn;                      /* True if we need to do SFN measurement for the found cell. */
+	
+   kal_int16   afc_dac;
+
+   /* Below for RF_SetBBRxParams. */
+   kal_bool 	hwAGC;
+   kal_uint8	mode;		               /* 0: mode0, 1: mode1. */
+   kal_int16	gain;		               /* mode0. */
+   kal_uint8	LNAmode;	               /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+   kal_uint16	pga;                	   /* mode1. */
+} UL1TSTCmdAFC;
+
+//20081115 congo, add MQC cmd
+#define MAX_MQC_FREQ_COUNT 15    // 6293 need 14 frequency
+#define MAX_MQC_PWR_COUNT  15    // 6293 need 13 point
+#define MAX_CAL_BAND       10    // 6293 need 5  band
+#define MAX_MQC_RSSI_COUNT 200   // 6293 need 15*14=195 point
+
+typedef struct
+{
+/* Tx part settings */
+
+/* Below for UL1D_RF_Meta_SetTxInfo. */
+   kal_bool    no_loop_ctrl;
+   kal_uint16  afc_dac;
+/* Below for setPaApcDac. */
+//for 3 PA mode, 0:H, 1:M, 2:L
+//Add Tx band
+   kal_bool    pwr_det;//0 off/manual mode, 1 on/auto mode
+//kal_uint16 pwr_det_threshold;
+   kal_uint8   power_ctrl_mode;//1: HW->O3, 2: SW->59D, Smarti
+//   kal_uint8   vm1[MAX_CAL_BAND][3];      //PA param
+//   kal_uint8   vm2[MAX_CAL_BAND][3];      //PA param
+//   kal_uint16  dc2dc_dac[MAX_CAL_BAND][3];//PA param
+//   kal_uint16  vbias_dac[MAX_CAL_BAND][3];//PA param
+//   kal_bool    init_tx_onoff;             //0:off, 1:on
+//   kal_bool    ready_tx_onoff;            //0:off, 1:on
+//   kal_uint8   init_pa_mode;
+//   kal_uint8   ready_pa_mode;
+//   kal_uint16  init_pa_gain;
+//   kal_uint16  ready_pa_gain;
+//   kal_uint16  init_vga_dac_tpc_idx;
+//   kal_uint16  ready_vga_dac_tpc_idx;
+
+/* Rx part settings */
+
+/* Below for RF_SetBBRxParams. */
+// For high gain cal. @ high power: replace gain table
+   kal_uint8   temperature;
+//   kal_bool    hwAGC;         //0:SW gain mode, 1:HW AGC. AGC must on for RSSI measure. HW limit
+//   kal_int16   gain_init;     /* for HW mode */
+
+/* Mobile Quick Calibration settings */
+
+/* general settings */
+//   kal_bool    init_condition;     //0: max_pwr, 1:min_pwr
+   kal_uint8   step_duration;      //in slot
+//   kal_uint8   ready_duration;     //in slot
+   kal_uint8   retune_duration;    //in slot
+//   kal_uint8   gain_stable_time;   //in slot
+//   kal_uint16  max_vga_dac;
+//   kal_uint16  min_vga_dac;
+//   kal_uint16  jump_vga_dac;
+
+/* freq-pwr table */
+   kal_uint8   freq_count;
+   kal_uint8   pwr_count;
+   kal_uint8   freq_start_idx;
+   kal_uint8   pwr_start_idx;
+   kal_uint8   hpm_cal_point;
+   kal_uint8   lpm_cal_point;
+   
+//   kal_uint8   odd_record;        /*for Anritsu8820, only odd step (1,3,5...start from 1) is for measurement.  */
+
+//   kal_uint8   pa_gain_start_idx; // for O3 TPC
+//   kal_uint8   pd_gain_start_idx; // for O3 TPC
+
+   kal_uint8   dl_band; //1:band1, 2:band2, 3:band3, 5:band5
+   kal_uint8   ul_band; //1:band1, 2:band2, 3:band3, 5:band5
+   kal_uint16  dl_freq[MAX_MQC_FREQ_COUNT]; //in uarfcn
+   kal_uint16  ul_freq[MAX_MQC_FREQ_COUNT]; //in uarfcn
+   kal_uint8   pa_mode[MAX_MQC_PWR_COUNT];
+   kal_uint16  vga_dac_tpc_idx[MAX_MQC_PWR_COUNT];//power_ctrl_mode=HW, tpc_idx. Vice versa.
+
+   kal_uint16  pa_gain[MAX_MQC_PWR_COUNT]; // for O3 TPC
+   kal_uint8   pd_gain[MAX_MQC_FREQ_COUNT]; // for O3 TPC
+   kal_uint8   pa_section[MAX_MQC_PWR_COUNT];
+
+   kal_uint16  rx_lna_gain[MAX_MQC_PWR_COUNT];     /* PRX total RF gain .5 after 6293*/
+   kal_uint16  rxd_lna_gain[MAX_MQC_PWR_COUNT];    /* DRX total RF gain .5 after 6293*/
+
+   kal_uint8   fix_pga_gain[MAX_MQC_PWR_COUNT];    /* fix pga gain for APC calibration */
+   kal_uint8   fix_lpm[MAX_MQC_PWR_COUNT];         /* fix LPM for AGC calibration */
+   kal_uint8   rx_elna_bypass[MAX_MQC_PWR_COUNT];
+   kal_uint8   rxd_elna_bypass[MAX_MQC_PWR_COUNT];
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+
+   kal_uint8   rx_cal_sequency[MAX_MQC_PWR_COUNT];
+   kal_int16   rx_cal_dl_power[MAX_MQC_PWR_COUNT];
+//   kal_uint8   lna_gain_start_idx;
+//   kal_uint8   cal_num;
+//   kal_uint8   route_setting[3];
+} UL1TSTCmdMQC;
+
+typedef struct
+{
+   kal_uint32          lid;      // the lid is needed to update run-time value
+   kal_uint32          eg_ptr;   // the event group pointer used to notify runt-time update finish
+} UL1TSTCmdReloadNVRAM;
+
+typedef struct
+{
+    kal_uint16 measure_count;    /*<! specify the measurement count UL1D will do the measurement measure_count times */
+} UL1TSTCmdGetRfTempSensor;
+
+typedef struct 
+{
+    kal_uint16 rf_band_idx;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+}
+UL1TSTCmdSetMipiCodeWord;
+
+
+typedef union
+{
+   UL1TSTCmdTxAccess   txaccess;
+   UL1TSTCmdTxDPCh     txdpch;	//Anthony
+   UL1TSTCmdRxDPCh     rxdpch;
+   UL1TSTCmdRSSI       rssi;
+   UL1TSTCmdRSCP       rscp;	
+   UL1TSTCmdAFC        afc;    //anthony 0514
+   UL1TSTCmdMQC	       mqc;	
+   UL1TSTCmdNSFT       nsft;
+   UL1TSTCmdLISTMODE   listmode; //for list mode
+   UL1TSTCmdReloadNVRAM reload;
+   UL1TSTCmdGetRfTempSensor rfTemperature;  /*<! UL1TST_CMD_GET_RF_TEMP */
+   kal_uint8           is_PaDrift;   // PA drfit compensation switch message
+   kal_uint8           rxdMode;      /**< \brief R8 set rx path: 0:none 1:main 2:diversity: 3: both */
+   kal_int32           rx_cell_power;// configure the Rx cell power before cell search. uints:qdbm
+   kal_uint8           mipi_rf_band;
+   kal_uint8           fdd_mode_setup;   //  1 : UBIN mode Init 3G FDD ,      0 : UBIN mode de-init 3G FDD       
+   UL1TSTCmdSetMipiCodeWord setMipiPaCwParam;
+} UL1TSTCmdParam;
+
+#define  IS_META_CA_SUPPORT 0
+
+#define  IS_ARX_LPM_SUPPORT 1
+
+// For CA enum 
+
+typedef enum
+{
+	VCO_SRX_SEL_INVALID = 0,
+	VCO_SRX_SEL_SRX		= 1,	
+	VCO_SRX_SEL_VCO     = 2,
+} UL1TSTVcoSrxSel;
+
+
+typedef struct
+{
+    kal_uint8         vco_cfg;
+	kal_uint8         srx_cfg;
+	kal_uint8		  lna_port;
+	kal_uint8		  lna_group;
+} UL1TSTVcoSrxLnaCfg;
+
+typedef struct
+{
+    kal_uint8         	band;
+	kal_uint8         	padding[3];
+	UL1TSTVcoSrxLnaCfg	cfg[3];
+} UL1TSTSettingByBand;
+
+typedef struct
+{
+    kal_uint8         band;
+	kal_uint8		  cls;
+	kal_uint8		  vco_cfg;
+	kal_uint8 		  srx_cfg;	
+	kal_uint8	  	  lna_port;
+	kal_uint8         lna_group;
+} UL1TSTCaRouteDes;
+
+typedef struct
+{
+	UL1TSTCaRouteDes      cfg[2];
+} UL1TSTCaCombineDes;
+
+typedef struct
+{
+	kal_uint8          band;
+	kal_uint8          cls;
+} UL1TSTBandClass;
+
+typedef struct
+{
+   kal_uint8           cc_num;
+   kal_uint8           used_band;
+   UL1TSTBandClass	   cc_setting[2];
+} UL1TSTRxUsageDes;
+
+
+typedef struct
+{
+    kal_uint16          scenario;
+	kal_uint8			cc_rx_route_idx[2];
+	kal_uint8           cc_tx_route_idx;
+
+} UL1TSTUsageMapTable;
+
+typedef struct
+{
+   kal_uint8          band;
+   kal_uint8          index[3];
+} UL1TSTSupportCaCombTblIdx;
+
+typedef struct
+{
+   kal_uint8          band;
+   kal_uint8          route_idx;
+   kal_uint8          usg_start_idx;
+   kal_uint8          usg_stop_idx;
+} UL1TSTUsageElm;
+
+typedef struct
+{
+   UL1TSTUsageElm    sb;
+   UL1TSTUsageElm    ca[2];
+} UL1TSTSupportRxUsageByBand;
+
+typedef struct
+{
+   kal_uint16         tbl_offset;
+   kal_uint16         tbl_size;
+} UL1TSTVarTblInfo;
+
+typedef struct
+{
+	kal_uint32 							support_route_bitmap;
+	kal_uint32 							umts_vco_srx_sel;
+	UL1TSTSettingByBand                 support_vco_srx_lna_cfg[5];
+	UL1TSTVarTblInfo                    ca_comb_tbl_info;
+	UL1TSTSupportCaCombTblIdx 			support_ca_tbl_idx[5];
+	UL1TSTVarTblInfo					rx_usage_tbl_info;
+	UL1TSTSupportRxUsageByBand 			support_rx_use_by_band[5];
+} UL1TSTCaConfig;
+
+
+
+//Result
+typedef struct
+{
+	kal_bool	ok;
+	kal_uint8	num_freq;
+	kal_int16	dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int32	rssi[ FDD_MAX_FREQ_LIST ];	
+	kal_int16	scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int32	scc_rssi[ FDD_MAX_FREQ_LIST ];
+} UL1TSTResultRSSI;
+
+// R8 get both rx path RSSI result
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   num_freq;
+   kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi_rxd[ FDD_MAX_FREQ_LIST ];
+   kal_int16   scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+   kal_int32   scc_rssi[ FDD_MAX_FREQ_LIST ];
+   kal_int32   scc_rssi_rxd[ FDD_MAX_FREQ_LIST ];
+
+   kal_uint8   rx_LNAmode[FDD_MAX_FREQ_LIST];
+   kal_uint8   rxd_LNAmode[FDD_MAX_FREQ_LIST];
+} UL1TSTResultRSSIRxD;
+
+typedef struct
+{	
+	kal_uint16	psc;		/* Primary scrambling code */
+	kal_int32	tm;		/* Cell frame boundary offset to LST */
+	kal_int16	off;		/* Cell frame number offset to LST */	
+	kal_bool	sttd; 		/* True for STTD used. */
+	kal_uint8	sample_num;
+	kal_int16	rscp_sum;   //kal_uint8	rscp_sum;
+	kal_int16 freq_error;	//anthony 0514	
+} UL1TST_cpich_result_T;
+
+#define MAX_NUM_MEAS_CELL 32
+typedef struct
+{
+    kal_bool                ok;
+	kal_uint8               num_cell;
+	UL1TST_cpich_result_T   cpich_result[ MAX_NUM_MEAS_CELL ];	
+} UL1TSTResultRSCP;
+
+typedef struct
+{
+    kal_bool     ok;
+    kal_uint16   psc;       /* Primary scrambling code */
+    kal_int32    tm;		    /* Cell frame boundary offset to LST */
+    kal_bool     sttd;      /* True for STTD used. */
+    kal_uint8    rscp_sum;
+    kal_int16    freq_error;
+} UL1TSTResultAFC;
+   
+typedef struct
+{
+    kal_bool     ok;
+    kal_uint16   psc;		    /* Primary scrambling code */
+    kal_int32    tm;		    /* Cell frame boundary offset to LST */
+    kal_bool     sttd; 	        /* True for STTD used. */
+    kal_uint8    rscp_sum;
+    kal_int32    freq_error;
+} UL1TSTResultAFC_EXT;
+
+typedef struct
+{
+   kal_bool      ok;
+   kal_uint32    ber;	      /* Spec requirement=10^-3. We will count 10^5 frames(100 times spec requirement) for BER calculation. Only count for the only TRCh for DPDCh. */
+} UL1TSTResultRxDPCh;
+
+typedef struct
+{
+    kal_bool    ok;
+    kal_uint8   link_status;
+} UL1TSTResultNSFT;
+
+//#define MAX_MQC_RSSI_COUNT 400
+typedef struct
+{
+   kal_bool   ok;
+   /* freq-pwr table */
+   kal_uint8  freq_count;
+   kal_uint8  pwr_count;
+   kal_uint8  freq_start_idx;
+   kal_uint8  pwr_start_idx;
+   kal_uint8  rx_lna_mode[MAX_MQC_RSSI_COUNT]; // 0: high, 1: middle, 2: low
+   kal_int16  rssi[MAX_MQC_RSSI_COUNT];	
+   kal_uint8  rxd_lna_mode[MAX_MQC_RSSI_COUNT]; // 0: high, 1: middle, 2: low
+   kal_int16  rssi_rxd[MAX_MQC_RSSI_COUNT];
+   kal_uint16 pwr_det_value[MAX_MQC_FREQ_COUNT][3];
+   kal_int16  mqc_tx_gvgabb0_report[MAX_MQC_RSSI_COUNT];
+   /*  {pd_meas-PA_high, pd_meas-PA_mid, pd_meas-PA_low}, //freq-1
+    *  {pd_meas-PA_high, pd_meas-PA_mid, pd_meas-PA_low}, //freq-2
+    *  ...
+    *  {pd_meas-PA_high, pd_meas-PA_mid, pd_meas-PA_low}, //freq-freq_count
+    */
+} UL1TSTResultMQCOctLev;
+
+typedef struct
+{
+   kal_bool   ok;
+   /* freq-pwr table */
+   kal_uint8  freq_count;
+   kal_uint8  pwr_count;
+   kal_uint8  freq_start_idx;
+   kal_uint8  pwr_start_idx;
+   kal_int16  rssi[MAX_MQC_RSSI_COUNT];	
+   kal_uint16 pwr_det_value[MAX_MQC_FREQ_COUNT];
+   /*  {RSSI-1, RSSI-2, ... , RSSI-pwrcount}, //freq-1
+    *  {RSSI-1, RSSI-2, ... , RSSI-pwrcount}, //freq-2
+    *  ...
+    *  {RSSI-1, RSSI-2, ... , RSSI-pwrcount}, //freq-freq_count
+    *  Same for power detector.
+    */
+} UL1TSTResultMQC;
+
+//for list mode
+typedef struct
+{
+   kal_uint8 status;
+   kal_uint8 current_idx;
+   kal_int16  total_bits[MAX_LM_VALID_FREQ][2];		//0:real ber test. 1:debug before ber test
+   kal_int16  error_bits[MAX_LM_VALID_FREQ][2];
+   kal_int16  rssi[MAX_LM_VALID_FREQ][3];			//RSSI at 3 LNA mode
+   kal_int16  rssi_rxd[MAX_LM_VALID_FREQ][3];		//RSSI RXD at 3 LNA mode 
+   kal_int8  lnamode[3];
+} UL1TSTResultListMode;
+
+typedef struct
+{
+    kal_bool    ok;    /*<! ok indicator */
+    kal_uint32  sum;   /*<! the sum of measure_count times of temp sensor result */
+} UL1TSTResultGetRfTempSensor;
+
+/* DO NOT Modify the definition of UL1TSTCalibrationItem */
+typedef  struct
+{
+    kal_uint32 is_capable:1;      /*<! the indicator to indicate if this item is supported by SW or HW */
+    kal_uint32 is_mandatory:1;    /*<! the indicator to indicate if this item is mandatory to be calibrated */
+    kal_uint32 parameters:30;     /*<! parameter to be carried to tool side */
+} UL1TSTCalibrationItem;
+
+/* DO NOT Modify the member order of UL1TSTCalibrationItemSet, Items must be added to the end  */
+typedef struct
+{
+   UL1TSTCalibrationItem tadc_cal;                                      /*[ 0] TADC calibration capability */
+   UL1TSTCalibrationItem multi_rat_tadc_bitmap;                         /*[ 1] bit map of multi-rat TADC calibration */
+   UL1TSTCalibrationItem multi_rat_afc_bitmap;                          /*[ 2] bit map of multi-rat AFC calibration */
+   UL1TSTCalibrationItem mipi_pa_level_and_cw_num;                      /*[ 3] Number of MIPI PA CW */
+   UL1TSTCalibrationItem temperature_info;                              /*[ 4]  */
+   UL1TSTCalibrationItem list_mode_support;                             /*[ 5] Target support list mode API; is_capable (0: not supported, 1: supported) */
+   UL1TSTCalibrationItem thermal_sensor_type;                           /*[ 6] Target support temp sensor type; is_capable (0: not supported, 1: supported) parameter (0: internal, 1: external) */ 
+   UL1TSTCalibrationItem ubin_mode_switch_support;                      /*[ 7]  */
+   UL1TSTCalibrationItem nvram_access_interface;                        /*[ 8] Target support nvram access API by ul1tst ; is_capable (0: not supported, 1: supported) */
+   UL1TSTCalibrationItem rx_gain_lpm_support;                           /*[ 9] Target support RX low power gain mode ; is_capable (0: not supported, 1: supported) */
+   UL1TSTCalibrationItem nsft_get_RSSI;                                 /*[10] Target support get RSSI during NSFT flow ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem prf_select;                                    /*[11] Target support prf select modify ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem nsft_reset_ber_result;                         /*[12] Target support NSFT reset BER result ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem elna_addition;                                 /*[13] Target PRX support eLNA addition ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem apc_extend;                                    /*[14] Target support APC calibration extend ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem elna_addition_diversity_path;                  /*[15] Target DRX support eLNA addition ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem cancel_polling_action_when_get_fhc_result;     /*[16] Target remove polling action when get FHC result ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem wcdma_md_cal_generation;                       /*[17] Target remove polling action when get FHC result ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem wcdma_dpd;                                     /*[18] Target support WCDMA DPD ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem wcdma_iq_dump;                                 /*[19] Target support WCDMA Auto IQ dump*/
+} UL1TSTCalibrationItemSet;
+
+/* DO NOT Modify the member order of UL1TSTCalibrationItemSet, Items must be added to the end  */
+typedef struct
+{
+    kal_uint32 mipi_pa_band_support; /*<! band support bit map of MIPI PA */
+	kal_uint32 ue_capability_ext1;   /*<! 0x00000001 : support RX gain sweep */
+} UL1TSTCapabilityItemSet;
+
+//(this part is put into peer buffer)
+typedef struct
+{
+    kal_uint32 capability_item_offset; /*!< the offset value of the starting address of UL1TSTCapabilityItemSet in UL1TSTRfCapability */
+    kal_uint32 calibration_item_offset; /*!< the offset value of the starting address of UL1TSTCalibrationItemSet in UL1TSTRfCapability */
+    UL1TSTCapabilityItemSet capabilityItems;
+    UL1TSTCalibrationItemSet calibrationItems;
+} UL1TSTResultGetRfCapability;
+
+typedef struct
+{
+    kal_bool    ok;      /*<! ok indicator */
+    kal_uint32  cwNum;   /*<! the Number of MIPI PA CWt */
+} UL1TSTResultGetMipiCwNum;
+
+typedef struct 
+{
+    kal_uint8  status;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+}
+UL1TSTResultGetMipiCodeWord;
+
+typedef struct
+{
+   kal_bool ok;
+}
+UL1TSTResultSetMipiCodeWord;
+
+typedef struct
+{
+   kal_int16 status;
+   kal_int16 tadc_dac;
+   kal_int16 temperature;
+   kal_int16 temp_idx;
+}
+UL1TSTResultTemperatureInfo;
+
+typedef union
+{
+   kal_bool                ok;
+   UL1TSTResultRSSI        rssi;
+   UL1TSTResultRSSIRxD     rssi_rxd; /**< \breif R8 get both rx path RSSI */
+   UL1TSTResultRSCP        rscp;
+   UL1TSTResultRxDPCh      rx_dpch;   
+   UL1TSTResultAFC         afc;
+   UL1TSTResultAFC_EXT     afc_ext;
+   UL1TSTResultNSFT        nsft;
+   UL1TSTResultMQC         mqc;
+   UL1TSTResultMQCOctLev   mqc_octlev;
+   UL1TSTResultGetRfTempSensor rfTemperature;
+   UL1TSTResultGetMipiCwNum    mipiPaCwNum;
+   UL1TSTResultGetMipiCodeWord mipiPaGetCwData;
+   UL1TSTResultSetMipiCodeWord mipiPaSetCwData;
+   UL1TSTResultTemperatureInfo temperature_info;
+} UL1TSTResultParam;
+
+typedef struct
+{
+   //kal_uint8       ref_count; // part of LOCAL_PARA_HDR
+   //kal_uint16      msg_len;   // part of LOCAL_PARA_HDR
+   LOCAL_PARA_HDR
+   UL1TSTCmdType   type;
+   UL1TSTCmdParam  param;
+} ft_ul1tst_req_T;
+
+typedef struct
+{
+   //kal_uint8         ref_count; // part of LOCAL_PARA_HDR
+   //kal_uint16        msg_len;   // part of LOCAL_PARA_HDR
+   LOCAL_PARA_HDR
+   UL1TSTCmdType     type;
+   UL1TSTResultParam param;
+} ul1tst_ft_cnf_T;
+
+//#endif
+#endif
diff --git a/mcu/interface/middleware/meta/ul1tst_msg_gen95.h b/mcu/interface/middleware/meta/ul1tst_msg_gen95.h
new file mode 100644
index 0000000..6776bfb
--- /dev/null
+++ b/mcu/interface/middleware/meta/ul1tst_msg_gen95.h
@@ -0,0 +1,997 @@
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2005
+*
+*  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:
+ * ---------
+ * ul1tst_msg.h
+ *
+ * Project:
+ * --------
+ *   MT6268 Project
+ *
+ * Description:
+ * ------------
+ *   ul1tst_msg.h
+ *
+ * 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!
+ * 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!
+ * 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!
+ * 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 UL1TST_MSG_H
+#define UL1TST_MSG_H
+
+/*===============================================================================*/
+
+#include "kal_general_types.h"
+//#include "nvram_data_items.h"
+#include "kal_public_defs.h"
+
+#include "ft_msg_ul1rf.h"
+/*===============================================================================*/
+
+//#ifdef MT6268T
+typedef enum
+{
+   UL1TST_CMD_TXACCESS = 0   
+   ,UL1TST_CMD_TX_DPCH
+   ,UL1TST_CMD_RX_DPCH
+   ,UL1TST_CMD_RSSI
+   ,UL1TST_CMD_RSSI_RXD  /**< \breif R8 get both rx path RSSI */
+   ,UL1TST_CMD_RSSI_CONT
+   ,UL1TST_CMD_RSCP
+   ,UL1TST_CMD_AFC      //anthony 0514
+   ,UL1TST_CMD_MQC      //20081114 congo, add msg for mobile quick caliration
+   ,UL1TST_CMD_NSFT 
+   ,UL1TST_CMD_HSDPA_NSFT
+   ,UL1TST_CMD_HSUPA_NSFT
+   ,UL1TST_CMD_STOP 
+   ,UL1TST_CMD_MQC_OCTLEV
+   ,UL1TST_CMD_MQC_EXT  //rxd, gvgabb0
+   ,UL1TST_CMD_AFC_EXT  //Add msg for DCXO to do multi-bin detection (ics_mode=CFE_MODE1)
+   ,UL1TST_CMD_RELOAD_NVRAM
+   ,UL1TST_CMD_ANT_MODE     /**< \brief R8 set rx path: 0:none 1:main 2:diversity: 3: both */
+   ,UL1TST_CMD_PA_DRIFT_SWITCH  // PA drift compensation switch message
+   ,UL1TST_CMD_RX_CELL_POWER    // configure the Rx cell power before cell search
+   ,UL1TST_CMD_GET_RF_TEMP /*20*/      // Get the RF Temperature sensor reading (parameter:UL1TSTCmdGetRfTempSensor)
+   ,UL1TST_CMD_GET_RF_CAPABILITY /*21*/  // Get the RF capability (no parameter)
+   ,UL1TST_CMD_GET_MIPI_PA_CW_NUMBER /*22*/   
+   ,UL1TST_CMD_LIST_MODE	//for list mode
+   ,UL1TST_CMD_GET_RF_MIPI_CODEWORD /*24*/
+   ,UL1TST_CMD_SET_RF_MIPI_CODEWORD /*25*/
+   ,UL1TST_CMD_GET_RF_TEMP_INFO /*26*/
+   ,UL1TST_CMD_RX_GAIN_SWEEP /* 27 */
+   ,UL1TST_CMD_END
+} UL1TSTCmdType;
+
+typedef struct
+{
+    kal_uint16	 ul_uarfcn;		/* UL uarfcn range:????Read from NVRAM?? (9612 ~ 9888) */	
+    kal_uint16  dl_uarfcn;
+    kal_uint16	 dl_psc;		   /* 0~511. */
+    kal_uint8   signature;	   /* 0~15, for single signature decision. */
+    kal_uint8   pa_mode;	   /* 0: high 1: middle 2: low */
+    kal_int8    init_power;	/* Assume cpich_rscp=0, ul_interference=0. */
+    kal_uint8   power_step;   /* Preamble power ramping step. 1 ~ 8dB */	
+    kal_uint8   max_retrans;	/* 1~64 */
+    kal_uint8   asc;          /* 0~7 */
+} UL1TSTCmdTxAccess;
+
+typedef struct
+{
+   //kal_int16	dl_freq;
+   kal_int16	ul_freq;
+   kal_int16	psc;		        /* 0~511. */
+   kal_uint32	sc_code;         /* Scrambling code #. 0 ~ 16777215 */
+   kal_uint8   power_ctrl_mode;
+   kal_uint8 	pa_mode;
+   kal_uint16 	idx;
+   kal_uint16	afc_dac;
+   kal_uint8	dpcch_pwr;
+   kal_uint8	dpdch_pwr;
+	
+   /* Below for UL1D_RF_Meta_SetTxInfo. */
+   /* Below for setPaApcDac. */	
+   kal_uint8 	rf_band;
+   kal_uint8   vm1;
+   kal_uint8   vm2;
+   kal_uint16  dc2dc_dac;
+   kal_uint16  vbias_dac;
+   kal_bool    pwr_det;
+   kal_uint16 	apc_dac;
+   kal_uint16  pa_dac;		
+} UL1TSTCmdTxDPCh;	//Anthony
+
+typedef struct
+{
+	kal_int16	dl_freq;
+	kal_int16	psc;	/* 0~511. */
+	kal_uint8	ssc;	/* 0~15. */
+	kal_int16	ovsf;	/* 0~sf-1. */
+	kal_uint16	afc_dac;
+	
+	/* Below for RF_SetBBRxParams. */
+	kal_bool 	hwAGC;
+	kal_uint8	mode;		/* 0: mode0, 1: mode1. */
+	kal_int16	gain;		/* mode0. */
+	kal_uint8	LNAmode;	/* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+	kal_uint16	pga;		/* mode1. */
+} UL1TSTCmdRxDPCh;
+
+//for list mode
+#define MAX_LM_VALID_FREQ 50
+typedef struct
+{
+   /* common parameters */
+   kal_bool   afc_dac_valid;
+   kal_uint16	afc_dac;
+   kal_uint8  loopbackType;//0: no loopback, 1: loopback type 1, 2: loopback type 2
+   kal_uint8  frame_shift;//default=0, depends on Test Machine
+   kal_uint8  rmc_type;//1: 12.2k, 2: 64k, 3: 144k, 4: 384k
+   kal_uint8  ctfc[4];//8960=0,1,2,3; cmu200=0,2,1,3
+   kal_uint8  bit_pattern;//0: single ended ber disable, 1: all one, 2: all zero
+   /* DL parameters */
+   kal_int16	dl_freq[MAX_LM_VALID_FREQ];
+   kal_int16	dl_psc;/* 0~511. */
+   kal_int16	dl_ovsf;//RMC12.2k: <128, but test set not allow all ovsf,
+	                 //RMC12.2k default ovsf=9
+   /* UL parameters */
+   kal_int16	ul_freq[MAX_LM_VALID_FREQ];
+   kal_uint16	ul_tfci;
+   kal_uint32	ul_sc_code;	/* Scrambling code #. 0 ~ 16777215 */
+   kal_bool   iq_pwr_valid;//valid dpcch, dpdch power
+   kal_uint8	dpcch_pwr;//default 8, depends on testing requirement
+   kal_uint8	dpdch_pwr;//default 15, depends on testing requirement
+
+   /* common parameters */
+   kal_uint8	valid_freq; //valid count of dl/ul freq.
+   kal_uint16   test_item[MAX_LM_VALID_FREQ]; //bit0:reserved. bit1:single end BER. bit2:RSSI measure. bit3:reserved. bit4:reserved. bit5:ILPC_ABC. bit6:ILPC_EF. bit7:ILPC_GH.	
+   /* the time settings, unit = frame */
+   kal_uint16   full_test_time;//the total time of one freq.
+   kal_uint8    ready_time; // for first sync after TX transmit
+   kal_uint8	sync_time; //the time of sync, from cs_start to LBK is 26 frame
+   kal_uint8    retrial; //just for first sync
+   kal_uint16	test_time; //the time of test for max&min TX power tests
+   kal_uint16   rx_rssi_start_time[3]; //RSSI start time for 3 LNA mode
+   kal_uint8    rx_rssi_duration[3];
+   kal_uint16   rx_ber_start_time; //BER start time
+   kal_uint8    rx_ber_duration;
+   kal_uint16	ILPC_ABC_time; //the time of ILPC ABC
+   kal_uint16	ILPC_EF_time; //the time of ILPC EF
+   kal_uint16	ILPC_GH_time; //the time of ILPC GH
+   kal_uint16	transition_time; //the limitation of UE state machine is 4 frame at least
+} UL1TSTCmdLISTMODE;
+
+typedef struct
+{
+   /* common parameters */
+   kal_bool   afc_dac_valid;
+   kal_uint16	afc_dac;
+   kal_uint8  loopbackType;//0: no loopback, 1: loopback type 1, 2: loopback type 2
+   kal_uint8  frame_shift;//default=0, depends on Test Machine
+   kal_uint8  rmc_type;//1: 12.2k, 2: 64k, 3: 144k, 4: 384k
+   kal_uint8  ctfc[4];//8960=0,1,2,3; cmu200=0,2,1,3
+   kal_uint8  bit_pattern;//0: single ended ber disable, 1: all one, 2: all zero
+   /* DL parameters */
+   kal_int16	dl_freq;
+	 kal_int16	dl_psc;/* 0~511. */
+	 kal_int16	dl_ovsf;//RMC12.2k: <128, but test set not allow all ovsf,
+	                 //RMC12.2k default ovsf=9
+	 /* UL parameters */
+   kal_int16	ul_freq;
+   kal_uint16	ul_tfci;
+	 kal_uint32	ul_sc_code;	/* Scrambling code #. 0 ~ 16777215 */
+	 kal_bool   iq_pwr_valid;//valid dpcch, dpdch power
+	 kal_uint8	dpcch_pwr;//default 8, depends on testing requirement
+	 kal_uint8	dpdch_pwr;//default 15, depends on testing requirement
+
+	 kal_uint8   subtest; // for DPA/UPA use
+} UL1TSTCmdNSFT;
+
+#define FDD_MAX_FREQ_LIST 36
+typedef struct
+{
+	kal_uint8	num_freq;
+	kal_int16	dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int16	scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int16   settings;    //  PCC  SRX/LNA Settings
+	kal_uint8   srxcfg;
+	kal_uint8	vcocfg;
+	kal_uint8   lnaport;
+	kal_uint8   temperature;
+	
+	/* Below for RF_SetBBRxParams. */
+	kal_bool 	hwAGC;
+	kal_uint8	mode;		/* 0: mode0, 1: mode1. */
+	kal_int16	gain[2];		/* mode0. */
+	kal_uint8	LNAmode[2];	/* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+	kal_uint16	pga[2];		/* mode1. */
+   kal_uint8   lpm_mode;   /* 0: normal LNA gain mode , 1: low power LNA gain mode. */
+	
+	kal_bool rssi_continue;
+} UL1TSTCmdRSSI;
+
+typedef struct
+{
+	kal_bool	pscan_before_cell_search;	/* True if UL1TST needs power scan before cell search/RSCP. */
+	kal_int16	dl_freq;	/* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+	kal_uint8	sample_num_per_cell;
+	kal_bool	read_sfn;	/* True if we need to do SFN measurement for the found cell. */
+	
+	/* Below for RF_SetBBRxParams. */
+	kal_bool 	hwAGC;
+	kal_uint8	mode;		/* 0: mode0, 1: mode1. */
+	kal_int16	gain;		/* mode0. */
+	kal_uint8	LNAmode;	/* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+	kal_uint16	pga;		/* mode1. */
+} UL1TSTCmdRSCP;
+
+typedef struct
+{
+// kal_bool	pscan_before_cell_search;      /* True if UL1TST needs power scan before cell search/RSCP. */
+   kal_int16	dl_freq;	               /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+// kal_uint8	sample_num_per_cell;
+// kal_bool	read_sfn;                      /* True if we need to do SFN measurement for the found cell. */
+	
+   kal_int16   afc_dac;
+
+   /* Below for RF_SetBBRxParams. */
+   kal_bool 	hwAGC;
+   kal_uint8	mode;		               /* 0: mode0, 1: mode1. */
+   kal_int16	gain;		               /* mode0. */
+   kal_uint8	LNAmode;	               /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+   kal_uint16	pga;                	   /* mode1. */
+} UL1TSTCmdAFC;
+
+//20081115 congo, add MQC cmd
+#define MAX_MQC_FREQ_COUNT 15    // 6293 need 14 frequency
+#define MAX_MQC_PWR_COUNT  15    // 6293 need 13 point
+#define MAX_CAL_BAND       10    // 6293 need 5  band
+#define MAX_MQC_RSSI_COUNT 200   // 6293 need 15*14=195 point
+
+typedef struct
+{
+/* Tx part settings */
+
+/* Below for UL1D_RF_Meta_SetTxInfo. */
+   kal_bool    no_loop_ctrl;
+   kal_uint16  afc_dac;
+/* Below for setPaApcDac. */
+//for 3 PA mode, 0:H, 1:M, 2:L
+//Add Tx band
+   kal_bool    pwr_det;//0 off/manual mode, 1 on/auto mode
+//kal_uint16 pwr_det_threshold;
+   kal_uint8   power_ctrl_mode;//1: HW->O3, 2: SW->59D, Smarti
+//   kal_uint8   vm1[MAX_CAL_BAND][3];      //PA param
+//   kal_uint8   vm2[MAX_CAL_BAND][3];      //PA param
+//   kal_uint16  dc2dc_dac[MAX_CAL_BAND][3];//PA param
+//   kal_uint16  vbias_dac[MAX_CAL_BAND][3];//PA param
+//   kal_bool    init_tx_onoff;             //0:off, 1:on
+//   kal_bool    ready_tx_onoff;            //0:off, 1:on
+//   kal_uint8   init_pa_mode;
+//   kal_uint8   ready_pa_mode;
+//   kal_uint16  init_pa_gain;
+//   kal_uint16  ready_pa_gain;
+//   kal_uint16  init_vga_dac_tpc_idx;
+//   kal_uint16  ready_vga_dac_tpc_idx;
+
+/* Rx part settings */
+
+/* Below for RF_SetBBRxParams. */
+// For high gain cal. @ high power: replace gain table
+   kal_uint8   temperature;
+//   kal_bool    hwAGC;         //0:SW gain mode, 1:HW AGC. AGC must on for RSSI measure. HW limit
+//   kal_int16   gain_init;     /* for HW mode */
+
+/* Mobile Quick Calibration settings */
+
+/* general settings */
+//   kal_bool    init_condition;     //0: max_pwr, 1:min_pwr
+   kal_uint8   step_duration;      //in slot
+//   kal_uint8   ready_duration;     //in slot
+   kal_uint8   retune_duration;    //in slot
+//   kal_uint8   gain_stable_time;   //in slot
+//   kal_uint16  max_vga_dac;
+//   kal_uint16  min_vga_dac;
+//   kal_uint16  jump_vga_dac;
+
+/* freq-pwr table */
+   kal_uint8   freq_count;
+   kal_uint8   pwr_count;
+   kal_uint8   freq_start_idx;
+   kal_uint8   pwr_start_idx;
+   kal_uint8   hpm_cal_point;
+   kal_uint8   lpm_cal_point;
+   
+//   kal_uint8   odd_record;        /*for Anritsu8820, only odd step (1,3,5...start from 1) is for measurement.  */
+
+//   kal_uint8   pa_gain_start_idx; // for O3 TPC
+//   kal_uint8   pd_gain_start_idx; // for O3 TPC
+
+   kal_uint8   dl_band; //1:band1, 2:band2, 3:band3, 5:band5
+   kal_uint8   ul_band; //1:band1, 2:band2, 3:band3, 5:band5
+   kal_uint16  dl_freq[MAX_MQC_FREQ_COUNT]; //in uarfcn
+   kal_uint16  ul_freq[MAX_MQC_FREQ_COUNT]; //in uarfcn
+   kal_uint8   pa_mode[MAX_MQC_PWR_COUNT];
+   kal_uint16  vga_dac_tpc_idx[MAX_MQC_PWR_COUNT];//power_ctrl_mode=HW, tpc_idx. Vice versa.
+
+   kal_uint16  pa_gain[MAX_MQC_PWR_COUNT]; // for O3 TPC
+   kal_uint8   pd_gain[MAX_MQC_FREQ_COUNT]; // for O3 TPC
+   kal_uint8   pa_section[MAX_MQC_PWR_COUNT];
+
+   kal_uint16  rx_lna_gain[MAX_MQC_PWR_COUNT];     /* PRX total RF gain .5 after 6293*/
+   kal_uint16  rxd_lna_gain[MAX_MQC_PWR_COUNT];    /* DRX total RF gain .5 after 6293*/
+
+   kal_uint8   fix_pga_gain[MAX_MQC_PWR_COUNT];    /* fix pga gain for APC calibration */
+   kal_uint8   fix_lpm[MAX_MQC_PWR_COUNT];         /* fix LPM for AGC calibration */
+   kal_uint8   rx_elna_bypass[MAX_MQC_PWR_COUNT];
+   kal_uint8   rxd_elna_bypass[MAX_MQC_PWR_COUNT];
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+
+   kal_uint8   rx_cal_sequency[MAX_MQC_PWR_COUNT];
+   kal_int16   rx_cal_dl_power[MAX_MQC_PWR_COUNT];
+   kal_uint8   rx_gain_table;       //0:18dB  1:13.5dB
+   kal_uint8   rxd_gain_table;      //0:18dB  1:13.5dB
+//   kal_uint8   lna_gain_start_idx;
+//   kal_uint8   cal_num;
+//   kal_uint8   route_setting[3];
+} UL1TSTCmdMQC;
+
+#ifdef __RF_SCAN_FOR_DESENSE_TEST__
+typedef struct
+{
+   kal_uint8   src_id;
+   kal_uint8   band;
+   kal_uint16  dl_uarfcn;
+   kal_uint16  ul_uarfcn;
+   kal_bool    tx_on_flag;
+   kal_int8    tx_power;
+   kal_uint8   repeat_times;
+}UL1TSTEMMQC;
+#endif
+
+typedef struct
+{
+   kal_uint32          lid;      // the lid is needed to update run-time value
+   kal_uint32          eg_ptr;   // the event group pointer used to notify runt-time update finish
+} UL1TSTCmdReloadNVRAM;
+
+typedef struct
+{
+    kal_uint16 measure_count;    /*<! specify the measurement count UL1D will do the measurement measure_count times */
+} UL1TSTCmdGetRfTempSensor;
+
+typedef struct 
+{
+    kal_uint16 rf_band_idx;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+}
+UL1TSTCmdSetMipiCodeWord;
+
+
+typedef union
+{
+   UL1TSTCmdTxAccess   txaccess;
+   UL1TSTCmdTxDPCh     txdpch;	//Anthony
+   UL1TSTCmdRxDPCh     rxdpch;
+   UL1TSTCmdRSSI       rssi;
+   UL1TSTCmdRSCP       rscp;	
+   UL1TSTCmdAFC        afc;    //anthony 0514
+   UL1TSTCmdMQC	       mqc;	
+   UL1TSTCmdNSFT       nsft;
+   UL1TSTCmdLISTMODE   listmode; //for list mode
+   UL1TSTCmdReloadNVRAM reload;
+   UL1TSTCmdGetRfTempSensor rfTemperature;  /*<! UL1TST_CMD_GET_RF_TEMP */
+   kal_uint8           is_PaDrift;   // PA drfit compensation switch message
+   kal_uint8           rxdMode;      /**< \brief R8 set rx path: 0:none 1:main 2:diversity: 3: both */
+   kal_int32           rx_cell_power;// configure the Rx cell power before cell search. uints:qdbm
+   kal_uint8           mipi_rf_band;
+   kal_uint8           fdd_mode_setup;   //  1 : UBIN mode Init 3G FDD ,      0 : UBIN mode de-init 3G FDD       
+   UL1TSTCmdSetMipiCodeWord setMipiPaCwParam;
+} UL1TSTCmdParam;
+
+#define  IS_META_CA_SUPPORT 0
+
+#define  IS_ARX_LPM_SUPPORT 1
+
+// For CA enum 
+
+typedef enum
+{
+	VCO_SRX_SEL_INVALID = 0,
+	VCO_SRX_SEL_SRX		= 1,	
+	VCO_SRX_SEL_VCO     = 2,
+} UL1TSTVcoSrxSel;
+
+
+typedef struct
+{
+    kal_uint8         vco_cfg;
+	kal_uint8         srx_cfg;
+	kal_uint8		  lna_port;
+	kal_uint8		  lna_group;
+} UL1TSTVcoSrxLnaCfg;
+
+typedef struct
+{
+    kal_uint8         	band;
+	kal_uint8         	padding[3];
+	UL1TSTVcoSrxLnaCfg	cfg[3];
+} UL1TSTSettingByBand;
+
+typedef struct
+{
+    kal_uint8         band;
+	kal_uint8		  cls;
+	kal_uint8		  vco_cfg;
+	kal_uint8 		  srx_cfg;	
+	kal_uint8	  	  lna_port;
+	kal_uint8         lna_group;
+} UL1TSTCaRouteDes;
+
+typedef struct
+{
+	UL1TSTCaRouteDes      cfg[2];
+} UL1TSTCaCombineDes;
+
+typedef struct
+{
+	kal_uint8          band;
+	kal_uint8          cls;
+} UL1TSTBandClass;
+
+typedef struct
+{
+   kal_uint8           cc_num;
+   kal_uint8           used_band;
+   UL1TSTBandClass	   cc_setting[2];
+} UL1TSTRxUsageDes;
+
+
+typedef struct
+{
+    kal_uint16          scenario;
+	kal_uint8			cc_rx_route_idx[2];
+	kal_uint8           cc_tx_route_idx;
+
+} UL1TSTUsageMapTable;
+
+typedef struct
+{
+   kal_uint8          band;
+   kal_uint8          index[3];
+} UL1TSTSupportCaCombTblIdx;
+
+typedef struct
+{
+   kal_uint8          band;
+   kal_uint8          route_idx;
+   kal_uint8          usg_start_idx;
+   kal_uint8          usg_stop_idx;
+} UL1TSTUsageElm;
+
+typedef struct
+{
+   UL1TSTUsageElm    sb;
+   UL1TSTUsageElm    ca[2];
+} UL1TSTSupportRxUsageByBand;
+
+typedef struct
+{
+   kal_uint16         tbl_offset;
+   kal_uint16         tbl_size;
+} UL1TSTVarTblInfo;
+
+typedef struct
+{
+	kal_uint32 							support_route_bitmap;
+	kal_uint32 							umts_vco_srx_sel;
+	UL1TSTSettingByBand                 support_vco_srx_lna_cfg[5];
+	UL1TSTVarTblInfo                    ca_comb_tbl_info;
+	UL1TSTSupportCaCombTblIdx 			support_ca_tbl_idx[5];
+	UL1TSTVarTblInfo					rx_usage_tbl_info;
+	UL1TSTSupportRxUsageByBand 			support_rx_use_by_band[5];
+} UL1TSTCaConfig;
+
+
+
+//Result
+typedef struct
+{
+	kal_bool	ok;
+	kal_uint8	num_freq;
+	kal_int16	dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int32	rssi[ FDD_MAX_FREQ_LIST ];	
+	kal_int16	scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int32	scc_rssi[ FDD_MAX_FREQ_LIST ];
+} UL1TSTResultRSSI;
+
+// R8 get both rx path RSSI result
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   num_freq;
+   kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi_rxd[ FDD_MAX_FREQ_LIST ];
+   kal_int16   scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+   kal_int32   scc_rssi[ FDD_MAX_FREQ_LIST ];
+   kal_int32   scc_rssi_rxd[ FDD_MAX_FREQ_LIST ];
+
+   kal_uint8   rx_LNAmode[FDD_MAX_FREQ_LIST];
+   kal_uint8   rxd_LNAmode[FDD_MAX_FREQ_LIST];
+} UL1TSTResultRSSIRxD;
+
+typedef struct
+{	
+	kal_uint16	psc;		/* Primary scrambling code */
+	kal_int32	tm;		/* Cell frame boundary offset to LST */
+	kal_int16	off;		/* Cell frame number offset to LST */	
+	kal_bool	sttd; 		/* True for STTD used. */
+	kal_uint8	sample_num;
+	kal_int16	rscp_sum;   //kal_uint8	rscp_sum;
+	kal_int16 freq_error;	//anthony 0514	
+} UL1TST_cpich_result_T;
+
+#define UL1_MAX_NUM_MEAS_CELL 32
+typedef struct
+{
+    kal_bool                ok;
+	kal_uint8               num_cell;
+	UL1TST_cpich_result_T   cpich_result[ UL1_MAX_NUM_MEAS_CELL ];	
+} UL1TSTResultRSCP;
+
+typedef struct
+{
+    kal_bool     ok;
+    kal_uint16   psc;       /* Primary scrambling code */
+    kal_int32    tm;		    /* Cell frame boundary offset to LST */
+    kal_bool     sttd;      /* True for STTD used. */
+    kal_uint8    rscp_sum;
+    kal_int16    freq_error;
+} UL1TSTResultAFC;
+   
+typedef struct
+{
+    kal_bool     ok;
+    kal_uint16   psc;		    /* Primary scrambling code */
+    kal_int32    tm;		    /* Cell frame boundary offset to LST */
+    kal_bool     sttd; 	        /* True for STTD used. */
+    kal_uint8    rscp_sum;
+    kal_int32    freq_error;
+} UL1TSTResultAFC_EXT;
+
+typedef struct
+{
+   kal_bool      ok;
+   kal_uint32    ber;	      /* Spec requirement=10^-3. We will count 10^5 frames(100 times spec requirement) for BER calculation. Only count for the only TRCh for DPDCh. */
+} UL1TSTResultRxDPCh;
+
+typedef struct
+{
+    kal_bool    ok;
+    kal_uint8   link_status;
+} UL1TSTResultNSFT;
+
+//#define MAX_MQC_RSSI_COUNT 400
+typedef struct
+{
+   kal_bool   ok;
+   /* freq-pwr table */
+   kal_uint8  freq_count;
+   kal_uint8  pwr_count;
+   kal_uint8  freq_start_idx;
+   kal_uint8  pwr_start_idx;
+   kal_uint8  rx_lna_mode[MAX_MQC_RSSI_COUNT]; // 0: high, 1: middle, 2: low
+   kal_int16  rssi[MAX_MQC_RSSI_COUNT];	
+   kal_uint8  rxd_lna_mode[MAX_MQC_RSSI_COUNT]; // 0: high, 1: middle, 2: low
+   kal_int16  rssi_rxd[MAX_MQC_RSSI_COUNT];
+   kal_uint16 pwr_det_value[MAX_MQC_FREQ_COUNT][3];
+   kal_int16  mqc_tx_gvgabb0_report[MAX_MQC_RSSI_COUNT];
+   /*  {pd_meas-PA_high, pd_meas-PA_mid, pd_meas-PA_low}, //freq-1
+    *  {pd_meas-PA_high, pd_meas-PA_mid, pd_meas-PA_low}, //freq-2
+    *  ...
+    *  {pd_meas-PA_high, pd_meas-PA_mid, pd_meas-PA_low}, //freq-freq_count
+    */
+} UL1TSTResultMQCOctLev;
+
+typedef struct
+{
+   kal_bool   ok;
+   /* freq-pwr table */
+   kal_uint8  freq_count;
+   kal_uint8  pwr_count;
+   kal_uint8  freq_start_idx;
+   kal_uint8  pwr_start_idx;
+   kal_int16  rssi[MAX_MQC_RSSI_COUNT];	
+   kal_uint16 pwr_det_value[MAX_MQC_FREQ_COUNT];
+   /*  {RSSI-1, RSSI-2, ... , RSSI-pwrcount}, //freq-1
+    *  {RSSI-1, RSSI-2, ... , RSSI-pwrcount}, //freq-2
+    *  ...
+    *  {RSSI-1, RSSI-2, ... , RSSI-pwrcount}, //freq-freq_count
+    *  Same for power detector.
+    */
+} UL1TSTResultMQC;
+
+//for list mode
+typedef struct
+{
+   kal_uint8 status;
+   kal_uint8 current_idx;
+   kal_int16  total_bits[MAX_LM_VALID_FREQ][2];		//0:real ber test. 1:debug before ber test
+   kal_int16  error_bits[MAX_LM_VALID_FREQ][2];
+   kal_int16  rssi[MAX_LM_VALID_FREQ][3];			//RSSI at 3 LNA mode
+   kal_int16  rssi_rxd[MAX_LM_VALID_FREQ][3];		//RSSI RXD at 3 LNA mode 
+   kal_int8  lnamode[3];
+} UL1TSTResultListMode;
+
+typedef struct
+{
+    kal_bool    ok;    /*<! ok indicator */
+    kal_uint32  sum;   /*<! the sum of measure_count times of temp sensor result */
+} UL1TSTResultGetRfTempSensor;
+
+/* DO NOT Modify the definition of UL1TSTCalibrationItem */
+typedef  struct
+{
+    kal_uint32 is_capable:1;      /*<! the indicator to indicate if this item is supported by SW or HW */
+    kal_uint32 is_mandatory:1;    /*<! the indicator to indicate if this item is mandatory to be calibrated */
+    kal_uint32 parameters:30;     /*<! parameter to be carried to tool side */
+} UL1TSTCalibrationItem;
+
+/* DO NOT Modify the member order of UL1TSTCalibrationItemSet, Items must be added to the end  */
+typedef struct
+{
+   UL1TSTCalibrationItem tadc_cal;                                      /*[ 0] TADC calibration capability */
+   UL1TSTCalibrationItem multi_rat_tadc_bitmap;                         /*[ 1] bit map of multi-rat TADC calibration */
+   UL1TSTCalibrationItem multi_rat_afc_bitmap;                          /*[ 2] bit map of multi-rat AFC calibration */
+   UL1TSTCalibrationItem mipi_pa_level_and_cw_num;                      /*[ 3] Number of MIPI PA CW */
+   UL1TSTCalibrationItem temperature_info;                              /*[ 4]  */
+   UL1TSTCalibrationItem list_mode_support;                             /*[ 5] Target support list mode API; is_capable (0: not supported, 1: supported) */
+   UL1TSTCalibrationItem thermal_sensor_type;                           /*[ 6] Target support temp sensor type; is_capable (0: not supported, 1: supported) parameter (0: internal, 1: external) */ 
+   UL1TSTCalibrationItem ubin_mode_switch_support;                      /*[ 7]  */
+   UL1TSTCalibrationItem nvram_access_interface;                        /*[ 8] Target support nvram access API by ul1tst ; is_capable (0: not supported, 1: supported) */
+   UL1TSTCalibrationItem rx_gain_lpm_support;                           /*[ 9] Target support RX low power gain mode ; is_capable (0: not supported, 1: supported) */
+   UL1TSTCalibrationItem nsft_get_RSSI;                                 /*[10] Target support get RSSI during NSFT flow ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem prf_select;                                    /*[11] Target support prf select modify ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem nsft_reset_ber_result;                         /*[12] Target support NSFT reset BER result ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem elna_addition;                                 /*[13] Target PRX support eLNA addition ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem apc_extend;                                    /*[14] Target support APC calibration extend ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem elna_addition_diversity_path;                  /*[15] Target DRX support eLNA addition ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem cancel_polling_action_when_get_fhc_result;     /*[16] Target remove polling action when get FHC result ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem wcdma_md_cal_generation;                       /*[17] Target remove polling action when get FHC result ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem wcdma_dpd;                                     /*[18] Target support WCDMA DPD ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem wcdma_iq_dump;                                 /*[19] Target support WCDMA Auto IQ dump*/
+   UL1TSTCalibrationItem wcdma_afc_rscp_generation;                     /*[20] Target support WCDMA New AFC_RSCP interface*/
+   UL1TSTCalibrationItem wcdma_nsft_tx_power_offset;                    /*[21] Target support WCDMA NSFT Set/Get Tx power offset ; is_capable (0: not supported, 1: supported)*/
+} UL1TSTCalibrationItemSet;
+
+/* DO NOT Modify the member order of UL1TSTCalibrationItemSet, Items must be added to the end  */
+typedef struct
+{
+    kal_uint32 mipi_pa_band_support; /*<! band support bit map of MIPI PA */
+	kal_uint32 ue_capability_ext1;   /*<! 0x00000001 : support RX gain sweep */
+} UL1TSTCapabilityItemSet;
+
+//(this part is put into peer buffer)
+typedef struct
+{
+    kal_uint32 capability_item_offset; /*!< the offset value of the starting address of UL1TSTCapabilityItemSet in UL1TSTRfCapability */
+    kal_uint32 calibration_item_offset; /*!< the offset value of the starting address of UL1TSTCalibrationItemSet in UL1TSTRfCapability */
+    UL1TSTCapabilityItemSet capabilityItems;
+    UL1TSTCalibrationItemSet calibrationItems;
+} UL1TSTResultGetRfCapability;
+
+typedef struct
+{
+    kal_bool    ok;      /*<! ok indicator */
+    kal_uint32  cwNum;   /*<! the Number of MIPI PA CWt */
+} UL1TSTResultGetMipiCwNum;
+
+typedef struct 
+{
+    kal_uint8  status;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+}
+UL1TSTResultGetMipiCodeWord;
+
+typedef struct
+{
+   kal_bool ok;
+}
+UL1TSTResultSetMipiCodeWord;
+
+typedef struct
+{
+   kal_int16 status;
+   kal_int16 tadc_dac;
+   kal_int16 temperature;
+   kal_int16 temp_idx;
+}
+UL1TSTResultTemperatureInfo;
+
+typedef union
+{
+   kal_bool                ok;
+   UL1TSTResultRSSI        rssi;
+   UL1TSTResultRSSIRxD     rssi_rxd; /**< \breif R8 get both rx path RSSI */
+   UL1TSTResultRSCP        rscp;
+   UL1TSTResultRxDPCh      rx_dpch;   
+   UL1TSTResultAFC         afc;
+   UL1TSTResultAFC_EXT     afc_ext;
+   UL1TSTResultNSFT        nsft;
+   UL1TSTResultMQC         mqc;
+   UL1TSTResultMQCOctLev   mqc_octlev;
+   UL1TSTResultGetRfTempSensor rfTemperature;
+   UL1TSTResultGetMipiCwNum    mipiPaCwNum;
+   UL1TSTResultGetMipiCodeWord mipiPaGetCwData;
+   UL1TSTResultSetMipiCodeWord mipiPaSetCwData;
+   UL1TSTResultTemperatureInfo temperature_info;
+} UL1TSTResultParam;
+
+typedef struct
+{
+   //kal_uint8       ref_count; // part of LOCAL_PARA_HDR
+   //kal_uint16      msg_len;   // part of LOCAL_PARA_HDR
+   LOCAL_PARA_HDR
+   UL1TSTCmdType   type;
+   UL1TSTCmdParam  param;
+} ft_ul1tst_req_T;
+
+typedef struct
+{
+   //kal_uint8         ref_count; // part of LOCAL_PARA_HDR
+   //kal_uint16        msg_len;   // part of LOCAL_PARA_HDR
+   LOCAL_PARA_HDR
+   UL1TSTCmdType     type;
+   UL1TSTResultParam param;
+} ul1tst_ft_cnf_T;
+
+//#endif
+#endif
diff --git a/mcu/interface/middleware/meta/ul1tst_msg_gen97.h b/mcu/interface/middleware/meta/ul1tst_msg_gen97.h
new file mode 100644
index 0000000..401d3ee
--- /dev/null
+++ b/mcu/interface/middleware/meta/ul1tst_msg_gen97.h
@@ -0,0 +1,1008 @@
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2005
+*
+*  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:
+ * ---------
+ * ul1tst_msg.h
+ *
+ * Project:
+ * --------
+ *   MT6268 Project
+ *
+ * Description:
+ * ------------
+ *   ul1tst_msg.h
+ *
+ * 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!
+ * 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!
+ *
+ * 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!
+ * 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 UL1TST_MSG_H
+#define UL1TST_MSG_H
+
+/*===============================================================================*/
+
+#include "kal_general_types.h"
+//#include "nvram_data_items.h"
+#include "kal_public_defs.h"
+
+#include "ft_msg_ul1rf.h"
+/*===============================================================================*/
+
+//#ifdef MT6268T
+typedef enum
+{
+   UL1TST_CMD_TXACCESS = 0   
+   ,UL1TST_CMD_TX_DPCH
+   ,UL1TST_CMD_RX_DPCH
+   ,UL1TST_CMD_RSSI
+   ,UL1TST_CMD_RSSI_RXD  /**< \breif R8 get both rx path RSSI */
+   ,UL1TST_CMD_RSSI_CONT
+   ,UL1TST_CMD_RSCP
+   ,UL1TST_CMD_AFC      //anthony 0514
+   ,UL1TST_CMD_MQC      //20081114 congo, add msg for mobile quick caliration
+   ,UL1TST_CMD_NSFT 
+   ,UL1TST_CMD_HSDPA_NSFT
+   ,UL1TST_CMD_HSUPA_NSFT
+   ,UL1TST_CMD_STOP 
+   ,UL1TST_CMD_MQC_OCTLEV
+   ,UL1TST_CMD_MQC_EXT  //rxd, gvgabb0
+   ,UL1TST_CMD_AFC_EXT  //Add msg for DCXO to do multi-bin detection (ics_mode=CFE_MODE1)
+   ,UL1TST_CMD_RELOAD_NVRAM
+   ,UL1TST_CMD_ANT_MODE     /**< \brief R8 set rx path: 0:none 1:main 2:diversity: 3: both */
+   ,UL1TST_CMD_PA_DRIFT_SWITCH  // PA drift compensation switch message
+   ,UL1TST_CMD_RX_CELL_POWER    // configure the Rx cell power before cell search
+   ,UL1TST_CMD_GET_RF_TEMP /*20*/      // Get the RF Temperature sensor reading (parameter:UL1TSTCmdGetRfTempSensor)
+   ,UL1TST_CMD_GET_RF_CAPABILITY /*21*/  // Get the RF capability (no parameter)
+   ,UL1TST_CMD_GET_MIPI_PA_CW_NUMBER /*22*/   
+   ,UL1TST_CMD_LIST_MODE	//for list mode
+   ,UL1TST_CMD_GET_RF_MIPI_CODEWORD /*24*/
+   ,UL1TST_CMD_SET_RF_MIPI_CODEWORD /*25*/
+   ,UL1TST_CMD_GET_RF_TEMP_INFO /*26*/
+   ,UL1TST_CMD_RX_GAIN_SWEEP /* 27 */
+   ,UL1TST_CMD_END
+} UL1TSTCmdType;
+
+typedef struct
+{
+    kal_uint16	 ul_uarfcn;		/* UL uarfcn range:????Read from NVRAM?? (9612 ~ 9888) */	
+    kal_uint16  dl_uarfcn;
+    kal_uint16	 dl_psc;		   /* 0~511. */
+    kal_uint8   signature;	   /* 0~15, for single signature decision. */
+    kal_uint8   pa_mode;	   /* 0: high 1: middle 2: low */
+    kal_int8    init_power;	/* Assume cpich_rscp=0, ul_interference=0. */
+    kal_uint8   power_step;   /* Preamble power ramping step. 1 ~ 8dB */	
+    kal_uint8   max_retrans;	/* 1~64 */
+    kal_uint8   asc;          /* 0~7 */
+} UL1TSTCmdTxAccess;
+
+typedef struct
+{
+   //kal_int16	dl_freq;
+   kal_int16	ul_freq;
+   kal_int16	psc;		        /* 0~511. */
+   kal_uint32	sc_code;         /* Scrambling code #. 0 ~ 16777215 */
+   kal_uint8   power_ctrl_mode;
+   kal_uint8 	pa_mode;
+   kal_uint16 	idx;
+   kal_uint16	afc_dac;
+   kal_uint8	dpcch_pwr;
+   kal_uint8	dpdch_pwr;
+	
+   /* Below for UL1D_RF_Meta_SetTxInfo. */
+   /* Below for setPaApcDac. */	
+   kal_uint8 	rf_band;
+   kal_uint8   vm1;
+   kal_uint8   vm2;
+   kal_uint16  dc2dc_dac;
+   kal_uint16  vbias_dac;
+   kal_bool    pwr_det;
+   kal_uint16 	apc_dac;
+   kal_uint16  pa_dac;		
+} UL1TSTCmdTxDPCh;	//Anthony
+
+typedef struct
+{
+	kal_int16	dl_freq;
+	kal_int16	psc;	/* 0~511. */
+	kal_uint8	ssc;	/* 0~15. */
+	kal_int16	ovsf;	/* 0~sf-1. */
+	kal_uint16	afc_dac;
+	
+	/* Below for RF_SetBBRxParams. */
+	kal_bool 	hwAGC;
+	kal_uint8	mode;		/* 0: mode0, 1: mode1. */
+	kal_int16	gain;		/* mode0. */
+	kal_uint8	LNAmode;	/* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+	kal_uint16	pga;		/* mode1. */
+} UL1TSTCmdRxDPCh;
+
+//for list mode
+#define MAX_LM_VALID_FREQ 50
+typedef struct
+{
+   /* common parameters */
+   kal_bool   afc_dac_valid;
+   kal_uint16	afc_dac;
+   kal_uint8  loopbackType;//0: no loopback, 1: loopback type 1, 2: loopback type 2
+   kal_uint8  frame_shift;//default=0, depends on Test Machine
+   kal_uint8  rmc_type;//1: 12.2k, 2: 64k, 3: 144k, 4: 384k
+   kal_uint8  ctfc[4];//8960=0,1,2,3; cmu200=0,2,1,3
+   kal_uint8  bit_pattern;//0: single ended ber disable, 1: all one, 2: all zero
+   /* DL parameters */
+   kal_int16	dl_freq[MAX_LM_VALID_FREQ];
+   kal_int16	dl_psc;/* 0~511. */
+   kal_int16	dl_ovsf;//RMC12.2k: <128, but test set not allow all ovsf,
+	                 //RMC12.2k default ovsf=9
+   /* UL parameters */
+   kal_int16	ul_freq[MAX_LM_VALID_FREQ];
+   kal_uint16	ul_tfci;
+   kal_uint32	ul_sc_code;	/* Scrambling code #. 0 ~ 16777215 */
+   kal_bool   iq_pwr_valid;//valid dpcch, dpdch power
+   kal_uint8	dpcch_pwr;//default 8, depends on testing requirement
+   kal_uint8	dpdch_pwr;//default 15, depends on testing requirement
+
+   /* common parameters */
+   kal_uint8	valid_freq; //valid count of dl/ul freq.
+   kal_uint16   test_item[MAX_LM_VALID_FREQ]; //bit0:reserved. bit1:single end BER. bit2:RSSI measure. bit3:reserved. bit4:reserved. bit5:ILPC_ABC. bit6:ILPC_EF. bit7:ILPC_GH.	
+   /* the time settings, unit = frame */
+   kal_uint16   full_test_time;//the total time of one freq.
+   kal_uint8    ready_time; // for first sync after TX transmit
+   kal_uint8	sync_time; //the time of sync, from cs_start to LBK is 26 frame
+   kal_uint8    retrial; //just for first sync
+   kal_uint16	test_time; //the time of test for max&min TX power tests
+   kal_uint16   rx_rssi_start_time[3]; //RSSI start time for 3 LNA mode
+   kal_uint8    rx_rssi_duration[3];
+   kal_uint16   rx_ber_start_time; //BER start time
+   kal_uint8    rx_ber_duration;
+   kal_uint16	ILPC_ABC_time; //the time of ILPC ABC
+   kal_uint16	ILPC_EF_time; //the time of ILPC EF
+   kal_uint16	ILPC_GH_time; //the time of ILPC GH
+   kal_uint16	transition_time; //the limitation of UE state machine is 4 frame at least
+} UL1TSTCmdLISTMODE;
+
+typedef struct
+{
+   /* common parameters */
+   kal_bool   afc_dac_valid;
+   kal_uint16	afc_dac;
+   kal_uint8  loopbackType;//0: no loopback, 1: loopback type 1, 2: loopback type 2
+   kal_uint8  frame_shift;//default=0, depends on Test Machine
+   kal_uint8  rmc_type;//1: 12.2k, 2: 64k, 3: 144k, 4: 384k
+   kal_uint8  ctfc[4];//8960=0,1,2,3; cmu200=0,2,1,3
+   kal_uint8  bit_pattern;//0: single ended ber disable, 1: all one, 2: all zero
+   /* DL parameters */
+   kal_int16	dl_freq;
+	 kal_int16	dl_psc;/* 0~511. */
+	 kal_int16	dl_ovsf;//RMC12.2k: <128, but test set not allow all ovsf,
+	                 //RMC12.2k default ovsf=9
+	 /* UL parameters */
+   kal_int16	ul_freq;
+   kal_uint16	ul_tfci;
+	 kal_uint32	ul_sc_code;	/* Scrambling code #. 0 ~ 16777215 */
+	 kal_bool   iq_pwr_valid;//valid dpcch, dpdch power
+	 kal_uint8	dpcch_pwr;//default 8, depends on testing requirement
+	 kal_uint8	dpdch_pwr;//default 15, depends on testing requirement
+
+	 kal_uint8   subtest; // for DPA/UPA use
+} UL1TSTCmdNSFT;
+
+#define FDD_MAX_FREQ_LIST 36
+typedef struct
+{
+	kal_uint8	num_freq;
+	kal_int16	dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int16	scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int16   settings;    //  PCC  SRX/LNA Settings
+	kal_uint8   srxcfg;
+	kal_uint8	vcocfg;
+	kal_uint8   lnaport;
+	kal_uint8   temperature;
+	
+	/* Below for RF_SetBBRxParams. */
+	kal_bool 	hwAGC;
+	kal_uint8	mode;		/* 0: mode0, 1: mode1. */
+	kal_int16	gain[2];		/* mode0. */
+	kal_uint8	LNAmode[2];	/* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+	kal_uint16	pga[2];		/* mode1. */
+   kal_uint8   lpm_mode;   /* 0: normal LNA gain mode , 1: low power LNA gain mode. */
+	
+	kal_bool rssi_continue;
+} UL1TSTCmdRSSI;
+
+typedef struct
+{
+	kal_bool	pscan_before_cell_search;	/* True if UL1TST needs power scan before cell search/RSCP. */
+	kal_int16	dl_freq;	/* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+	kal_uint8	sample_num_per_cell;
+	kal_bool	read_sfn;	/* True if we need to do SFN measurement for the found cell. */
+	
+	/* Below for RF_SetBBRxParams. */
+	kal_bool 	hwAGC;
+	kal_uint8	mode;		/* 0: mode0, 1: mode1. */
+	kal_int16	gain;		/* mode0. */
+	kal_uint8	LNAmode;	/* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+	kal_uint16	pga;		/* mode1. */
+} UL1TSTCmdRSCP;
+
+typedef struct
+{
+// kal_bool	pscan_before_cell_search;      /* True if UL1TST needs power scan before cell search/RSCP. */
+   kal_int16	dl_freq;	               /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
+// kal_uint8	sample_num_per_cell;
+// kal_bool	read_sfn;                      /* True if we need to do SFN measurement for the found cell. */
+	
+   kal_int16   afc_dac;
+
+   /* Below for RF_SetBBRxParams. */
+   kal_bool 	hwAGC;
+   kal_uint8	mode;		               /* 0: mode0, 1: mode1. */
+   kal_int16	gain;		               /* mode0. */
+   kal_uint8	LNAmode;	               /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
+   kal_uint16	pga;                	   /* mode1. */
+} UL1TSTCmdAFC;
+
+//20081115 congo, add MQC cmd
+#define MAX_MQC_FREQ_COUNT 15    // 6297 need 14 frequency
+#define MAX_MQC_PWR_COUNT  15    // 6297 need 14 point
+#define MAX_CAL_BAND       10    // 6297 need 8  band
+#define MAX_MQC_RSSI_COUNT 200   // 6297 need 15*14=195 point
+
+typedef struct
+{
+/* Tx part settings */
+
+/* Below for UL1D_RF_Meta_SetTxInfo. */
+   kal_bool    no_loop_ctrl;
+   kal_uint16  afc_dac;
+/* Below for setPaApcDac. */
+//for 3 PA mode, 0:H, 1:M, 2:L
+//Add Tx band
+   kal_bool    pwr_det;//0 off/manual mode, 1 on/auto mode
+//kal_uint16 pwr_det_threshold;
+   kal_uint8   power_ctrl_mode;//1: HW->O3, 2: SW->59D, Smarti
+//   kal_uint8   vm1[MAX_CAL_BAND][3];      //PA param
+//   kal_uint8   vm2[MAX_CAL_BAND][3];      //PA param
+//   kal_uint16  dc2dc_dac[MAX_CAL_BAND][3];//PA param
+//   kal_uint16  vbias_dac[MAX_CAL_BAND][3];//PA param
+//   kal_bool    init_tx_onoff;             //0:off, 1:on
+//   kal_bool    ready_tx_onoff;            //0:off, 1:on
+//   kal_uint8   init_pa_mode;
+//   kal_uint8   ready_pa_mode;
+//   kal_uint16  init_pa_gain;
+//   kal_uint16  ready_pa_gain;
+//   kal_uint16  init_vga_dac_tpc_idx;
+//   kal_uint16  ready_vga_dac_tpc_idx;
+
+/* Rx part settings */
+
+/* Below for RF_SetBBRxParams. */
+// For high gain cal. @ high power: replace gain table
+   kal_uint8   temperature;
+//   kal_bool    hwAGC;         //0:SW gain mode, 1:HW AGC. AGC must on for RSSI measure. HW limit
+//   kal_int16   gain_init;     /* for HW mode */
+
+/* Mobile Quick Calibration settings */
+
+/* general settings */
+//   kal_bool    init_condition;     //0: max_pwr, 1:min_pwr
+   kal_uint8   step_duration;      //in slot
+//   kal_uint8   ready_duration;     //in slot
+   kal_uint8   retune_duration;    //in slot
+//   kal_uint8   gain_stable_time;   //in slot
+//   kal_uint16  max_vga_dac;
+//   kal_uint16  min_vga_dac;
+//   kal_uint16  jump_vga_dac;
+
+/* freq-pwr table */
+   kal_uint8   freq_count;
+   kal_uint8   pwr_count;
+   kal_uint8   freq_start_idx;
+   kal_uint8   pwr_start_idx;
+   kal_uint8   hpm_cal_point;
+   kal_uint8   lpm_cal_point;
+   kal_uint8   tkm_cal_point;
+//   kal_uint8   odd_record;        /*for Anritsu8820, only odd step (1,3,5...start from 1) is for measurement.  */
+
+//   kal_uint8   pa_gain_start_idx; // for O3 TPC
+//   kal_uint8   pd_gain_start_idx; // for O3 TPC
+
+   kal_uint8   dl_band; //1:band1, 2:band2, 3:band3, 5:band5
+   kal_uint8   ul_band; //1:band1, 2:band2, 3:band3, 5:band5
+   kal_uint16  dl_freq[MAX_MQC_FREQ_COUNT]; //in uarfcn
+   kal_uint16  ul_freq[MAX_MQC_FREQ_COUNT]; //in uarfcn
+   kal_uint8   pa_mode[MAX_MQC_PWR_COUNT];
+   kal_uint16  vga_dac_tpc_idx[MAX_MQC_PWR_COUNT];//power_ctrl_mode=HW, tpc_idx. Vice versa.
+
+   kal_uint16  pa_gain[MAX_MQC_PWR_COUNT]; // for O3 TPC
+   kal_uint8   pd_gain[MAX_MQC_FREQ_COUNT]; // for O3 TPC
+   kal_uint8   pa_section[MAX_MQC_PWR_COUNT];
+
+   kal_uint16  rx_lna_gain[MAX_MQC_PWR_COUNT];     /* PRX total RF gain .5 after 6293*/
+   kal_uint16  rxd_lna_gain[MAX_MQC_PWR_COUNT];    /* DRX total RF gain .5 after 6293*/
+
+   kal_uint8   fix_pga_gain[MAX_MQC_PWR_COUNT];    /* fix pga gain for APC calibration */
+   kal_uint8   pwr_mode[MAX_MQC_PWR_COUNT];         /* pwr mode for AGC calibration */
+   kal_uint8   rx_elna_bypass[MAX_MQC_PWR_COUNT];
+   kal_uint8   rxd_elna_bypass[MAX_MQC_PWR_COUNT];
+   kal_uint8   rx_elna_mode;
+   kal_uint8   rxd_elna_mode;
+
+   kal_uint8   rx_cal_sequency[MAX_MQC_PWR_COUNT];
+   kal_int16   rx_cal_dl_power[MAX_MQC_PWR_COUNT];
+   kal_uint8   rx_gain_table;       //0:18dB  1:13.5dB
+   kal_uint8   rxd_gain_table;      //0:18dB  1:13.5dB
+//   kal_uint8   lna_gain_start_idx;
+//   kal_uint8   cal_num;
+//   kal_uint8   route_setting[3];
+} UL1TSTCmdMQC;
+
+#ifdef __RF_SCAN_FOR_DESENSE_TEST__
+typedef struct
+{
+   kal_uint8   src_id;
+   kal_uint8   band;
+   kal_uint16  dl_uarfcn;
+   kal_uint16  ul_uarfcn;
+   kal_bool    tx_on_flag;
+   kal_int8    tx_power;
+   kal_uint8   repeat_times;
+}UL1TSTEMMQC;
+#endif
+
+typedef struct
+{
+   kal_uint32          lid;      // the lid is needed to update run-time value
+   kal_uint32          eg_ptr;   // the event group pointer used to notify runt-time update finish
+} UL1TSTCmdReloadNVRAM;
+
+typedef struct
+{
+    kal_uint16 measure_count;    /*<! specify the measurement count UL1D will do the measurement measure_count times */
+} UL1TSTCmdGetRfTempSensor;
+
+typedef struct 
+{
+    kal_uint16 rf_band_idx;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+}
+UL1TSTCmdSetMipiCodeWord;
+
+
+typedef union
+{
+   UL1TSTCmdTxAccess   txaccess;
+   UL1TSTCmdTxDPCh     txdpch;	//Anthony
+   UL1TSTCmdRxDPCh     rxdpch;
+   UL1TSTCmdRSSI       rssi;
+   UL1TSTCmdRSCP       rscp;	
+   UL1TSTCmdAFC        afc;    //anthony 0514
+   UL1TSTCmdMQC	       mqc;	
+   UL1TSTCmdNSFT       nsft;
+   UL1TSTCmdLISTMODE   listmode; //for list mode
+   UL1TSTCmdReloadNVRAM reload;
+   UL1TSTCmdGetRfTempSensor rfTemperature;  /*<! UL1TST_CMD_GET_RF_TEMP */
+   kal_uint8           is_PaDrift;   // PA drfit compensation switch message
+   kal_uint8           rxdMode;      /**< \brief R8 set rx path: 0:none 1:main 2:diversity: 3: both */
+   kal_int32           rx_cell_power;// configure the Rx cell power before cell search. uints:qdbm
+   kal_uint8           mipi_rf_band;
+   kal_uint8           fdd_mode_setup;   //  1 : UBIN mode Init 3G FDD ,      0 : UBIN mode de-init 3G FDD       
+   UL1TSTCmdSetMipiCodeWord setMipiPaCwParam;
+} UL1TSTCmdParam;
+
+#define  IS_META_CA_SUPPORT 0
+
+#define  IS_ARX_LPM_SUPPORT 1
+
+// For CA enum 
+
+typedef enum
+{
+	VCO_SRX_SEL_INVALID = 0,
+	VCO_SRX_SEL_SRX		= 1,	
+	VCO_SRX_SEL_VCO     = 2,
+} UL1TSTVcoSrxSel;
+
+
+typedef struct
+{
+    kal_uint8         vco_cfg;
+	kal_uint8         srx_cfg;
+	kal_uint8		  lna_port;
+	kal_uint8		  lna_group;
+} UL1TSTVcoSrxLnaCfg;
+
+typedef struct
+{
+    kal_uint8         	band;
+	kal_uint8         	padding[3];
+	UL1TSTVcoSrxLnaCfg	cfg[3];
+} UL1TSTSettingByBand;
+
+typedef struct
+{
+    kal_uint8         band;
+	kal_uint8		  cls;
+	kal_uint8		  vco_cfg;
+	kal_uint8 		  srx_cfg;	
+	kal_uint8	  	  lna_port;
+	kal_uint8         lna_group;
+} UL1TSTCaRouteDes;
+
+typedef struct
+{
+	UL1TSTCaRouteDes      cfg[2];
+} UL1TSTCaCombineDes;
+
+typedef struct
+{
+	kal_uint8          band;
+	kal_uint8          cls;
+} UL1TSTBandClass;
+
+typedef struct
+{
+   kal_uint8           cc_num;
+   kal_uint8           used_band;
+   UL1TSTBandClass	   cc_setting[2];
+} UL1TSTRxUsageDes;
+
+
+typedef struct
+{
+    kal_uint16          scenario;
+	kal_uint8			cc_rx_route_idx[2];
+	kal_uint8           cc_tx_route_idx;
+
+} UL1TSTUsageMapTable;
+
+typedef struct
+{
+   kal_uint8          band;
+   kal_uint8          index[3];
+} UL1TSTSupportCaCombTblIdx;
+
+typedef struct
+{
+   kal_uint8          band;
+   kal_uint8          route_idx;
+   kal_uint8          usg_start_idx;
+   kal_uint8          usg_stop_idx;
+} UL1TSTUsageElm;
+
+typedef struct
+{
+   UL1TSTUsageElm    sb;
+   UL1TSTUsageElm    ca[2];
+} UL1TSTSupportRxUsageByBand;
+
+typedef struct
+{
+   kal_uint16         tbl_offset;
+   kal_uint16         tbl_size;
+} UL1TSTVarTblInfo;
+
+typedef struct
+{
+	kal_uint32 							support_route_bitmap;
+	kal_uint32 							umts_vco_srx_sel;
+	UL1TSTSettingByBand                 support_vco_srx_lna_cfg[5];
+	UL1TSTVarTblInfo                    ca_comb_tbl_info;
+	UL1TSTSupportCaCombTblIdx 			support_ca_tbl_idx[5];
+	UL1TSTVarTblInfo					rx_usage_tbl_info;
+	UL1TSTSupportRxUsageByBand 			support_rx_use_by_band[5];
+} UL1TSTCaConfig;
+
+
+
+//Result
+typedef struct
+{
+	kal_bool	ok;
+	kal_uint8	num_freq;
+	kal_int16	dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int32	rssi[ FDD_MAX_FREQ_LIST ];	
+	kal_int16	scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+	kal_int32	scc_rssi[ FDD_MAX_FREQ_LIST ];
+} UL1TSTResultRSSI;
+
+// R8 get both rx path RSSI result
+typedef struct
+{
+   kal_bool    ok;
+   kal_uint8   num_freq;
+   kal_int16   dl_freq[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi[ FDD_MAX_FREQ_LIST ];
+   kal_int32   rssi_rxd[ FDD_MAX_FREQ_LIST ];
+   kal_int16   scc_dl_freq[ FDD_MAX_FREQ_LIST ];
+   kal_int32   scc_rssi[ FDD_MAX_FREQ_LIST ];
+   kal_int32   scc_rssi_rxd[ FDD_MAX_FREQ_LIST ];
+
+   kal_uint8   rx_LNAmode[FDD_MAX_FREQ_LIST];
+   kal_uint8   rxd_LNAmode[FDD_MAX_FREQ_LIST];
+} UL1TSTResultRSSIRxD;
+
+typedef struct
+{	
+	kal_uint16	psc;		/* Primary scrambling code */
+	kal_int32	tm;		/* Cell frame boundary offset to LST */
+	kal_int16	off;		/* Cell frame number offset to LST */	
+	kal_bool	sttd; 		/* True for STTD used. */
+	kal_uint8	sample_num;
+	kal_int16	rscp_sum;   //kal_uint8	rscp_sum;
+	kal_int16 freq_error;	//anthony 0514	
+} UL1TST_cpich_result_T;
+
+#define UL1_MAX_NUM_MEAS_CELL 32
+typedef struct
+{
+    kal_bool                ok;
+	kal_uint8               num_cell;
+	UL1TST_cpich_result_T   cpich_result[ UL1_MAX_NUM_MEAS_CELL ];	
+} UL1TSTResultRSCP;
+
+typedef struct
+{
+    kal_bool     ok;
+    kal_uint16   psc;       /* Primary scrambling code */
+    kal_int32    tm;		    /* Cell frame boundary offset to LST */
+    kal_bool     sttd;      /* True for STTD used. */
+    kal_uint8    rscp_sum;
+    kal_int16    freq_error;
+} UL1TSTResultAFC;
+   
+typedef struct
+{
+    kal_bool     ok;
+    kal_uint16   psc;		    /* Primary scrambling code */
+    kal_int32    tm;		    /* Cell frame boundary offset to LST */
+    kal_bool     sttd; 	        /* True for STTD used. */
+    kal_uint8    rscp_sum;
+    kal_int32    freq_error;
+} UL1TSTResultAFC_EXT;
+
+typedef struct
+{
+   kal_bool      ok;
+   kal_uint32    ber;	      /* Spec requirement=10^-3. We will count 10^5 frames(100 times spec requirement) for BER calculation. Only count for the only TRCh for DPDCh. */
+} UL1TSTResultRxDPCh;
+
+typedef struct
+{
+    kal_bool    ok;
+    kal_uint8   link_status;
+} UL1TSTResultNSFT;
+
+//#define MAX_MQC_RSSI_COUNT 400
+typedef struct
+{
+   kal_bool   ok;
+   /* freq-pwr table */
+   kal_uint8  freq_count;
+   kal_uint8  pwr_count;
+   kal_uint8  freq_start_idx;
+   kal_uint8  pwr_start_idx;
+   kal_uint8  rx_lna_mode[MAX_MQC_RSSI_COUNT]; // 0: high, 1: middle, 2: low
+   kal_int16  rssi[MAX_MQC_RSSI_COUNT];	
+   kal_uint8  rxd_lna_mode[MAX_MQC_RSSI_COUNT]; // 0: high, 1: middle, 2: low
+   kal_int16  rssi_rxd[MAX_MQC_RSSI_COUNT];
+   kal_uint16 pwr_det_value[MAX_MQC_FREQ_COUNT][3];
+   kal_int16  mqc_tx_gvgabb0_report[MAX_MQC_RSSI_COUNT];
+   /*  {pd_meas-PA_high, pd_meas-PA_mid, pd_meas-PA_low}, //freq-1
+    *  {pd_meas-PA_high, pd_meas-PA_mid, pd_meas-PA_low}, //freq-2
+    *  ...
+    *  {pd_meas-PA_high, pd_meas-PA_mid, pd_meas-PA_low}, //freq-freq_count
+    */
+} UL1TSTResultMQCOctLev;
+
+typedef struct
+{
+   kal_bool   ok;
+   /* freq-pwr table */
+   kal_uint8  freq_count;
+   kal_uint8  pwr_count;
+   kal_uint8  freq_start_idx;
+   kal_uint8  pwr_start_idx;
+   kal_int16  rssi[MAX_MQC_RSSI_COUNT];	
+   kal_uint16 pwr_det_value[MAX_MQC_FREQ_COUNT];
+   /*  {RSSI-1, RSSI-2, ... , RSSI-pwrcount}, //freq-1
+    *  {RSSI-1, RSSI-2, ... , RSSI-pwrcount}, //freq-2
+    *  ...
+    *  {RSSI-1, RSSI-2, ... , RSSI-pwrcount}, //freq-freq_count
+    *  Same for power detector.
+    */
+} UL1TSTResultMQC;
+
+//for list mode
+typedef struct
+{
+   kal_uint8 status;
+   kal_uint8 current_idx;
+   kal_int16  total_bits[MAX_LM_VALID_FREQ][2];		//0:real ber test. 1:debug before ber test
+   kal_int16  error_bits[MAX_LM_VALID_FREQ][2];
+   kal_int16  rssi[MAX_LM_VALID_FREQ][3];			//RSSI at 3 LNA mode
+   kal_int16  rssi_rxd[MAX_LM_VALID_FREQ][3];		//RSSI RXD at 3 LNA mode 
+   kal_int8  lnamode[3];
+} UL1TSTResultListMode;
+
+typedef struct
+{
+    kal_bool    ok;    /*<! ok indicator */
+    kal_uint32  sum;   /*<! the sum of measure_count times of temp sensor result */
+} UL1TSTResultGetRfTempSensor;
+
+/* DO NOT Modify the definition of UL1TSTCalibrationItem */
+typedef  struct
+{
+    kal_uint32 is_capable:1;      /*<! the indicator to indicate if this item is supported by SW or HW */
+    kal_uint32 is_mandatory:1;    /*<! the indicator to indicate if this item is mandatory to be calibrated */
+    kal_uint32 parameters:30;     /*<! parameter to be carried to tool side */
+} UL1TSTCalibrationItem;
+
+/* DO NOT Modify the member order of UL1TSTCalibrationItemSet, Items must be added to the end  */
+typedef struct
+{
+   UL1TSTCalibrationItem tadc_cal;                                      /*[ 0] TADC calibration capability */
+   UL1TSTCalibrationItem multi_rat_tadc_bitmap;                         /*[ 1] bit map of multi-rat TADC calibration */
+   UL1TSTCalibrationItem multi_rat_afc_bitmap;                          /*[ 2] bit map of multi-rat AFC calibration */
+   UL1TSTCalibrationItem mipi_pa_level_and_cw_num;                      /*[ 3] Number of MIPI PA CW */
+   UL1TSTCalibrationItem temperature_info;                              /*[ 4]  */
+   UL1TSTCalibrationItem list_mode_support;                             /*[ 5] Target support list mode API; is_capable (0: not supported, 1: supported) */
+   UL1TSTCalibrationItem thermal_sensor_type;                           /*[ 6] Target support temp sensor type; is_capable (0: not supported, 1: supported) parameter (0: internal, 1: external) */ 
+   UL1TSTCalibrationItem ubin_mode_switch_support;                      /*[ 7]  */
+   UL1TSTCalibrationItem nvram_access_interface;                        /*[ 8] Target support nvram access API by ul1tst ; is_capable (0: not supported, 1: supported) */
+   UL1TSTCalibrationItem rx_gain_lpm_support;                           /*[ 9] Target support RX low power gain mode ; is_capable (0: not supported, 1: supported) */
+   UL1TSTCalibrationItem nsft_get_RSSI;                                 /*[10] Target support get RSSI during NSFT flow ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem prf_select;                                    /*[11] Target support prf select modify ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem nsft_reset_ber_result;                         /*[12] Target support NSFT reset BER result ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem elna_addition;                                 /*[13] Target PRX support eLNA addition ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem apc_extend;                                    /*[14] Target support APC calibration extend ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem elna_addition_diversity_path;                  /*[15] Target DRX support eLNA addition ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem cancel_polling_action_when_get_fhc_result;     /*[16] Target remove polling action when get FHC result ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem wcdma_md_cal_generation;                       /*[17] Target remove polling action when get FHC result ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem wcdma_dpd;                                     /*[18] Target support WCDMA DPD ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem wcdma_iq_dump;                                 /*[19] Target support WCDMA Auto IQ dump*/
+   UL1TSTCalibrationItem wcdma_afc_rscp_generation;                     /*[20] Target support WCDMA New AFC_RSCP interface*/
+   UL1TSTCalibrationItem wcdma_nsft_tx_power_offset;                    /*[21] Target support WCDMA NSFT Set/Get Tx power offset ; is_capable (0: not supported, 1: supported)*/
+   UL1TSTCalibrationItem wcdma_tx_dpch_adjust;                          /*[22] Target support WCDMA TX DPCH Power adjust ; is_capable (0: not supported, 1: supported)*/
+} UL1TSTCalibrationItemSet;
+
+/* DO NOT Modify the member order of UL1TSTCalibrationItemSet, Items must be added to the end  */
+typedef struct
+{
+    kal_uint32 mipi_pa_band_support; /*<! band support bit map of MIPI PA */
+	kal_uint32 ue_capability_ext1;   /*<! 0x00000001 : support RX gain sweep */
+} UL1TSTCapabilityItemSet;
+
+//(this part is put into peer buffer)
+typedef struct
+{
+    kal_uint32 capability_item_offset; /*!< the offset value of the starting address of UL1TSTCapabilityItemSet in UL1TSTRfCapability */
+    kal_uint32 calibration_item_offset; /*!< the offset value of the starting address of UL1TSTCalibrationItemSet in UL1TSTRfCapability */
+    UL1TSTCapabilityItemSet capabilityItems;
+    UL1TSTCalibrationItemSet calibrationItems;
+} UL1TSTResultGetRfCapability;
+
+typedef struct
+{
+    kal_bool    ok;      /*<! ok indicator */
+    kal_uint32  cwNum;   /*<! the Number of MIPI PA CWt */
+} UL1TSTResultGetMipiCwNum;
+
+typedef struct 
+{
+    kal_uint8  status;
+    kal_uint16 power_level_num;
+    kal_uint16 code_word_num;
+}
+UL1TSTResultGetMipiCodeWord;
+
+typedef struct
+{
+   kal_bool ok;
+}
+UL1TSTResultSetMipiCodeWord;
+
+typedef struct
+{
+   kal_int16 status;
+   kal_int16 tadc_dac;
+   kal_int16 temperature;
+   kal_int16 temp_idx;
+}
+UL1TSTResultTemperatureInfo;
+
+typedef union
+{
+   kal_bool                ok;
+   UL1TSTResultRSSI        rssi;
+   UL1TSTResultRSSIRxD     rssi_rxd; /**< \breif R8 get both rx path RSSI */
+   UL1TSTResultRSCP        rscp;
+   UL1TSTResultRxDPCh      rx_dpch;   
+   UL1TSTResultAFC         afc;
+   UL1TSTResultAFC_EXT     afc_ext;
+   UL1TSTResultNSFT        nsft;
+   UL1TSTResultMQC         mqc;
+   UL1TSTResultMQCOctLev   mqc_octlev;
+   UL1TSTResultGetRfTempSensor rfTemperature;
+   UL1TSTResultGetMipiCwNum    mipiPaCwNum;
+   UL1TSTResultGetMipiCodeWord mipiPaGetCwData;
+   UL1TSTResultSetMipiCodeWord mipiPaSetCwData;
+   UL1TSTResultTemperatureInfo temperature_info;
+} UL1TSTResultParam;
+
+typedef struct
+{
+   //kal_uint8       ref_count; // part of LOCAL_PARA_HDR
+   //kal_uint16      msg_len;   // part of LOCAL_PARA_HDR
+   LOCAL_PARA_HDR
+   UL1TSTCmdType   type;
+   UL1TSTCmdParam  param;
+} ft_ul1tst_req_T;
+
+typedef struct
+{
+   //kal_uint8         ref_count; // part of LOCAL_PARA_HDR
+   //kal_uint16        msg_len;   // part of LOCAL_PARA_HDR
+   LOCAL_PARA_HDR
+   UL1TSTCmdType     type;
+   UL1TSTResultParam param;
+} ul1tst_ft_cnf_T;
+
+//#endif
+#endif
diff --git a/mcu/interface/middleware/meta/ul1tst_public.h b/mcu/interface/middleware/meta/ul1tst_public.h
new file mode 100644
index 0000000..38c2252
--- /dev/null
+++ b/mcu/interface/middleware/meta/ul1tst_public.h
@@ -0,0 +1,9 @@
+#if (defined __MD93__)
+#include "ul1tst_public_gen93.h"
+#elif (defined __MD95__)
+#include "ul1tst_public_gen95.h"
+#elif (defined __MD97__) || (defined __MD97P__)
+#include "ul1tst_public_gen97.h"
+#else
+#error "[ERROR] Invalid MD generation"
+#endif
diff --git a/mcu/interface/middleware/meta/ul1tst_public_gen93.h b/mcu/interface/middleware/meta/ul1tst_public_gen93.h
new file mode 100644
index 0000000..830fb1a
--- /dev/null
+++ b/mcu/interface/middleware/meta/ul1tst_public_gen93.h
@@ -0,0 +1,149 @@
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2005
+*
+*  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:
+ * ---------
+ * ul1tst_public.h
+ *
+ * Project:
+ * --------
+ *   MT6268 Project
+ *
+ * Description:
+ * ------------
+ *   ul1tst_public.h
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+ 
+ 
+#ifndef ul1tst_public_h
+#define ul1tst_public_h
+
+#ifdef __MTK_TARGET__
+#include "ul1tst_msg.h"
+#endif
+//#include "ul1_def.h"
+//#include "ul1_struct.h"
+
+/*===============================================================================*/
+
+#include "kal_general_types.h"
+
+/*===============================================================================*/
+
+//#ifdef MT6268T
+#ifdef __MTK_TARGET__
+void UL1TST_Initialization(kal_bool from_normal_task);
+#else
+void UL1TST_Initialization(kal_bool from_normal_task);
+#endif
+
+void UL1TST_Init(void);
+UL1TSTCmdType UL1TST_Get_ExecuteCmd( void );
+
+void UL1TST_Init_from_normal(void);
+void UL1TST_DispatchMessage(ilm_struct* ptrMsg, kal_bool from_normal);
+void UL1TST_Stop(void);
+
+void UL1TST_Start_ULDCH( /*kal_int16 dl_freq,*/ kal_int16 ul_freq, kal_int16 psc, kal_uint32 sc_code, kal_uint8 power_ctrl_mode, 
+	kal_uint8 pa_mode, kal_uint16 idx, kal_uint16 afc_dac, kal_uint8 dpcch_pwr, kal_uint8 dpdch_pwr, 
+	kal_uint8 rf_band, kal_uint8 vm1, kal_uint8 vm2, kal_uint16 dc2dc_dac, kal_uint16 vbias_dac, kal_uint16 apc_dac, kal_bool pwr_det );
+	
+kal_bool UL1TST_NSFT_SetILPC_Step(kal_uint8 step);
+
+#endif
diff --git a/mcu/interface/middleware/meta/ul1tst_public_gen95.h b/mcu/interface/middleware/meta/ul1tst_public_gen95.h
new file mode 100644
index 0000000..830fb1a
--- /dev/null
+++ b/mcu/interface/middleware/meta/ul1tst_public_gen95.h
@@ -0,0 +1,149 @@
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2005
+*
+*  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:
+ * ---------
+ * ul1tst_public.h
+ *
+ * Project:
+ * --------
+ *   MT6268 Project
+ *
+ * Description:
+ * ------------
+ *   ul1tst_public.h
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+ 
+ 
+#ifndef ul1tst_public_h
+#define ul1tst_public_h
+
+#ifdef __MTK_TARGET__
+#include "ul1tst_msg.h"
+#endif
+//#include "ul1_def.h"
+//#include "ul1_struct.h"
+
+/*===============================================================================*/
+
+#include "kal_general_types.h"
+
+/*===============================================================================*/
+
+//#ifdef MT6268T
+#ifdef __MTK_TARGET__
+void UL1TST_Initialization(kal_bool from_normal_task);
+#else
+void UL1TST_Initialization(kal_bool from_normal_task);
+#endif
+
+void UL1TST_Init(void);
+UL1TSTCmdType UL1TST_Get_ExecuteCmd( void );
+
+void UL1TST_Init_from_normal(void);
+void UL1TST_DispatchMessage(ilm_struct* ptrMsg, kal_bool from_normal);
+void UL1TST_Stop(void);
+
+void UL1TST_Start_ULDCH( /*kal_int16 dl_freq,*/ kal_int16 ul_freq, kal_int16 psc, kal_uint32 sc_code, kal_uint8 power_ctrl_mode, 
+	kal_uint8 pa_mode, kal_uint16 idx, kal_uint16 afc_dac, kal_uint8 dpcch_pwr, kal_uint8 dpdch_pwr, 
+	kal_uint8 rf_band, kal_uint8 vm1, kal_uint8 vm2, kal_uint16 dc2dc_dac, kal_uint16 vbias_dac, kal_uint16 apc_dac, kal_bool pwr_det );
+	
+kal_bool UL1TST_NSFT_SetILPC_Step(kal_uint8 step);
+
+#endif
diff --git a/mcu/interface/middleware/meta/ul1tst_public_gen97.h b/mcu/interface/middleware/meta/ul1tst_public_gen97.h
new file mode 100644
index 0000000..b174c4c
--- /dev/null
+++ b/mcu/interface/middleware/meta/ul1tst_public_gen97.h
@@ -0,0 +1,159 @@
+/*******************************************************************************
+*  Modification Notice:
+*  --------------------------
+*  This software is modified by MediaTek Inc. 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) 2005
+*
+*  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:
+ * ---------
+ * ul1tst_public.h
+ *
+ * Project:
+ * --------
+ *   MT6268 Project
+ *
+ * Description:
+ * ------------
+ *   ul1tst_public.h
+ *
+ * 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!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+ 
+ 
+#ifndef ul1tst_public_h
+#define ul1tst_public_h
+
+//#ifdef __MTK_TARGET__
+#include "ul1tst_msg.h"
+//#endif
+//#include "ul1_def.h"
+//#include "ul1_struct.h"
+
+/*===============================================================================*/
+
+#include "kal_general_types.h"
+
+/*===============================================================================*/
+
+//#ifdef MT6268T
+#ifdef __MTK_TARGET__
+void UL1TST_Initialization(kal_bool from_normal_task);
+#else
+void UL1TST_Initialization(kal_bool from_normal_task);
+#endif
+
+void UL1TST_Init(void);
+UL1TSTCmdType UL1TST_Get_ExecuteCmd( void );
+
+void UL1TST_Init_from_normal(void);
+void UL1TST_DispatchMessage(ilm_struct* ptrMsg, kal_bool from_normal);
+void UL1TST_Stop(void);
+
+void UL1TST_Start_ULDCH( /*kal_int16 dl_freq,*/ kal_int16 ul_freq, kal_int16 psc, kal_uint32 sc_code, kal_uint8 power_ctrl_mode, 
+	kal_uint8 pa_mode, kal_int16 prf, kal_uint16 afc_dac, kal_uint8 dpcch_pwr, kal_uint8 dpdch_pwr, 
+	kal_uint8 rf_band, kal_uint8 vm1, kal_uint8 vm2, kal_uint16 dc2dc_dac, kal_uint16 vbias_dac, kal_uint16 apc_dac, kal_bool pwr_det );
+	
+kal_bool UL1TST_NSFT_SetILPC_Step(kal_uint8 step);
+
+#endif