[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/protocol/l4_c2k/Iqmgr.h b/mcu/interface/protocol/l4_c2k/Iqmgr.h
new file mode 100644
index 0000000..6fcffa3
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/Iqmgr.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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 1999-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+/*************************************************************************
+ *
+ * File Name: iqmgr.h
+ * Project: ISOTEL C library
+ * Original Author: BJC
+ * Creation Date: Sep.8, 1997
+ *
+ * Description: Circular Queue manager interface definition.
+ *
+ * Restrictions:
+ *
+ * Dependencies:
+ *
+ ****************************************************************************
+ ****************************************************************************
+ *
+ * RCS Log Information
+ *
+ * $Log: iqmgr.h $
+ *
+ * 06 29 2017 sue.zhong
+ * [MOLY00259241] [6293][C2K]Replace with KAL data type
+ * ::KAL type - folder inc
+ * Revision 1.1 2004/01/22 10:52:15 fpeng
+ * Initial revision
+ * Revision 1.2 2002/06/06 13:52:57 chinh
+ * Changed and Added Copyright
+ * Revision 1.1 2001/04/26 11:43:13 fpeng
+ * Initial revision
+ * Revision 1.3 2000/08/28 15:07:51 hhong
+ * Moving up to Rev 1.3 by checking out 1.1.2.1 and locking 1.2.
+ * It's a duplicate version of 1.1.2.1
+ * Revision 1.1.2.1 2000/08/24 00:25:40Z hhong
+ * Add iqResetScan
+ * Revision 1.4 2000/02/05 20:25:53 bcassidy
+ * 1. Add scanning function prototypes and supporting queue descriptor elements.
+ *
+ * Revision 1.3 1998/12/01 16:28:23 scotvold
+ * The Record Size is now 16 bits.
+ * Added compile guards.
+ *
+ * Revision 1.2 1998/02/12 17:47:58 bcassidy
+ * 1. Add iqGetRef and iqDelete.
+ *
+ * Revision 1.1 1998/01/31 22:39:13 bcassidy
+ * Initial revision
+ *
+ *
+ ************************************************************************/
+
+#ifndef _IQMGR_H_
+#define _IQMGR_H_ 1
+
+typedef struct
+{
+ /* Static queue descriptors */
+ kal_uint8* q;
+ kal_uint16 numRecords;
+ kal_uint16 recordSize;
+
+ /* Dynamic queue descriptors */
+ kal_uint16 putIndex;
+ kal_uint16 getIndex;
+ kal_uint16 numInQueue;
+
+ kal_uint16 scanIndex;
+ kal_uint16 numToScan;
+} IQDesc;
+
+/* Returns KAL_FALSE if queue is full */
+kal_bool iqPut(IQDesc *qd, void *data);
+
+/* Returns the number of records enqueued */
+kal_uint16 iqBlockPut(IQDesc *qd, void *data, kal_uint16 recordsToPut);
+
+/* Returns KAL_FALSE if queue is empty */
+kal_bool iqGet(IQDesc *qd, void *data);
+
+/* Returns number of records retrieved */
+kal_uint16 iqBlockGet(IQDesc *qd, void *data, kal_uint16 recordsToGet);
+
+/* Returns a pointer to the first entry without dequing the record */
+void *iqGetRef(IQDesc *qd);
+
+/* Removes the first entry */
+kal_bool iqDelete(IQDesc *qd);
+
+/* Returns number of records currently in the queue */
+kal_uint16 iqNum(IQDesc *qd);
+
+/* Returns number of unoccupied records in the queue */
+kal_uint16 iqRoom(IQDesc *qd);
+
+void iqFlush(IQDesc *qd);
+
+void iqResetScan(IQDesc *qd, kal_uint16 start);
+
+void* iqScan(IQDesc *qd);
+
+void iqInit(IQDesc *qd, void *q, kal_uint16 numRecords, kal_uint16 recordSize);
+
+#endif /* _IQMGR_H_ */
+
diff --git a/mcu/interface/protocol/l4_c2k/atcmd_enum.h b/mcu/interface/protocol/l4_c2k/atcmd_enum.h
new file mode 100644
index 0000000..76bfc3b
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/atcmd_enum.h
@@ -0,0 +1,653 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 _ATCMD_ENUM_H
+#define _ATCMD_ENUM_H
+
+#define PDP_TYPE_STRING_LEN 10
+#define APN_STRING_LEN 100
+#define PDP_ADDR_LEN 16
+#define REMOTE_ADDRESS_AND_SUBNET_MASK_LEN 128
+#define LOCAL_PORT_RANGE_STRING_LEN 12
+#define REMOTE_PORT_RANGE_STRING_LEN 12
+#define IPSEC_SPI_STRING_LEN 9//IPSEC_SPI_STRING_LEN
+#define TOS_TRAFFIC_CLASS_AND_MASK_STRING_LEN 8
+#define FLOW_LABEL_STRING_LEN 10//FLOW_LABEL_STRING_LEN
+#define LOCAL_ADDRESS_AND_SUBNET_MASK_LEN 10//LOCAL_ADDRESS_AND_SUBNET_MASK_LEN
+#define SDU_ERROR_RATIO_STRING_LEN 4
+#define RESIDUAL_BIT_ERROR_RATIO_STRING_LEN 4
+#define L2P_STRING_LEN 10
+#define PDP_ADDR_1_LEN 65//IPV6_ADDR_LEN*4+1
+#define PDP_ADDR_2_LEN 65//IPV6_ADDR_LEN*4+1
+#define LOCAL_ADDR_AND_SUBNET_MASK_LEN 10//todo
+#define GW_ADDR_LEN 10//todo
+#define DNS_PRIM_ADDR_LEN 16
+#define DNS_SEC_ADDR_LEN 16
+#define P_CSCF_PRIM_ADDR_LEN 16
+#define P_CSCF_SEC_ADDR_LEN 16
+#ifdef __IPC_ADAPTER__
+#define USERID_STRING_LEN 101//MAX_GPRS_USER_NAME_LEN
+#define PASSWORD_STRING_LEN 101//MAX_GPRS_PASSWORD_LEN
+#else // __IPC_ADAPTER__
+#define USERID_STRING_LEN 65//MAX_GPRS_USER_NAME_LEN
+#define PASSWORD_STRING_LEN 65//MAX_GPRS_PASSWORD_LEN
+#endif // __IPC_ADAPTER__
+#define ROAMING_IP_TYPE_STRING_LEN 10//ROAMING_IP_TYPE_STRING_LEN
+#define APNNI_STRING_LEN 100//MAX_VZW_APNNI_LEN
+#define APNTYPE_STRING_LEN 10//MAX_VZW_APN_PDP_TYPE_LEN
+#define APNB_STRING_LEN 10//MAX_VZW_APN_BEARER_LEN
+#define APNED_STRING_LEN 15//AX_VZW_APN_IS_ENABLED_LEN
+#define LADN_STRING_LEN 100 //LADN_STRING_LEN
+#define IE_STRING_LEN 5//IE_STRING_LEN
+#define EGPCO_IE_CONTENTS_STRING_LEN 32//CONTENTS_STRING_LEN
+#define AT_EGPCORDP_CONTENTS_STRING_LEN 80//AT_EGPCORDP_CONTENTS_STRING_LEN (ex. 311480:[0-255]*16 = 71 digits)
+#define MAX_IE_COUNT 16//IE_STRING_LEN
+#define MAX_LADN_STRING_COUNT 17
+#define RAT_STRING_LEN 6//"LTE" or "EHRPD"
+#define MAX_PACKET_FILTER_COUNT 16
+#define S_NSSAI_SD_LEN 3//TCM_S_NSSAI_SD_LEN
+#define S_NSSAI_BUFFER_LEN 32
+#define LADN_INFO 8
+#define LADN_INFO_LEN 1712
+
+typedef enum
+{
+ CGEV_EVENT_NW_PDN_ACT,
+ CGEV_EVENT_ME_PDN_ACT,
+ CGEV_EVENT_NW_ACT,
+ CGEV_EVENT_ME_ACT,
+ CGEV_EVENT_NW_PDN_DEACT,
+ CGEV_EVENT_ME_PDN_DEACT,
+ CGEV_EVENT_NW_DEACT,
+ CGEV_EVENT_ME_DEACT,
+ CGEV_EVENT_NW_MODIFY,
+ CGEV_EVENT_ME_MODIFY,
+ CGEV_EVENT_REJECT,
+ CGEV_EVENT_NW_REACT
+} cgev_event_enum;
+
+typedef enum
+{
+ EGEV_EVENT_REVIVE_START,
+ EGEV_EVENT_REVIVE_SUCCESS,
+ EGEV_EVENT_REVIVE_FINISH,
+} egev_event_enum;
+
+
+typedef enum
+{
+ AT_TOKEN_PARSE_RESULT_OK,
+ AT_TOKEN_PARSE_RESULT_NULL_STRING,
+ AT_TOKEN_PARSE_RESULT_NOT_FOUND
+} at_token_parse_result_enum;
+
+//IPv6_AddressFormat
+typedef enum
+{
+ ATCMD_IPV6_ADDRESSFORMAT_USE_IPV4_LIKE_DOT_NOTATION__IP_ADDRESS,_AND_SUBNETWORK_MASK_IF_APPLICABLE,_ARE_DOT_SEPARATED, //Use IPv4-like dot-notation. IP address, and subnetwork mask if applicable, are dot-separated.
+ ATCMD_IPV6_ADDRESSFORMAT_USE_IPV6_LIKE_COLON_NOTATION__IP_ADDRESS,_AND_SUBNETWORK_MASK_IF_APPLICABLE_AND_WHEN_GIVEN_EXPLICITLY,_ARE_SEPARATED_BY_A_SPACE, //Use IPv6-like colon-notation. IP address, and subnetwork mask if applicable and when given explicitly, are separated by a space.
+ ATCMD_IPV6_ADDRESSFORMAT_MAX
+} atcmd_IPv6_AddressFormat_enum;
+
+//IPv6_SubnetNotation
+typedef enum
+{
+ ATCMD_IPV6_SUBNETNOTATION_BOTH_IP_ADDRESS_AND_SUBNET_MASK_ARE_STATED_EXPLICITLY,_SEPARATED_BY_A_SPACE, //Both IP Address and subnet mask are stated explicitly, separated by a space.
+ ATCMD_IPV6_SUBNETNOTATION_THE_PRINTOUT_FORMAT_IS_APPLYING, //The printout format is applying / (forward slash) subnet-prefix Classless Inter-Domain Routing (CIDR) notation.
+ ATCMD_IPV6_SUBNETNOTATION_MAX
+} atcmd_IPv6_SubnetNotation_enum;
+
+//IPv6_LeadingZeros
+typedef enum
+{
+ ATCMD_IPV6_LEADINGZEROS_LEADING_ZEROS_ARE_OMITTED, //Leading zeros are omitted.
+ ATCMD_IPV6_LEADINGZEROS_LEADING_ZEROS_ARE_INCLUDED, //Leading zeros are included.
+ ATCMD_IPV6_LEADINGZEROS_MAX
+} atcmd_IPv6_LeadingZeros_enum;
+
+//IPv6_CompressZeros
+typedef enum
+{
+ ATCMD_IPV6_COMPRESSZEROS_NO_ZERO_COMPRESSION, //No zero compression.
+ ATCMD_IPV6_COMPRESSZEROS_USE_ZERO_COMPRESSION, //Use zero compression.
+ ATCMD_IPV6_COMPRESSZEROS__IMS_SINGLE_RADIO_VOICE_CALL_CONTINUITY, // IMS single radio voice call continuity +CISRVCC
+ ATCMD_IPV6_COMPRESSZEROS_MAX
+} atcmd_IPv6_CompressZeros_enum;
+
+//d_comp
+typedef enum
+{
+ ATCMD_D_COMP_OFF, //off
+ ATCMD_D_COMP_ON, //on (manufacturer preferred compression)
+ ATCMD_D_COMP_V_42BIS, //V.42bis
+ ATCMD_D_COMP_V_44, //V.44
+ ATCMD_D_COMP_MAX
+} atcmd_d_comp_enum;
+
+//h_comp
+typedef enum
+{
+ ATCMD_H_COMP_OFF, //off
+ ATCMD_H_COMP_ON, //on (manufacturer preferred compression)
+ ATCMD_H_COMP_RFC_1144, //RFC 1144 [105] (applicable for SNDCP only)
+ ATCMD_H_COMP_RFC_2507, //RFC 2507 [107]
+ ATCMD_H_COMP_RFC_3095, //RFC 3095 [108] (applicable for PDCP only)
+ ATCMD_H_COMP_MAX
+} atcmd_h_comp_enum;
+
+//IPv4AddrAlloc
+typedef enum
+{
+ ATCMD_IPV4ADDRALLOC_THROUGH_NAS_SIGNALLING, //IPv4 address allocation through NAS signalling
+ ATCMD_IPV4ADDRALLOC_THROUGH_DHCP, //IPv4 address allocated through DHCP
+ ATCMD_IPV4ADDRALLOC_MAX
+} atcmd_IPv4AddrAlloc_enum;
+
+//request_type
+typedef enum
+{
+ ATCMD_REQUEST_TYPE_INITIAL_OR_HANDOVER, //PDP context is for new PDP context establishment or for handover from a non-3GPP access network (how the MT decides whether the PDP context is for new PDP context establishment or for handover is implementation specific)
+ ATCMD_REQUEST_TYPE_EMERGENCY, //PDP context is for emergency bearer services
+ ATCMD_REQUEST_TYPE_INITIAL, //PDP context is for new PDP context establishment
+ ATCMD_REQUEST_TYPE_HANDOVER, //PDP context is for handover from a non-3GPP access network
+ ATCMD_REQUEST_TYPE_HANDOVER_OF_EMERGENCY, //PDP context is for handover of emergency bearer services from a non-3GPP access network
+ ATCMD_REQUEST_TYPE_MAX
+} atcmd_request_type_enum;
+
+//P-CSCF_discovery
+typedef enum
+{
+ ATCMD_P_CSCF_DISCOVERY_PREFERENCE_NOT_INFLUENCED, //Preference of P-CSCF address discovery not influenced by +CGDCONT
+ ATCMD_P_CSCF_DISCOVERY_PREFERENCE_THROUGH_NAS_SIGNALLING, //Preference of P-CSCF address discovery through NAS signalling
+ ATCMD_P_CSCF_DISCOVERY_PREFERENCE_THROUGH_DHCP, //Preference of P-CSCF address discovery through DHCP
+ ATCMD_P_CSCF_DISCOVERY_MAX
+} atcmd_P_CSCF_discovery_enum;
+
+//IM_CN_Signalling_Flag_Ind
+typedef enum
+{
+ ATCMD_IM_CN_SIGNALLING_FLAG_IND_PDN_IS_NOT_FOR_IMS_SIGNALLING_ONLY, //UE indicates that the PDP context is not for IM CN subsystem-related signalling only
+ ATCMD_IM_CN_SIGNALLING_FLAG_IND_PDN_IS_FOR_IMS_SIGNALLING_ONLY, //UE indicates that the PDP context is for IM CN subsystem-related signalling only
+ ATCMD_IM_CN_SIGNALLING_FLAG_IND_MAX
+} atcmd_IM_CN_Signalling_Flag_Ind_enum;
+
+//NSLPI
+typedef enum
+{
+ ATCMD_NSLPI_CONFIGURED_FOR_NAS_SIGNALLING_LOW_PRIORITY, //indicates that this PDP context is to be activated with the value for the low priority indicator configured in the MT.
+ ATCMD_NSLPI_NOT_CONFIGURED_FOR_NAS_SIGNALLING_LOW_PRIORITY, //indicates that this PDP context is is to be activated with the value for the low priority indicator set to "MS is not configured for NAS signalling low priority".
+ ATCMD_NSLPI_MAX
+} atcmd_NSLPI_enum;
+
+//securePCO
+typedef enum
+{
+ ATCMD_SECUREPCO_IS_NOT_REQUESTED, //Security protected transmission of PCO is not requested
+ ATCMD_SECUREPCO_IS_REQUESTED, //Security protected transmission of PCO is requested
+ ATCMD_SECUREPCO_MAX
+} atcmd_securePCO_enum;
+
+//IPv4_MTU_discovery
+typedef enum
+{
+ ATCMD_IPV4_MTU_DISCOVERY_PREFERENCE_NOT_INFLUENCED, //Preference of IPv4 MTU size discovery not influenced by +CGDCONT
+ ATCMD_IPV4_MTU_DISCOVERY_PREFERENCE_THROUGH_NAS_SIGNALLING, //Preference of IPv4 MTU size discovery through NAS signalling
+ ATCMD_IPV4_MTU_DISCOVERY_MAX
+} atcmd_IPv4_MTU_discovery_enum;
+
+//Local_Addr_Ind
+typedef enum
+{
+ ATCMD_LOCAL_ADDR_IND_NOT_SUPPORT_LOCAL_IP_ADDRESS_IN_TFTS, //indicates that the MS does not support local IP address in TFTs
+ ATCMD_LOCAL_ADDR_IND_SUPPORT_LOCAL_IP_ADDRESS_IN_TFTS, //indicates that the MS supports local IP address in TFTs
+ ATCMD_LOCAL_ADDR_IND_MAX
+} atcmd_Local_Addr_Ind_enum;
+
+//Non_IP_MTU_discovery
+typedef enum
+{
+ ATCMD_NON_IP_MTU_DISCOVERY_PREFERENCE_NOT_INFLUENCED, //Preference of Non-IP MTU size discovery not influenced by +CGDCONT
+ ATCMD_NON_IP_MTU_DISCOVERY_PREFERENCE_THROUGH_NAS_SIGNALLING, //Preference of Non-IP MTU size discovery through NAS signalling
+ ATCMD_NON_IP_MTU_DISCOVERY_MAX
+} atcmd_Non_IP_MTU_discovery_enum;
+
+//Reliable_Data_Service
+typedef enum
+{
+ ATCMD_RELIABLE_DATA_SERVICE_NOT_USED, //Reliable Data Service is not being used for the PDN connection
+ ATCMD_RELIABLE_DATA_SERVICE_IS_USED, //Reliable Data Service is being used for the PDN connection
+ ATCMD_RELIABLE_DATA_SERVICE_MAX
+} atcmd_Reliable_Data_Service_enum;
+
+//SSC_mode
+typedef enum
+{
+ ATCMD_SSC_MODE_ASSOCIATED_WITH_SSC_MODE_1, //indicates that the PDU session is associated with SSC mode 1
+ ATCMD_SSC_MODE_ASSOCIATED_WITH_SSC_MODE_2, //indicates that the PDU session is associated with SSC mode 2
+ ATCMD_SSC_MODE_ASSOCIATED_WITH_SSC_MODE_3, //indicates that the PDU session is associated with SSC mode 3
+ ATCMD_SSC_MODE_MAX
+} atcmd_SSC_mode_enum;
+
+//Access_type
+typedef enum
+{
+ ATCMD_ACCESS_TYPE_PREFERRED_3GPP_ACCESS, //indicates that the preferred access type is 3GPP access
+ ATCMD_ACCESS_TYPE_PREFERRED_NON_3GPP_ACCESS, //indicates that the preferred access type is non-3GPP access
+ ATCMD_ACCESS_TYPE_MAX
+} atcmd_Access_type_enum;
+
+//RQoS_Ind
+typedef enum
+{
+ ATCMD_RQOS_IS_NOT_SUPPORTED, //indicates that reflective QoS is not supported for the PDU session
+ ATCMD_RQOS_IS_SUPPORTED, //indicates that reflective QoS is supported for the PDU session
+ ATCMD_RQOS_IND_MAX
+} atcmd_RQoS_Ind_enum;
+
+//MH6_PDU
+typedef enum
+{
+ ATCMD_IPV6_MH_IS_NOT_SUPPORTED, //indicates that IPv6 multi-homing is not supported for the PDU session
+ ATCMD_IPV6_MH_IS_SUPPORTED, //indicates that IPv6 multi-homing is supported for the PDU session
+ ATCMD_IPV6_MH_MAX
+} atcmd_MH6_PDU_enum;
+
+
+//Always on
+typedef enum
+{
+ ATCMD_ALWAYS_ON_PDU_SESSION_IS_NOT_REQUEST,
+ ATCMD_ALWAYS_ON_PDU_SESSION_IS_REQUEST,
+ ATCMD_ALWAYS_ON_MAX
+} atcmd_Always_on_enum;
+
+//direction
+typedef enum
+{
+ ATCMD_DIRECTION_PRE_RELEASE_7_TFT_FILTER, //Pre-Release 7 TFT filter (see 3GPP TS 24.008 [8], table 10.5.162)
+ ATCMD_DIRECTION_UPLINK, //Uplink
+ ATCMD_DIRECTION_DOWNLINK, //Downlink
+ ATCMD_DIRECTION_BIRECTIONAL, //Birectional (Up & Downlink)
+ ATCMD_DIRECTION_MAX
+} atcmd_direction_enum;
+
+//Traffic class
+typedef enum
+{
+ ATCMD_TRAFFIC_CLASS_CONVERSATIONAL, //conversational
+ ATCMD_TRAFFIC_CLASS_STREAMING, //streaming
+ ATCMD_TRAFFIC_CLASS_INTERACTIVE, //interactive
+ ATCMD_TRAFFIC_CLASS_BACKGROUND, //background
+ ATCMD_TRAFFIC_CLASS_SUBSCRIBED_VALUE, //subscribed value
+ ATCMD_TRAFFIC_CLASS_MAX
+} atcmd_Traffic_class_enum;
+
+//Delivery order
+typedef enum
+{
+ ATCMD_DELIVERY_ORDER_NO, //no
+ ATCMD_DELIVERY_ORDER_YES, //yes
+ ATCMD_DELIVERY_ORDER_SUBSCRIBED_VALUE, //subscribed value
+ ATCMD_DELIVERY_ORDER_MAX
+} atcmd_Delivery_order_enum;
+
+//Delivery of erroneous SDUs
+typedef enum
+{
+ ATCMD_DELIVERY_OF_ERRONEOUS_SDUS_NO, //no
+ ATCMD_DELIVERY_OF_ERRONEOUS_SDUS_YES, //yes
+ ATCMD_DELIVERY_OF_ERRONEOUS_SDUS_NO_DETECT, //no detect
+ ATCMD_DELIVERY_OF_ERRONEOUS_SDUS_SUBSCRIBED_VALUE, //subscribed value
+ ATCMD_DELIVERY_OF_ERRONEOUS_SDUS_MAX
+} atcmd_Delivery_of_erroneous_SDUs_enum;
+
+//Source statistics descriptor
+typedef enum
+{
+ ATCMD_SOURCE_STATISTICS_DESCRIPTOR_CHARACTERISTICS_OF_SDUS_IS_UNKNOWN, //Characteristics of SDUs is unknown
+ ATCMD_SOURCE_STATISTICS_DESCRIPTOR_CHARACTERISTICS_OF_SDUS_CORRESPONDS_TO_A_SPEECH_SOURCE, //Characteristics of SDUs corresponds to a speech source
+ ATCMD_SOURCE_STATISTICS_DESCRIPTOR_MAX
+} atcmd_Source_statistics_descriptor_enum;
+
+//Signalling indication
+typedef enum
+{
+ ATCMD_SIGNALLING_INDICATION_PDP_CONTEXT_IS_NOT_OPTIMIZED_FOR_SIGNALLING, //PDP context is not optimized for signalling
+ ATCMD_SIGNALLING_INDICATION_PDP_CONTEXT_IS_OPTIMIZED_FOR_SIGNALLING, //PDP context is optimized for signalling<PDP_type> (see +CGDCONT and +CGDSCONT commands).
+ ATCMD_SIGNALLING_INDICATION_MAX
+} atcmd_Signalling_indication_enum;
+
+//state
+typedef enum
+{
+ ATCMD_STATE_DEACTIVATED, //deactivated
+ ATCMD_STATE_ACTIVATED, //activated
+ ATCMD_STATE_MAX
+} atcmd_state_enum;
+
+//n
+typedef enum
+{
+ ATCMD_CGAUTO_N_TURN_OFF_AUTOMATIC_RESPONSE_FOR_PACKET_DOMAIN_ONLY, //turn off automatic response for Packet Domain only
+ ATCMD_CGAUTO_N_TURN_ON_AUTOMATIC_RESPONSE_FOR_PACKET_DOMAIN_ONLY, //turn on automatic response for Packet Domain only
+ ATCMD_CGAUTO_N_MODEM_COMPATIBILITY_MODE_PACKET_DOMAIN_ONLY, //modem compatibility mode, Packet Domain only
+ ATCMD_CGAUTO_N_MODEM_COMPATIBILITY_MODE_PACKET_DOMAIN_AND_CIRCUIT_SWITCHED_CALLS, //modem compatibility mode, Packet Domain and circuit switched calls
+ ATCMD_CGAUTO_N_TURN_ON_AUTOMATIC_NEGATIVE_RESPONSE_FOR_PACKET_DOMAIN_ONLY, //turn on automatic negative response for Packet Domain only
+ ATCMD_CGAUTO_N_MAX
+} atcmd_cgauto_n_enum;
+
+//response
+typedef enum
+{
+ ATCMD_RESPONSE_REJECT_THE_REQUEST, //reject the request
+ ATCMD_RESPONSE_ACCEPT_AND_REQUEST_THAT_THE_PDP_CONTEXT_BE_ACTIVATED, //accept and request that the PDP context be activated
+ ATCMD_RESPONSE_MAX
+} atcmd_response_enum;
+
+//mode
+typedef enum
+{
+ ATCMD_CGEREP_MODE_BUFFER_URC_IN_MT_AND_NO_CODES_FORWARD_TO_TE, //buffer unsolicited result codes in the MT; if MT result code buffer is full, the oldest ones can be discarded. No codes are forwarded to the TE.
+ ATCMD_CGEREP_MODE_DISCARD_URC_WHEN_LINK_IS_RESERVED_OTHERWISE_FORWARD_TO_TE, //discard unsolicited result codes when MT-TE link is reserved (e.g. in on-line data mode); otherwise forward them directly to the TE
+ ATCMD_CGEREP_MODE_BUFFER_URC_IN_MT_WHEN_LINK_IS_RESERVED_AND_FLUSH_TO_TE_WHEN_AVAILABLE_OTHERWISE_FORWARD_TO_TE, //buffer unsolicited result codes in the MT when MT-TE link is reserved (e.g. in on-line data mode) and flush them to the TE when MT-TE link becomes available; otherwise forward them directly to the TE
+ ATCMD_CGEREP_MODE_MAX
+} atcmd_cgerep_mode_enum;
+
+//bfr
+typedef enum
+{
+ ATCMD_BFR_MT_BUFFER_URC_IS_CLEARED_WHEN_MODE_1_OR_2_IS_ENTERED, //MT buffer of unsolicited result codes defined within this command is cleared when <mode> 1 or 2 is entered
+ ATCMD_BFR_MT_BUFFER_URC_IS_FLUSHED_TO_TE_WHEN_MODE_1_OR_2_IS_ENTERED, //MT buffer of unsolicited result codes defined within this command is flushed to the TE when <mode> 1 or 2 is entered (OK response shall be given before flushing the codes)
+ ATCMD_BFR_MAX
+} atcmd_bfr_enum;
+
+//WLAN_Offload
+typedef enum
+{
+ ATCMD_WLAN_OFFLOAD_IN_S1_MODE_OR_IN_IU_MODE_IS_NOT_ACCEPTABLE, //offloading the traffic of the PDN connection via a WLAN when in S1 mode or when in Iu mode is not acceptable.
+ ATCMD_WLAN_OFFLOAD_IN_S1_MODE_IS_ACCEPTABLE_BUT_NOT_IN_IU_MODE, //offloading the traffic of the PDN connection via a WLAN when in S1 mode is acceptable, but not acceptable in Iu mode.
+ ATCMD_WLAN_OFFLOAD_IN_IU_MODE_IS_ACCEPTABLE_BUT_NOT_IN_S1_MODE, //offloading the traffic of the PDN connection via a WLAN when in Iu mode is acceptable, but not acceptable in S1 mode.
+ ATCMD_WLAN_OFFLOAD_IN_S1_MODE_OR_IN_IU_MODE_IS_ACCEPTABLE, //offloading the traffic of the PDN connection via a WLAN when in S1 mode or when in Iu mode is acceptable.
+ ATCMD_WLAN_OFFLOAD_MAX
+} atcmd_WLAN_Offload_enum;
+
+//reason
+typedef enum
+{
+ ATCMD_REASON_IPV4_ONLY_ALLOWED, //IPv4 only allowed
+ ATCMD_REASON_IPV6_ONLY_ALLOWED, //IPv6 only allowed
+ ATCMD_REASON_SINGLE_ADDRESS_BEARERS_ONLY_ALLOWED, //single address bearers only allowed.
+ ATCMD_REASON_SINGLE_ADDRESS_BEARERS_ONLY_ALLOWED_BUT_SECOND_ADDRESS_TYPE_ACTIVATION_WAS_FAIL, //single address bearers only allowed and MT initiated context activation for a second address type bearer was not successful.
+ ATCMD_REASON_MAX
+} atcmd_reason_enum;
+
+//event_type
+typedef enum
+{
+ ATCMD_EVENT_TYPE_INFORMATIONAL_EVENT, //Informational event
+ ATCMD_EVENT_TYPE_INFORMATION_REQUEST, //Information request: Acknowledgement required. The acknowledgement can be accept or reject, see +CGANS.
+ ATCMD_EVENT_TYPE_MAX
+} atcmd_event_type_enum;
+
+//change_reason
+typedef enum
+{
+ ATCMD_CHANGE_REASON_TFT_CHANGED, //TFT changed
+ ATCMD_CHANGE_REASON_QOS_CHANGED, //Qos changed
+ ATCMD_CHANGE_REASON_WLAN_OFFLOAD_CHANGED, //WLAN Offload changed
+ ATCMD_CHANGE_REASON_MAX
+} atcmd_change_reason_enum;
+
+//IM_CN_Signalling_Flag
+typedef enum
+{
+ ATCMD_IM_CN_SIGNALLING_FLAG_PDN_IS_NOT_FOR_IMS_RELATED_SIGNALLING_ONLY, //PDP context is not for IM CN subsystem-related signalling only
+ ATCMD_IM_CN_SIGNALLING_FLAG_PDN_IS_FOR_IMS_RELATED_SIGNALLING_ONLY, //PDP context is for IM CN subsystem-related signalling only
+ ATCMD_IM_CN_SIGNALLING_FLAG_MAX
+} atcmd_IM_CN_Signalling_Flag_enum;
+
+//LIPA_indication
+typedef enum
+{
+ ATCMD_LIPA_INDICATION_NOT_RECEIVED, //indication not received that the PDP context provides connectivity using a LIPA PDN connection
+ ATCMD_LIPA_INDICATION_RECEIVED, //indication received that the PDP context provides connectivity using a LIPA PDN connection
+ ATCMD_LIPA_INDICATION_MAX
+} atcmd_LIPA_indication_enum;
+
+//auth_prot
+typedef enum
+{
+ ATCMD_AUTH_PROT_NONE, //None. Used to indicate that no authentication protocol is used for this PDP context. Username and password are removed if previously specified.
+ ATCMD_AUTH_PROT_PAP, //PAP
+ ATCMD_AUTH_PROT_CHAP, //CHAP
+ ATCMD_AUTH_PROT_MAX
+} atcmd_auth_prot_enum;
+
+//mobile_data
+typedef enum
+{
+ ATCMD_MOBILE_DATA_OFF, //OFF
+ ATCMD_MOBILE_DATA_ON, //ON
+ ATCMD_MOBILE_DATA_MAX
+} atcmd_mobile_data_enum;
+
+//data_roaming
+typedef enum
+{
+ ATCMD_DATA_ROAMING_OFF, //OFF
+ ATCMD_DATA_ROAMING_ON, //ON
+ ATCMD_DATA_ROAMING_MAX
+} atcmd_data_roaming_enum;
+
+//volte
+typedef enum
+{
+ ATCMD_VOLTE_OFF, //OFF
+ ATCMD_VOLTE_ON, //ON
+ ATCMD_VOLTE_MAX
+} atcmd_volte_enum;
+
+//ims_test_mode
+typedef enum
+{
+ ATCMD_IMS_TEST_MODE_OFF, //OFF
+ ATCMD_IMS_TEST_MODE_ON, //ON
+ ATCMD_IMS_TEST_MODE_MAX
+} atcmd_ims_test_mode_enum;
+
+//op
+typedef enum
+{
+ ATCMD_OP_READ, //read
+ ATCMD_OP_SET, //set
+ ATCMD_OP_MAX
+} atcmd_op_enum;
+
+//auth_type
+typedef enum
+{
+ ATCMD_AUTH_TYPE_PAP, //PAP
+ ATCMD_AUTH_TYPE_CHAP, //CHAP
+ ATCMD_AUTH_TYPE_NONE, //NONE
+ ATCMD_AUTH_TYPE_PAP_CHAP, //PAP-CHAP
+ ATCMD_AUTH_TYPE_MAX
+} atcmd_auth_type_enum;
+
+//rat
+typedef enum
+{
+ ATCMD_RAT_ALL_RAT = 0, //all rat
+ ATCMD_RAT_23G = 1, //23G
+ ATCMD_RAT_4G = 2, //4G
+ ATCMD_RAT_234G = ATCMD_RAT_23G | ATCMD_RAT_4G, //234G
+ ATCMD_RAT_5G = 4, //5G
+ ATCMD_RAT_235G = ATCMD_RAT_23G | ATCMD_RAT_5G, //235G
+ ATCMD_RAT_45G = ATCMD_RAT_4G | ATCMD_RAT_5G, //45G
+ ATCMD_RAT_MAX,
+} atcmd_rat_enum;
+
+//deact_cause
+typedef enum
+{
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_DONT_CARE = 0, //EGACT_CAUSE_DONT_CARE
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_DEACT_NORMAL = 1, //EGACT_CAUSE_DEACT_NORMAL
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_DEACT_RA_INITIAL_ERROR = 2, //EGACT_CAUSE_DEACT_RA_INITIAL_ERROR
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_DEACT_NO_PCSCF = 3, //EGACT_CAUSE_DEACT_NO_PCSCF
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_DEACT_RA_REFRESH_ERROR = 4, //EGACT_CAUSE_DEACT_RA_REFRESH_ERROR
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_DEACT_RA_ERROR = 5, //EGACT_CAUSE_DEACT_RA_ERROR
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_USER_FORCE_TO_LOCAL_RELEASE = 6, //Used in user wants to deact a PDN immediately (without peer to peer air message waiting)
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_AOSP_SHUTDOWN = 7, //AOSP Deact reason
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_AOSP_HANDOVER = 8, //AOSP Deact reason
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_APN_CHANGED = 9, //AOSP Deact reason
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_DEACT_IMS_HANDOVER = 10, //Deact Cause to release IMS PDN, after it is handed over from Wifi to LTE
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_DEACT_TEMP_DATA_SWITCH = 11, //Deact cause to turn on temp data switch
+ ATCMD_DEACT_CAUSE_EGACT_CAUSE_IPCA_DEACT = 20,
+ ATCMD_DEACT_CAUSE_MAX
+} atcmd_deact_cause_enum;
+
+//mode
+typedef enum
+{
+ ATCMD_PSBEARER_MODE_DISABLE, //Disable +PSBEARER URC
+ ATCMD_PSBEARER_MODE_ENABLE, //Enable +PSBEARER URC
+ ATCMD_PSBEARER_MODE_MAX
+} atcmd_psbearer_mode_enum;
+
+//cell_data_speed_support
+typedef enum
+{
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_NONE_SPECIFIED=0X0000, //L4C_NONE_SPECIFIED=0x0000
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_GPRS_SUPPORT=0X0001, //L4C_GPRS_SUPPORT=0x0001
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_EDGE_SUPPORT=0X0002, //L4C_EDGE_SUPPORT=0x0002
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_UMTS_SUPPORT=0X0004, //L4C_UMTS_SUPPORT=0x0004
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_HSDPA_SUPPORT=0X0008, //L4C_HSDPA_SUPPORT=0x0008
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_HSUPA_SUPPORT=0X0010, //L4C_HSUPA_SUPPORT=0x0010
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_HSDPA_UPA_SUPPORT=0X0018, //L4C_HSDPA_UPA_SUPPORT=0x0018
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_HSDPAP_SUPPORT=0X0020, //L4C_HSDPAP_SUPPORT=0x0020
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_HSDPAP_UPA_SUPPORT=0X0030, //L4C_HSDPAP_UPA_SUPPORT=0x0030
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_HSUPAP_SUPPORT=0X0040, //L4C_HSUPAP_SUPPORT=0x0040
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_HSUPAP_DPA_SUPPORT=0X0048, //L4C_HSUPAP_DPA_SUPPORT=0x0048
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_HSPAP_SUPPORT=0X0060, //L4C_HSPAP_SUPPORT=0x0060
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_DC_DPA_SUPPORT=0X0088, //L4C_DC_DPA_SUPPORT=0x0088
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_DC_DPA_UPA_SUPPORT=0X0098, //L4C_DC_DPA_UPA_SUPPORT=0x0098
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_DC_HSDPAP_SUPPORT=0X00A0, //L4C_DC_HSDPAP_SUPPORT=0x00a0
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_DC_HSDPAP_UPA_SUPPORT=0X00B0, //L4C_DC_HSDPAP_UPA_SUPPORT=0x00b0
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_DC_HSUPAP_DPA_SUPPORT=0X00C8, //L4C_DC_HSUPAP_DPA_SUPPORT=0x00c8
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_DC_HSPAP_SUPPORT=0X00E0, //L4C_DC_HSPAP_SUPPORT=0x00e0
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_LTE_SUPPORT=0X1000, //L4C_LTE_SUPPORT=0x1000
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_LTE_CA_SUPPORT=0X2000, //L4C_LTE_CA_SUPPORT=0x2000
+ ATCMD_CELL_DATA_SPEED_SUPPORT_L4C_NOT_CHANGE=0XFFFF, //L4C_NOT_CHANGE=0xffff
+ ATCMD_CELL_DATA_SPEED_SUPPORT_MAX
+} atcmd_cell_data_speed_support_enum;
+
+//max_data_bearer_capability
+typedef enum
+{
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_NONE_ACTIVATE, //L4C_NONE_ACTIVATE
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_GPRS_CAPABILITY, //L4C_GPRS_CAPABILITY
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_EDGE_CAPABILITY, //L4C_EDGE_CAPABILITY
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_UMTS_CAPABILITY, //L4C_UMTS_CAPABILITY
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_HSDPA_CAPABILITY, //L4C_HSDPA_CAPABILITY :mac-hs
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_HSUPA_CAPABILITY, //L4C_HSUPA_CAPABILITY :mac-e/es
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_HSDPA_HSUPA_CAPABILITY, //L4C_HSDPA_HSUPA_CAPABILITY :mac-hs + mac-e/es
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_HSDPAP_CAPABILITY, //L4C_HSDPAP_CAPABILITY :mac-ehs
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_HSDPAP_UPA_CAPABILITY, //L4C_HSDPAP_UPA_CAPABILITY :mac-ehs + mac-e/es
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_HSUPAP_CAPABILITY, //L4C_HSUPAP_CAPABILITY :mac-i/is
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_HSUPAP_DPA_CAPABILITY, //L4C_HSUPAP_DPA_CAPABILITY :mac-hs + maci/is
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_HSPAP_CAPABILITY, //L4C_HSPAP_CAPABILITY :mac-ehs + mac-i/is
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_DC_DPA_CAPABILITY, //L4C_DC_DPA_CAPABILITY :(DC) mac-hs
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_DC_DPA_UPA_CAPABILITY, //L4C_DC_DPA_UPA_CAPABILITY :(DC) mac-hs + mac-e/es
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_DC_HSDPAP_CAPABILITY, //L4C_DC_HSDPAP_CAPABILITY :(DC) mac-ehs
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_DC_HSDPAP_UPA_CAPABILITY, //L4C_DC_HSDPAP_UPA_CAPABILITY :(DC) mac-ehs + mac-e/es
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_DC_HSUPAP_DPA_CAPABILITY, //L4C_DC_HSUPAP_DPA_CAPABILITY :(DC) mac-hs + mac-i/is
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_DC_HSPAP_CAPABILITY, //L4C_DC_HSPAP_CAPABILITY :(DC) mac-ehs + mac-i/is
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_LTE_CAPABILITY, //L4C_LTE_CAPABILITY
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_L4C_LTE_CA_CAPABILITY, //L4C_LTE_CA_CAPABILITY
+ ATCMD_MAX_DATA_BEARER_CAPABILITY_MAX
+} atcmd_max_data_bearer_capability_enum;
+
+//fallback_enable
+typedef enum
+{
+ ATCMD_FALLBACK_ENABLE_DISABLE_IPV4V6_FALLBACK, //Disable IPv4v6 fallback
+ ATCMD_FALLBACK_ENABLE_ENABLE_IPV4V6_FALLBACK, //Enable IPv4v6 fallback
+ ATCMD_FALLBACK_ENABLE_MAX
+} atcmd_fallback_enable_enum;
+
+//ipv4_first
+typedef enum
+{
+ ATCMD_IPV4_FIRST_IPV6_THEN_IPV4, //IPv6 then IPv4
+ ATCMD_IPV4_FIRST_IPV4_THEN_IPV6, //IPv4 then IPv6
+ ATCMD_IPV4_FIRST_MAX
+} atcmd_ipv4_first_enum;
+
+//is_data_allowed
+typedef enum
+{
+ ATCMD_IS_DATA_ALLOWED_INDICATE_THIS_SIM_IS_NOT_DATA_ALLOWED, //Indicate this SIM is NOT data allowed.
+ ATCMD_IS_DATA_ALLOWED_INDICATE_THIS_SIM_IS_DATA_ALLOWED, //Indicate this SIM is data allowed.
+ ATCMD_IS_DATA_ALLOWED_MAX
+} atcmd_is_data_allowed_enum;
+
+//+EDRETRY reason
+typedef enum
+{
+ ATCMD_EDRETRY_MODE_RESET_MODE,
+ ATCMD_EDRETRY_MODE_QUERY_MODE,
+ ATCMD_EDRETRY_MODE_URC_OFF,
+ ATCMD_EDRETRY_MODE_URC_ON,
+ ATCMD_EDRETRY_MODE_MAX
+} atcmd_edretry_mode_enum;
+
+typedef enum
+{
+ ATCMD_CLADN_N_DISABLE_URC_CLADNU = 0,
+ ATCMD_CLADN_N_ENABLE_URC_CLADNU = 1,
+ ATCMD_CLADN_N_MAX
+} atcmd_cladn_n_enum;
+
+#ifdef __TC01__
+//+ETIMER cause
+typedef enum
+{
+ ATCMD_BACKOFF_TIMER_START,
+ ATCMD_BACKOFF_TIMER_STOP,
+ ATCMD_BACKOFF_TIMER_EXPIRED,
+ ATCMD_BACKOFF_TIMER_MAX
+}atcmd_backoff_timer_state_enum;
+#endif
+#endif /* _ATCMD_ENUM_H */
diff --git a/mcu/interface/protocol/l4_c2k/atcmd_struct.h b/mcu/interface/protocol/l4_c2k/atcmd_struct.h
new file mode 100644
index 0000000..944f332
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/atcmd_struct.h
@@ -0,0 +1,1911 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 _ATCMD_STRUCT_H
+#define _ATCMD_STRUCT_H
+
+/*
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGPIAF_REQ, l4c_ps_null_test_mode, l4c_ps_cgpiaf_read_mode, l4c_ps_cgpiaf_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGDCONT_REQ, l4c_ps_null_test_mode, l4c_ps_cgdcont_read_mode, l4c_ps_cgdcont_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGDSCONT_REQ, l4c_ps_null_test_mode, l4c_ps_cgdscont_read_mode, l4c_ps_cgdscont_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGTFT_REQ, l4c_ps_null_test_mode, l4c_ps_cgtft_read_mode, l4c_ps_cgtft_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGQREQ_REQ, l4c_ps_null_test_mode, l4c_ps_cgqreq_read_mode, l4c_ps_cgqreq_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGQMIN_REQ, l4c_ps_null_test_mode, l4c_ps_cgqmin_read_mode, l4c_ps_cgqmin_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGEQREQ_REQ, l4c_ps_null_test_mode, l4c_ps_cgeqreq_read_mode, l4c_ps_cgeqreq_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGEQMIN_REQ, l4c_ps_null_test_mode, l4c_ps_cgeqmin_read_mode, l4c_ps_cgeqmin_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGEQNEG_REQ, l4c_ps_null_test_mode, l4c_ps_cgeqneg_read_mode, l4c_ps_cgeqneg_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGACT_REQ, l4c_ps_null_test_mode, l4c_ps_cgact_read_mode, l4c_ps_cgact_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGCMOD_REQ, l4c_ps_null_test_mode, l4c_ps_cgcmod_read_mode, l4c_ps_cgcmod_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGDATA_REQ, l4c_ps_null_test_mode, l4c_ps_cgdata_read_mode, l4c_ps_cgdata_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGPADDR_REQ, l4c_ps_null_test_mode, l4c_ps_cgpaddr_read_mode, l4c_ps_cgpaddr_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGAUTO_REQ, l4c_ps_null_test_mode, l4c_ps_cgauto_read_mode, l4c_ps_cgauto_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGANS_REQ, l4c_ps_null_test_mode, l4c_ps_cgans_read_mode, l4c_ps_cgans_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGEREP_REQ, l4c_ps_null_test_mode, l4c_ps_cgerep_read_mode, l4c_ps_cgerep_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGCONTRDP_REQ, l4c_ps_null_test_mode, l4c_ps_cgcontrdp_read_mode, l4c_ps_cgcontrdp_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGSCONTRDP_REQ,l4c_ps_null_test_mode, l4c_ps_cgscontrdp_read_mode,l4c_ps_cgscontrdp_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGTFTRDP_REQ, l4c_ps_null_test_mode, l4c_ps_cgtftrdp_read_mode, l4c_ps_cgtftrdp_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGEQOS_REQ, l4c_ps_null_test_mode, l4c_ps_cgeqos_read_mode, l4c_ps_cgeqos_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGEQOSRDP_REQ, l4c_ps_null_test_mode, l4c_ps_cgeqosrdp_read_mode, l4c_ps_cgeqosrdp_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGDEL_REQ, l4c_ps_null_test_mode, l4c_ps_cgdel_read_mode, l4c_ps_cgdel_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGAUTH_REQ, l4c_ps_null_test_mode, l4c_ps_cgauth_read_mode, l4c_ps_cgauth_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_ECNCFG_REQ, l4c_ps_null_test_mode, l4c_ps_ecncfg_read_mode, l4c_ps_ecncfg_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_EGDCONT_REQ, l4c_ps_null_test_mode, l4c_ps_egdcont_read_mode, l4c_ps_egdcont_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_VZWAPNETMR_REQ,l4c_ps_null_test_mode, l4c_ps_vzwapnetmr_read_mode,l4c_ps_vzwapnetmr_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_VZWAPNE_REQ, l4c_ps_null_test_mode, l4c_ps_vzwapne_read_mode, l4c_ps_vzwapne_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_EGPAU_REQ, l4c_ps_null_test_mode, l4c_ps_egpau_read_mode, l4c_ps_egpau_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_EGACT_REQ, l4c_ps_null_test_mode, l4c_ps_egact_read_mode, l4c_ps_egact_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_CGSDATA_REQ, l4c_ps_null_test_mode, l4c_ps_cgsdata_read_mode, l4c_ps_cgsdata_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_ACTTEST_REQ, l4c_ps_null_test_mode, l4c_ps_acttest_read_mode, l4c_ps_acttest_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_PSBEARER_REQ, l4c_ps_null_test_mode, l4c_ps_psbearer_read_mode, l4c_ps_psbearer_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_EGFB_REQ, l4c_ps_null_test_mode, l4c_ps_egfb_read_mode, l4c_ps_egfb_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_EGLD_REQ, l4c_ps_null_test_mode, l4c_ps_egld_read_mode, l4c_ps_egld_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_EGDELPF_REQ, l4c_ps_null_test_mode, l4c_ps_egdelpf_read_mode, l4c_ps_egdelpf_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_EGLNKPF_REQ, l4c_ps_null_test_mode, l4c_ps_eglnkpf_read_mode, l4c_ps_eglnkpf_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_EGPCORDP_REQ, l4c_ps_null_test_mode, l4c_ps_egpcordp_read_mode, l4c_ps_egpcordp_set_mode, l4c_ps_null_active_mode)
+L4C_PS_REQ(MSG_ID_L4BPDN_L4C_EDALLOW_REQ, l4c_ps_null_test_mode, l4c_ps_edallow_read_mode, l4c_ps_edallow_set_mode, l4c_ps_null_active_mode)
+extern kal_bool l4c_ps_cgpiaf_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgpiaf_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgpiaf_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgdcont_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgdcont_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgdcont_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgdscont_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgdscont_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgdscont_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgtft_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgtft_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgtft_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgqreq_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgqreq_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgqreq_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgqmin_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgqmin_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgqmin_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgeqreq_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgeqreq_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgeqreq_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgeqmin_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgeqmin_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgeqmin_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgeqneg_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgeqneg_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgeqneg_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgact_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgact_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgact_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgcmod_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgcmod_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern kal_bool l4c_ps_cgdata_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgdata_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern kal_bool l4c_ps_cgpaddr_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgpaddr_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgpaddr_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgauto_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgauto_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgauto_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgans_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgans_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern kal_bool l4c_ps_cgerep_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgerep_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgerep_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgcontrdp_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgcontrdp_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgcontrdp_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgscontrdp_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgscontrdp_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgscontrdp_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgtftrdp_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgtftrdp_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgtftrdp_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgeqos_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgeqos_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgeqos_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgeqosrdp_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgeqosrdp_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgeqosrdp_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgdel_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgdel_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgdel_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_cgauth_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgauth_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_cgauth_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_ecncfg_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_ecncfg_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern kal_bool l4c_ps_egdcont_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_egdcont_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern kal_bool l4c_ps_vzwapnetmr_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_vzwapnetmr_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_vzwapnetmr_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_vzwapne_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_vzwapne_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_vzwapne_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_egpau_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_egpau_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_egpau_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_egact_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_egact_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern kal_bool l4c_ps_cgsdata_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_cgsdata_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern kal_bool l4c_ps_acttest_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_acttest_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern kal_bool l4c_ps_psbearer_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_psbearer_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_psbearer_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_egfb_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_egfb_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_egfb_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_egld_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_egld_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern kal_bool l4c_ps_egdelpf_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_egdelpf_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_egdelpf_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_eglnkpf_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_eglnkpf_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_eglnkpf_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_egpcordp_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_egpcordp_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+extern void l4c_at_egpcordp_ind_hdlr(local_para_struct * local_para_ptr, peer_buff_struct * peer_buff_ptr);
+extern kal_bool l4c_ps_edallow_read_mode(kal_uint32 src_id);
+extern kal_bool l4c_ps_edallow_set_mode(local_para_struct *local_para_ptr, kal_uint16 *err_cause);
+ */
+
+#include "atcmd_enum.h"
+//#include "kal_public_defs.h"
+#include "atp_public_defs.h"
+#include "ps_public_enum_public.h"
+//#define atp_cmd_mode_enum kal_uint32
+
+#define ATCMD_LOCAL_PARA_HDR \
+ kal_uint32 src_id; \
+ atp_cmd_mode_enum cmd_mode;
+
+#define ATCMD_HDR ATCMD_LOCAL_PARA_HDR
+
+/* common ATCMD local_para header */
+typedef struct
+{
+ ATCMD_HDR
+} at_cmd_common_header_req_struct;
+
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool is_success;
+ kal_uint16 err_cause;
+} at_cmd_cnf_struct;
+
+typedef struct
+{
+ pdp_addr_len_enum len;
+ kal_uint8 val[MAXIMUM_POSSIBLE_ADDR_LEN];
+} at_addr_struct;
+
+typedef struct
+{
+ pdp_addr_len_enum len;
+ kal_uint8 val[MAXIMUM_POSSIBLE_ADDR_LEN*2];
+} at_addr_and_mask_struct;
+
+typedef struct
+{
+ kal_bool is_sst_present;
+ kal_uint8 sst;
+
+ kal_bool is_sd_present;
+ kal_uint8 sd[TCM_S_NSSAI_SD_LEN];
+
+ kal_bool is_mapped_configured_sst_present;
+ kal_uint8 mapped_configured_sst;
+
+ kal_bool is_mapped_configured_sd_present;
+ kal_uint8 mapped_configured_sd[TCM_S_NSSAI_SD_LEN];
+} at_s_nssai_struct;
+
+// +CGEV:
+/* +CGEV: NW DETACH
+ +CGEV: ME DETACH
+ +CGEV: NW CLASS <class>
+ +CGEV: ME CLASS <class>
+ +CGEV: NW PDN ACT <cid>[,<WLAN_Offload>]
+ +CGEV: ME PDN ACT <cid>[,<reason>[,<cid_other>]][,<WLAN_Offload>]
+ +CGEV: NW ACT <p_cid>, <cid>, <event_type>[,<WLAN_Offload>]
+ +CGEV: ME ACT <p_cid>, <cid>, <event_type>[,<WLAN_Offload>]
+ XX +CGEV: NW DEACT <PDP_type>, <PDP_addr>, [<cid>] XX
+ XX +CGEV: ME DEACT <PDP_type>, <PDP_addr>, [<cid>] XX
+ +CGEV: NW PDN DEACT <cid>[,<WLAN_Offload>]
+ +CGEV: ME PDN DEACT <cid>
+ +CGEV: NW DEACT <p_cid>, <cid>, <event_type>[,<WLAN_Offload>]
+ +CGEV: ME DEACT <p_cid>, <cid>, <event_type>
+ +CGEV: NW MODIFY <cid>, <change_reason>, <event_type>[,<WLAN_Offload>]
+ +CGEV: ME MODIFY <cid>, <change_reason>, <event_type>[,<WLAN_Offload>]
+ +CGEV: REJECT <PDP_type>, <PDP_addr>
+ +CGEV: NW REACT <PDP_type>, <PDP_addr>, [<cid>]
+ */
+
+// +CGEV: NW PDN ACT <cid>[,<WLAN_Offload>]
+typedef struct
+{
+ kal_bool cid_present;
+ kal_uint32 cid;
+ kal_bool WLAN_Offload_present;
+ atcmd_WLAN_Offload_enum WLAN_Offload;
+} cgev_nw_pdn_act_struct;
+
+// +CGEV: ME PDN ACT <cid>[,<reason>[,<cid_other>]][,<WLAN_Offload>]
+typedef struct
+{
+ kal_bool cid_present;
+ kal_uint32 cid;
+ kal_bool reason_present;
+ atcmd_reason_enum reason;
+ kal_bool cid_other_present;
+ kal_uint32 cid_other;
+ kal_bool WLAN_Offload_present;
+ atcmd_WLAN_Offload_enum WLAN_Offload;
+} cgev_me_pdn_act_struct;
+
+// +CGEV: NW ACT <p_cid>, <cid>, <event_type>[,<WLAN_Offload>]
+typedef struct
+{
+ kal_bool p_cid_present;
+ kal_uint32 p_cid;
+ kal_bool cid_present;
+ kal_uint32 cid;
+ kal_bool event_type_present;
+ atcmd_event_type_enum event_type;
+ kal_bool WLAN_Offload_present;
+ atcmd_WLAN_Offload_enum WLAN_Offload;
+} cgev_nw_act_struct;
+
+// +CGEV: ME ACT <p_cid>, <cid>, <event_type>[,<WLAN_Offload>]
+#if 1
+typedef cgev_nw_act_struct cgev_me_act_struct;
+#else
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+
+// +CGEV: NW PDN DEACT <cid>[,<WLAN_Offload>]
+typedef struct
+{
+ kal_bool cid_present;
+ kal_uint32 cid;
+ kal_bool WLAN_Offload_present;
+ atcmd_WLAN_Offload_enum WLAN_Offload;
+} cgev_nw_pdn_deact_struct;
+
+// +CGEV: ME PDN DEACT <cid>
+typedef struct
+{
+ kal_bool cid_present;
+ kal_uint32 cid;
+} cgev_me_pdn_deact_struct;
+
+// +CGEV: NW DEACT <p_cid>, <cid>, <event_type>[,<WLAN_Offload>]
+typedef struct
+{
+ kal_bool p_cid_present;
+ kal_uint32 p_cid;
+ kal_bool cid_present;
+ kal_uint32 cid;
+ kal_bool event_type_present;
+ atcmd_event_type_enum event_type;
+ kal_bool WLAN_Offload_present;
+ atcmd_WLAN_Offload_enum WLAN_Offload;
+} cgev_nw_deact_struct;
+
+// +CGEV: ME DEACT <p_cid>, <cid>, <event_type>
+typedef struct
+{
+ kal_bool p_cid_present;
+ kal_uint32 p_cid;
+ kal_bool cid_present;
+ kal_uint32 cid;
+ kal_bool event_type_present;
+ atcmd_event_type_enum event_type;
+} cgev_me_deact_struct;
+
+// +CGEV: NW MODIFY <cid>, <change_reason>, <event_type>[,<WLAN_Offload>]
+typedef struct
+{
+ kal_bool cid_present;
+ kal_uint32 cid;
+ kal_bool change_reason_present;
+ kal_uint32 change_reason;
+ kal_bool event_type_present;
+ atcmd_event_type_enum event_type;
+ kal_bool WLAN_Offload_present;
+ atcmd_WLAN_Offload_enum WLAN_Offload;
+} cgev_nw_modify_struct;
+
+// +CGEV: ME MODIFY <cid>, <change_reason>, <event_type>[,<WLAN_Offload>]
+#if 1
+typedef cgev_nw_modify_struct cgev_me_modify_struct;
+#else
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+
+// +CGEV: REJECT <PDP_type>, <PDP_addr>
+typedef struct
+{
+ kal_bool PDP_type_present;
+ kal_uint8 PDP_type[PDP_TYPE_STRING_LEN];
+ kal_bool PDP_addr_present;
+ at_addr_struct PDP_addr;
+} cgev_reject_struct;
+
+// +CGEV: NW REACT <PDP_type>, <PDP_addr>, [<cid>]
+typedef struct
+{
+ kal_bool PDP_type_present;
+ kal_uint8 PDP_type[PDP_TYPE_STRING_LEN];
+ kal_bool PDP_addr_present;
+ at_addr_struct PDP_addr;
+ kal_bool cid_present;
+ kal_uint32 cid;
+} cgev_nw_react_struct;
+
+typedef struct
+{
+ kal_bool cid_present;
+ kal_uint32 cid;
+ kal_bool nsapi_present;
+ kal_uint32 nsapi; // bearer_id
+ kal_bool notify_type_present;
+ l4ctcm_bearer_notify_type_enum notify_type;
+ kal_bool qci_present;
+ kal_uint32 qci;
+ kal_bool gbr_dl_present;
+ kal_uint32 gbr_dl;
+ kal_bool gbr_ul_present;
+ kal_uint32 gbr_ul;
+ kal_bool max_br_dl_present;
+ kal_uint32 max_br_dl;
+ kal_bool max_br_ul_present;
+ kal_uint32 max_br_ul;
+ kal_bool operation_code_present;
+ kal_uint32 operation_code; //tft operation_code
+ kal_bool num_pkt_filter_present;
+ kal_uint32 num_pkt_filter;
+} at_escontind_ind_normal_struct;
+
+typedef struct
+{
+ kal_bool cid_present;
+ kal_uint32 cid;
+ kal_bool pkt_filter_id_present;
+ kal_uint32 pkt_filter_id;
+ kal_bool pkt_filter_direction_present;
+ kal_uint32 pkt_filter_direction;
+ kal_bool local_port_low_present;
+ kal_uint32 local_port_low;
+ kal_bool local_port_high_present;
+ kal_uint32 local_port_high;
+ kal_bool remote_port_low_present;
+ kal_uint32 remote_port_low;
+ kal_bool remote_port_high_present;
+ kal_uint32 remote_port_high;
+ kal_bool remote_ip_present;
+ at_addr_struct remote_ip;
+} at_escontind_ind_packet_filter_struct;
+
+/*
++ESCONTIND: <type>, <normal_struct> or <packet_filter_struct>
+
+** type = 0 : +ESCONTIND: <type>, <normal_struct>
+** type = 1 : +ESCONTIND: <type>, <packet_filter_struct>
+
+** normal_struct:
+ <cid>, <bearer id>, <noti_type>, <qci>, <gbr_dl>, <gbr_ul>, <max_br_dl>, <max_br_ul>, <operation_code>, <num_pkt_filter>
+
+** packet_filter_struct:
+ <cid>, <pkt_filter_id>, <pkt_filter_dirction>, <local_port_low>, <local_port_high>, <remote_port_low>, <remote_port_high>, <remote_ip>
+*/
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_uint32 type;
+ union
+ {
+ at_escontind_ind_normal_struct normal_struct;
+ at_escontind_ind_packet_filter_struct packet_filter_struct;
+ }info;
+} at_escontind_ind_struct;
+
+// +EGEV: REVIVE START <cid>, <rat>
+// +EGEV: REVIVE SUCCESS <cid>, <rat>
+typedef struct
+{
+ kal_uint8 cid;
+ kal_uint8 rat[RAT_STRING_LEN];
+} egev_revive_struct;
+
+// +EGEV: REVIVE FINISH <rat>
+typedef struct
+{
+ kal_uint8 rat[RAT_STRING_LEN];
+} egev_revive_finish_struct;
+
+typedef struct
+{
+ kal_uint32 src_id;
+ cgev_event_enum event;
+
+ union {
+ cgev_nw_pdn_act_struct nw_pdn_act;
+ cgev_me_pdn_act_struct me_pdn_act;
+ cgev_nw_act_struct nw_act;
+ cgev_me_act_struct me_act;
+ cgev_nw_pdn_deact_struct nw_pdn_deact;
+ cgev_me_pdn_deact_struct me_pdn_deact;
+ cgev_nw_deact_struct nw_deact;
+ cgev_me_deact_struct me_deact;
+ cgev_nw_modify_struct nw_modify;
+ cgev_me_modify_struct me_modify;
+ cgev_reject_struct reject;
+ cgev_nw_react_struct nw_react;
+ } info;
+} at_cgev_ind_struct;
+
+typedef struct
+{
+ kal_uint32 src_id;
+ egev_event_enum event;
+
+ union {
+ egev_revive_struct revive_start;
+ egev_revive_struct revive_success;
+ egev_revive_finish_struct revive_finish;
+ } info;
+} at_egev_ind_struct;
+
+//+CGPIAF
+//SET command: +CGPIAF=[<IPv6_AddressFormat>[,<IPv6_SubnetNotation>[,<IPv6_LeadingZeros>[,<IPv6_CompressZeros>]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum IPv6_AddressFormat_parse_result;
+ atcmd_IPv6_AddressFormat_enum IPv6_AddressFormat; // integer type
+ at_token_parse_result_enum IPv6_SubnetNotation_parse_result;
+ atcmd_IPv6_SubnetNotation_enum IPv6_SubnetNotation; // integer type
+ at_token_parse_result_enum IPv6_LeadingZeros_parse_result;
+ atcmd_IPv6_LeadingZeros_enum IPv6_LeadingZeros; // integer type
+ at_token_parse_result_enum IPv6_CompressZeros_parse_result;
+ atcmd_IPv6_CompressZeros_enum IPv6_CompressZeros; // integer type
+} at_cgpiaf_req_struct;
+
+//READ response = +CGPIAF: <IPv6_AddressFormat>,<IPv6_SubnetNotation>,<IPv6_LeadingZeros>,<IPv6_CompressZeros>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool IPv6_AddressFormat_present;
+ atcmd_IPv6_AddressFormat_enum IPv6_AddressFormat; // integer type
+ kal_bool IPv6_SubnetNotation_present;
+ atcmd_IPv6_SubnetNotation_enum IPv6_SubnetNotation; // integer type
+ kal_bool IPv6_LeadingZeros_present;
+ atcmd_IPv6_LeadingZeros_enum IPv6_LeadingZeros; // integer type
+ kal_bool IPv6_CompressZeros_present;
+ atcmd_IPv6_CompressZeros_enum IPv6_CompressZeros; // integer type
+} at_cgpiaf_ind_struct;
+
+//+CGDCONT
+//SET command: +CGDCONT=[<cid>[,<PDP_type>[,<APN>[,<PDP_addr>[,<d_comp>[,<h_comp>[,<IPv4AddrAlloc>[,<request_type>[,<P-CSCF_discovery>[,<IM_CN_Signalling_Flag_Ind>[,<NSLPI>[,<securePCO>[,<IPv4_MTU_discovery>[,<Local_Addr_Ind>[,<Non-IP_MTU_discovery>[,<Reliable_Data_Service>[,<SSC_mode>[,<S-NSSAI>[,<Access_type>[,<RQoS_Ind>[,<MH6-PDU>]]]]]]]]]]]]]]]]]]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum PDP_type_parse_result;
+ kal_uint8 PDP_type[PDP_TYPE_STRING_LEN]; // string type
+ at_token_parse_result_enum APN_parse_result;
+ kal_uint8 APN[APN_STRING_LEN]; // string type
+ at_token_parse_result_enum PDP_addr_parse_result;
+ at_addr_struct PDP_addr; // string type
+ at_token_parse_result_enum d_comp_parse_result;
+ atcmd_d_comp_enum d_comp; // integer type
+ at_token_parse_result_enum h_comp_parse_result;
+ atcmd_h_comp_enum h_comp; // integer type
+ at_token_parse_result_enum IPv4AddrAlloc_parse_result;
+ atcmd_IPv4AddrAlloc_enum IPv4AddrAlloc; // integer type
+ at_token_parse_result_enum request_type_parse_result;
+ atcmd_request_type_enum request_type; // integer type
+ at_token_parse_result_enum P_CSCF_discovery_parse_result;
+ atcmd_P_CSCF_discovery_enum P_CSCF_discovery; // integer type
+ at_token_parse_result_enum IM_CN_Signalling_Flag_Ind_parse_result;
+ atcmd_IM_CN_Signalling_Flag_Ind_enum IM_CN_Signalling_Flag_Ind; // integer type
+ at_token_parse_result_enum NSLPI_parse_result;
+ atcmd_NSLPI_enum NSLPI; // integer type
+ at_token_parse_result_enum securePCO_parse_result;
+ atcmd_securePCO_enum securePCO; // integer type
+ at_token_parse_result_enum IPv4_MTU_discovery_parse_result;
+ atcmd_IPv4_MTU_discovery_enum IPv4_MTU_discovery; // integer type
+ at_token_parse_result_enum Local_Addr_Ind_parse_result;
+ atcmd_Local_Addr_Ind_enum Local_Addr_Ind; // integer type
+ at_token_parse_result_enum Non_IP_MTU_discovery_parse_result;
+ atcmd_Non_IP_MTU_discovery_enum Non_IP_MTU_discovery; // integer type
+ at_token_parse_result_enum Reliable_Data_Service_parse_result;
+ atcmd_Reliable_Data_Service_enum Reliable_Data_Service; // integer type
+ at_token_parse_result_enum SSC_mode_parse_result;
+ atcmd_SSC_mode_enum SSC_mode; // integer type
+ at_token_parse_result_enum S_NSSAI_parse_result;
+ at_s_nssai_struct S_NSSAI; // string type
+ at_token_parse_result_enum Access_type_parse_result;
+ atcmd_Access_type_enum Access_type; // integer type
+ at_token_parse_result_enum RQoS_Ind_parse_result;
+ atcmd_RQoS_Ind_enum RQoS_Ind; // integer type
+ at_token_parse_result_enum MH6_PDU_parse_result;
+ atcmd_MH6_PDU_enum MH6_PDU; // integer type
+ at_token_parse_result_enum Always_on_parse_result;
+ atcmd_Always_on_enum Always_on; // integer type
+} at_cgdcont_req_struct;
+
+//READ response = [+CGDCONT: <cid>,<PDP_type>,<APN>,<PDP_addr>,<d_comp>,<h_comp>[,<IPv4AddrAlloc>[,<request_type>[,<P-CSCF_discovery>[,<IM_CN_Signalling_Flag_Ind>[,<NSLPI>[,<securePCO>[,<IPv4_MTU_discovery>[,<Local_Addr_Ind>[,<Non-IP_MTU_discovery>[,<Reliable_Data_Service>[,<SSC_mode>[,<S-NSSAI>[,<Access_type>[,<RQoS_Ind>[,<MH6-PDU>]]]]]]]]]]]]]]]]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool PDP_type_present;
+ kal_uint8 PDP_type[PDP_TYPE_STRING_LEN]; // string type
+ kal_bool APN_present;
+ kal_uint8 APN[APN_STRING_LEN]; // string type
+ kal_bool PDP_addr_present;
+ at_addr_struct PDP_addr; // string type
+ kal_bool d_comp_present;
+ atcmd_d_comp_enum d_comp; // integer type
+ kal_bool h_comp_present;
+ atcmd_h_comp_enum h_comp; // integer type
+ kal_bool IPv4AddrAlloc_present;
+ atcmd_IPv4AddrAlloc_enum IPv4AddrAlloc; // integer type
+ kal_bool request_type_present;
+ atcmd_request_type_enum request_type; // integer type
+ kal_bool P_CSCF_discovery_present;
+ atcmd_P_CSCF_discovery_enum P_CSCF_discovery; // integer type
+ kal_bool IM_CN_Signalling_Flag_Ind_present;
+ atcmd_IM_CN_Signalling_Flag_Ind_enum IM_CN_Signalling_Flag_Ind; // integer type
+ kal_bool NSLPI_present;
+ atcmd_NSLPI_enum NSLPI; // integer type
+ kal_bool securePCO_present;
+ atcmd_securePCO_enum securePCO; // integer type
+ kal_bool IPv4_MTU_discovery_present;
+ atcmd_IPv4_MTU_discovery_enum IPv4_MTU_discovery; // integer type
+ kal_bool Local_Addr_Ind_present;
+ atcmd_Local_Addr_Ind_enum Local_Addr_Ind; // integer type
+ kal_bool Non_IP_MTU_discovery_present;
+ atcmd_Non_IP_MTU_discovery_enum Non_IP_MTU_discovery; // integer type
+ kal_bool Reliable_Data_Service_present;
+ atcmd_Reliable_Data_Service_enum Reliable_Data_Service; // integer type
+ kal_bool SSC_mode_present;
+ atcmd_SSC_mode_enum SSC_mode; // integer type
+ kal_bool S_NSSAI_present;
+ at_s_nssai_struct S_NSSAI; // integer type
+ kal_bool Access_type_present;
+ atcmd_Access_type_enum Access_type; // integer type
+ kal_bool RQoS_Ind_present;
+ atcmd_RQoS_Ind_enum RQoS_Ind; // integer type
+ kal_bool MH6_PDU_present;
+ atcmd_MH6_PDU_enum MH6_PDU; // integer type
+ at_token_parse_result_enum Always_on_present;
+ atcmd_Always_on_enum Always_on; // integer type
+} at_cgdcont_ind_struct;
+
+//+CGDSCONT
+//SET command: +CGDSCONT=[<cid>,<p_cid>[,<d_comp>[,<h_comp>[,<IM_CN_Signalling_Flag_Ind>]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum p_cid_parse_result;
+ kal_uint32 p_cid; // integer type
+ at_token_parse_result_enum d_comp_parse_result;
+ atcmd_d_comp_enum d_comp; // integer type
+ at_token_parse_result_enum h_comp_parse_result;
+ atcmd_h_comp_enum h_comp; // integer type
+ at_token_parse_result_enum IM_CN_Signalling_Flag_Ind_parse_result;
+ atcmd_IM_CN_Signalling_Flag_Ind_enum IM_CN_Signalling_Flag_Ind; // integer type
+} at_cgdscont_req_struct;
+
+//READ response = [+CGDSCONT: <cid>,<p_cid>,<d_comp>,<h_comp>,<IM_CN_Signalling_Flag_Ind>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool p_cid_present;
+ kal_uint32 p_cid; // integer type
+ kal_bool d_comp_present;
+ atcmd_d_comp_enum d_comp; // integer type
+ kal_bool h_comp_present;
+ atcmd_h_comp_enum h_comp; // integer type
+ kal_bool IM_CN_Signalling_Flag_Ind_present;
+ atcmd_IM_CN_Signalling_Flag_Ind_enum IM_CN_Signalling_Flag_Ind; // integer type
+} at_cgdscont_ind_struct;
+typedef struct{
+ at_token_parse_result_enum ladn_string_parse_result;
+ kal_uint8 ladn_string[LADN_STRING_LEN]; // string type
+}ladn_string_info_struct;
+//+CRLADN
+//SET command: +CRLADN=<ladn_dnn>,[<ladn_dnn>]
+typedef struct
+{
+ ATCMD_HDR
+ kal_uint8 ladn_info_count;
+ ladn_string_info_struct ladn_info[MAX_LADN_STRING_COUNT];
+ //at_token_parse_result_enum ladn_info_list_parse_result;
+ //kal_uint8 ladn_info_list[LADN_INFO_LEN];
+} at_crladn_req_struct;
+//+CGTFT
+//SET command: +CGTFT=[<cid>,[<packet filter identifier>,<evaluation precedence index>[,<remote address and subnet mask>[,<protocol number (ipv4) / next header (ipv6)>[,<local port range>[,<remote port range>[,<ipsec security parameter index (spi)>[,<type of service (tos) (ipv4) and mask / traffic class (ipv6) and mask>[,<flow label (ipv6)>[,<direction>[,<local address and subnet mask>[,<QRI>]]]]]]]]]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum packet_filter_identifier_parse_result;
+ kal_uint32 packet_filter_identifier; // integer type
+ at_token_parse_result_enum evaluation_precedence_index_parse_result;
+ kal_uint32 evaluation_precedence_index; // integer type
+ at_token_parse_result_enum remote_address_and_subnet_mask_parse_result;
+ at_addr_and_mask_struct remote_address_and_subnet_mask; // string type
+ at_token_parse_result_enum protocol_number_next_header_parse_result;
+ kal_uint32 protocol_number_next_header; // integer type
+ at_token_parse_result_enum local_port_range_parse_result;
+ kal_uint8 local_port_range[LOCAL_PORT_RANGE_STRING_LEN]; // string type
+ at_token_parse_result_enum remote_port_range_parse_result;
+ kal_uint8 remote_port_range[REMOTE_PORT_RANGE_STRING_LEN]; // string type
+ at_token_parse_result_enum ipsec_spi_parse_result;
+ kal_uint32 ipsec_spi; // numeric value
+ at_token_parse_result_enum tos_traffic_class_and_mask_parse_result;
+ kal_uint8 tos_traffic_class_and_mask[TOS_TRAFFIC_CLASS_AND_MASK_STRING_LEN]; // string type
+ at_token_parse_result_enum flow_label_parse_result;
+ kal_uint32 flow_label; // numeric value
+ at_token_parse_result_enum direction_parse_result;
+ atcmd_direction_enum direction; // integer type
+ at_token_parse_result_enum local_address_and_subnet_mask_parse_result;
+ at_addr_and_mask_struct local_address_and_subnet_mask; // string type
+ at_token_parse_result_enum QRI_parse_result;
+ kal_uint16 QRI; // integer type
+} at_cgtft_req_struct;
+
+//READ response = [+CGTFT: <cid>,<packet filter identifier>,<evaluation precedence index>,<remote address and subnet mask>,<protocol number (ipv4) / next header (ipv6)>,<local port range>,<remote port range>,<ipsec security parameter index (spi)>,<type of service (tos) (ipv4) and mask / traffic class (ipv6) and mask>,<flow label (ipv6)>,<direction>,<local address and subnet mask>,<QRI>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool packet_filter_identifier_present;
+ kal_uint32 packet_filter_identifier; // integer type
+ kal_bool evaluation_precedence_index_present;
+ kal_uint32 evaluation_precedence_index; // integer type
+ kal_bool remote_address_and_subnet_mask_present;
+ at_addr_and_mask_struct remote_address_and_subnet_mask; // string type
+ kal_bool protocol_number_next_header_present;
+ kal_uint32 protocol_number_next_header; // integer type
+ kal_bool local_port_range_present;
+ kal_uint8 local_port_range[LOCAL_PORT_RANGE_STRING_LEN]; // string type
+ kal_bool remote_port_range_present;
+ kal_uint8 remote_port_range[REMOTE_PORT_RANGE_STRING_LEN]; // string type
+ kal_bool ipsec_spi_present;
+ kal_uint32 ipsec_spi; // numeric value
+ kal_bool tos_traffic_class_and_mask_present;
+ kal_uint8 tos_traffic_class_and_mask[TOS_TRAFFIC_CLASS_AND_MASK_STRING_LEN]; // string type
+ kal_bool flow_label_present;
+ kal_uint32 flow_label; // numeric value
+ kal_bool direction_present;
+ atcmd_direction_enum direction; // integer type
+ kal_bool local_address_and_subnet_mask_present;
+ at_addr_and_mask_struct local_address_and_subnet_mask; // string type
+ kal_bool QRI_present;
+ kal_uint16 QRI; // integer type
+} at_cgtft_ind_struct;
+
+typedef struct
+{
+ kal_uint32 src_id ;
+ kal_bool apn_present ; // Only when 5G, may be KAL_FALSE due to T3585 blocking for requests of a certain S-NSSAI, but doesn't care APN
+ kal_uint8 apn[APN_STRING_LEN] ;
+ kal_bool residual_backoff_timer_present ;
+ kal_uint32 residual_backoff_timer ;
+ kal_bool re_attempt_rat_indicator_present ;
+ kal_bool re_attempt_rat_indicator ;
+ kal_bool re_attempt_eplmn_indicator_present ;
+ kal_bool re_attempt_eplmn_indicator ;
+ kal_bool NSLPI_present ;
+ kal_bool NSLPI ;
+ // For 5G Congestion Control
+ kal_bool is_s_nssai_present; // Is the backoff_timer only applies to the indicated s_nssai
+ at_s_nssai_struct s_nssai;
+} at_cabtsri_ind_struct;
+
+//+CGQREQ
+//SET command: +CGQREQ=[<cid>[,<precedence>[,<delay>[,<reliability>[,<peak>[,<mean>]]]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum precedence_parse_result;
+ kal_uint32 precedence; // integer type
+ at_token_parse_result_enum delay_parse_result;
+ kal_uint32 delay; // integer type
+ at_token_parse_result_enum reliability_parse_result;
+ kal_uint32 reliability; // integer type
+ at_token_parse_result_enum peak_parse_result;
+ kal_uint32 peak; // integer type
+ at_token_parse_result_enum mean_parse_result;
+ kal_uint32 mean; // integer type
+} at_cgqreq_req_struct;
+
+//READ response = [+CGQREQ: <cid>,<precedence>,<delay>,<reliability>,<peak>,<mean>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool precedence_present;
+ kal_uint32 precedence; // integer type
+ kal_bool delay_present;
+ kal_uint32 delay; // integer type
+ kal_bool reliability_present;
+ kal_uint32 reliability; // integer type
+ kal_bool peak_present;
+ kal_uint32 peak; // integer type
+ kal_bool mean_present;
+ kal_uint32 mean; // integer type
+} at_cgqreq_ind_struct;
+
+//+CGQMIN
+//SET command: +CGQMIN=[<cid>[,<precedence>[,<delay>[,<reliability>[,<peak>[,<mean>]]]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum precedence_parse_result;
+ kal_uint32 precedence; // integer type
+ at_token_parse_result_enum delay_parse_result;
+ kal_uint32 delay; // integer type
+ at_token_parse_result_enum reliability_parse_result;
+ kal_uint32 reliability; // integer type
+ at_token_parse_result_enum peak_parse_result;
+ kal_uint32 peak; // integer type
+ at_token_parse_result_enum mean_parse_result;
+ kal_uint32 mean; // integer type
+} at_cgqmin_req_struct;
+
+//READ response = [+CGQMIN: <cid>,<precedence>,<delay>,<reliability>,<peak>,<mean>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool precedence_present;
+ kal_uint32 precedence; // integer type
+ kal_bool delay_present;
+ kal_uint32 delay; // integer type
+ kal_bool reliability_present;
+ kal_uint32 reliability; // integer type
+ kal_bool peak_present;
+ kal_uint32 peak; // integer type
+ kal_bool mean_present;
+ kal_uint32 mean; // integer type
+} at_cgqmin_ind_struct;
+
+//+CGEQREQ
+//SET command: +CGEQREQ=[<cid>[,<Traffic class>[,<Maximum bitrate UL>[,<Maximum bitrate DL>[,<Guaranteed bitrate UL>[,<Guaranteed bitrate DL>[,<Delivery order>[,<Maximum SDU size>[,<SDU error ratio>[,<Residual bit error ratio>[,<Delivery of erroneous SDUs>[,<Transfer delay>[,<Traffic handling priority>[,<Source statistics descriptor>[,<Signalling indication>]]]]]]]]]]]]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum Traffic_class_parse_result;
+ atcmd_Traffic_class_enum Traffic_class; // integer type
+ at_token_parse_result_enum Maximum_bitrate_UL_parse_result;
+ kal_uint32 Maximum_bitrate_UL; // integer type
+ at_token_parse_result_enum Maximum_bitrate_DL_parse_result;
+ kal_uint32 Maximum_bitrate_DL; // integer type
+ at_token_parse_result_enum Guaranteed_bitrate_UL_parse_result;
+ kal_uint32 Guaranteed_bitrate_UL; // integer type
+ at_token_parse_result_enum Guaranteed_bitrate_DL_parse_result;
+ kal_uint32 Guaranteed_bitrate_DL; // integer type
+ at_token_parse_result_enum Delivery_order_parse_result;
+ atcmd_Delivery_order_enum Delivery_order; // integer type
+ at_token_parse_result_enum Maximum_SDU_size_parse_result;
+ kal_uint32 Maximum_SDU_size; // integer type
+ at_token_parse_result_enum SDU_error_ratio_parse_result;
+ kal_uint8 SDU_error_ratio[SDU_ERROR_RATIO_STRING_LEN]; // string type
+ at_token_parse_result_enum Residual_bit_error_ratio_parse_result;
+ kal_uint8 Residual_bit_error_ratio[RESIDUAL_BIT_ERROR_RATIO_STRING_LEN]; // string type
+ at_token_parse_result_enum Delivery_of_erroneous_SDUs_parse_result;
+ atcmd_Delivery_of_erroneous_SDUs_enum Delivery_of_erroneous_SDUs; // integer type
+ at_token_parse_result_enum Transfer_delay_parse_result;
+ kal_uint32 Transfer_delay; // integer type
+ at_token_parse_result_enum Traffic_handling_priority_parse_result;
+ kal_uint32 Traffic_handling_priority; // integer type
+ at_token_parse_result_enum Source_statistics_descriptor_parse_result;
+ atcmd_Source_statistics_descriptor_enum Source_statistics_descriptor; // integer type
+ at_token_parse_result_enum Signalling_indication_parse_result;
+ atcmd_Signalling_indication_enum Signalling_indication; // integer type
+} at_cgeqreq_req_struct;
+
+typedef at_cgeqreq_req_struct at_cgeq_common_req_struct;
+
+
+//READ response = [+CGEQREQ: <cid>,<Traffic class>,<Maximum bitrate UL>,<Maximum bitrate DL>, <Guaranteed bitrate UL>,<Guaranteed bitrate DL>,<Delivery order>,<Maximum SDU size>,<SDU error ratio>,<Residual bit error ratio>,<Delivery of erroneous SDUs>,<Transfer delay>,<Traffic handling priority>,<Source statistics descriptor>,<Signalling indication>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool Traffic_class_present;
+ atcmd_Traffic_class_enum Traffic_class; // integer type
+ kal_bool Maximum_bitrate_UL_present;
+ kal_uint32 Maximum_bitrate_UL; // integer type
+ kal_bool Maximum_bitrate_DL_present;
+ kal_uint32 Maximum_bitrate_DL; // integer type
+ kal_bool Guaranteed_bitrate_UL_present;
+ kal_uint32 Guaranteed_bitrate_UL; // integer type
+ kal_bool Guaranteed_bitrate_DL_present;
+ kal_uint32 Guaranteed_bitrate_DL; // integer type
+ kal_bool Delivery_order_present;
+ atcmd_Delivery_order_enum Delivery_order; // integer type
+ kal_bool Maximum_SDU_size_present;
+ kal_uint32 Maximum_SDU_size; // integer type
+ kal_bool SDU_error_ratio_present;
+ kal_uint8 SDU_error_ratio[SDU_ERROR_RATIO_STRING_LEN]; // string type
+ kal_bool Residual_bit_error_ratio_present;
+ kal_uint8 Residual_bit_error_ratio[RESIDUAL_BIT_ERROR_RATIO_STRING_LEN]; // string type
+ kal_bool Delivery_of_erroneous_SDUs_present;
+ atcmd_Delivery_of_erroneous_SDUs_enum Delivery_of_erroneous_SDUs; // integer type
+ kal_bool Transfer_delay_present;
+ kal_uint32 Transfer_delay; // integer type
+ kal_bool Traffic_handling_priority_present;
+ kal_uint32 Traffic_handling_priority; // integer type
+ kal_bool Source_statistics_descriptor_present;
+ atcmd_Source_statistics_descriptor_enum Source_statistics_descriptor; // integer type
+ kal_bool Signalling_indication_present;
+ atcmd_Signalling_indication_enum Signalling_indication; // integer type
+} at_cgeqreq_ind_struct;
+
+typedef at_cgeqreq_ind_struct at_cgeq_common_ind_struct;
+
+//+CGEQMIN
+//SET command: +CGEQMIN=[<cid>[,<Traffic class>[,<Maximum bitrate UL>[,<Maximum bitrate DL>[,<Guaranteed bitrate UL>[,<Guaranteed bitrate DL>[,<Delivery order>[,<Maximum SDU size>[,<SDU error ratio>[,<Residual bit error ratio>[,<Delivery of erroneous SDUs> [,<Transfer delay>[,<Traffic handling priority>[,<Source statistics descriptor>[,<Signalling indication>]]]]]]]]]]]]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum Traffic_class_parse_result;
+ atcmd_Traffic_class_enum Traffic_class; // integer type
+ at_token_parse_result_enum Maximum_bitrate_UL_parse_result;
+ kal_uint32 Maximum_bitrate_UL; // integer type
+ at_token_parse_result_enum Maximum_bitrate_DL_parse_result;
+ kal_uint32 Maximum_bitrate_DL; // integer type
+ at_token_parse_result_enum Guaranteed_bitrate_UL_parse_result;
+ kal_uint32 Guaranteed_bitrate_UL; // integer type
+ at_token_parse_result_enum Guaranteed_bitrate_DL_parse_result;
+ kal_uint32 Guaranteed_bitrate_DL; // integer type
+ at_token_parse_result_enum Delivery_order_parse_result;
+ atcmd_Delivery_order_enum Delivery_order; // integer type
+ at_token_parse_result_enum Maximum_SDU_size_parse_result;
+ kal_uint32 Maximum_SDU_size; // integer type
+ at_token_parse_result_enum SDU_error_ratio_parse_result;
+ kal_uint8 SDU_error_ratio[SDU_ERROR_RATIO_STRING_LEN]; // string type
+ at_token_parse_result_enum Residual_bit_error_ratio_parse_result;
+ kal_uint8 Residual_bit_error_ratio[RESIDUAL_BIT_ERROR_RATIO_STRING_LEN]; // string type
+ at_token_parse_result_enum Delivery_of_erroneous_SDUs_parse_result;
+ atcmd_Delivery_of_erroneous_SDUs_enum Delivery_of_erroneous_SDUs; // integer type
+ at_token_parse_result_enum Transfer_delay_parse_result;
+ kal_uint32 Transfer_delay; // integer type
+ at_token_parse_result_enum Traffic_handling_priority_parse_result;
+ kal_uint32 Traffic_handling_priority; // integer type
+ at_token_parse_result_enum Source_statistics_descriptor_parse_result;
+ atcmd_Source_statistics_descriptor_enum Source_statistics_descriptor; // integer type
+ at_token_parse_result_enum Signalling_indication_parse_result;
+ atcmd_Signalling_indication_enum Signalling_indication; // integer type
+} at_cgeqmin_req_struct;
+
+//READ response = [+CGEQMIN: <cid>,<Traffic class>,<Maximum bitrate UL>,<Maximum bitrate DL>,<Guaranteed bitrate UL>,<Guaranteed bitrate DL>,<Delivery order>,<Maximum SDU size>,<SDU error ratio>,<Residual bit error ratio>,<Delivery of erroneous SDUs>,<Transfer delay>,<Traffic handling priority>,<Source statistics descriptor>,<Signalling indication>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool Traffic_class_present;
+ atcmd_Traffic_class_enum Traffic_class; // integer type
+ kal_bool Maximum_bitrate_UL_present;
+ kal_uint32 Maximum_bitrate_UL; // integer type
+ kal_bool Maximum_bitrate_DL_present;
+ kal_uint32 Maximum_bitrate_DL; // integer type
+ kal_bool Guaranteed_bitrate_UL_present;
+ kal_uint32 Guaranteed_bitrate_UL; // integer type
+ kal_bool Guaranteed_bitrate_DL_present;
+ kal_uint32 Guaranteed_bitrate_DL; // integer type
+ kal_bool Delivery_order_present;
+ atcmd_Delivery_order_enum Delivery_order; // integer type
+ kal_bool Maximum_SDU_size_present;
+ kal_uint32 Maximum_SDU_size; // integer type
+ kal_bool SDU_error_ratio_present;
+ kal_uint8 SDU_error_ratio[SDU_ERROR_RATIO_STRING_LEN]; // string type
+ kal_bool Residual_bit_error_ratio_present;
+ kal_uint8 Residual_bit_error_ratio[RESIDUAL_BIT_ERROR_RATIO_STRING_LEN]; // string type
+ kal_bool Delivery_of_erroneous_SDUs_present;
+ atcmd_Delivery_of_erroneous_SDUs_enum Delivery_of_erroneous_SDUs; // integer type
+ kal_bool Transfer_delay_present;
+ kal_uint32 Transfer_delay; // integer type
+ kal_bool Traffic_handling_priority_present;
+ kal_uint32 Traffic_handling_priority; // integer type
+ kal_bool Source_statistics_descriptor_present;
+ atcmd_Source_statistics_descriptor_enum Source_statistics_descriptor; // integer type
+ kal_bool Signalling_indication_present;
+ atcmd_Signalling_indication_enum Signalling_indication; // integer type
+} at_cgeqmin_ind_struct;
+
+//+CGEQNEG
+//SET command: +CGEQNEG[=<cid>[,<cid>[,...]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgeqneg_req_struct;
+
+//READ response = [+CGEQNEG: <cid>,<Traffic class>,<Maximum bitrate UL>,<Maximum bitrate DL>,<Guaranteed bitrate UL>,<Guaranteed bitrate DL>,<Delivery order>,<Maximum SDU size>,<SDU error ratio>,<Residual bit error ratio>,<Delivery of erroneous SDUs>,<Transfer delay>,<Traffic handling priority>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool Traffic_class_present;
+ atcmd_Traffic_class_enum Traffic_class; // integer type
+ kal_bool Maximum_bitrate_UL_present;
+ kal_uint32 Maximum_bitrate_UL; // integer type
+ kal_bool Maximum_bitrate_DL_present;
+ kal_uint32 Maximum_bitrate_DL; // integer type
+ kal_bool Guaranteed_bitrate_UL_present;
+ kal_uint32 Guaranteed_bitrate_UL; // integer type
+ kal_bool Guaranteed_bitrate_DL_present;
+ kal_uint32 Guaranteed_bitrate_DL; // integer type
+ kal_bool Delivery_order_present;
+ atcmd_Delivery_order_enum Delivery_order; // integer type
+ kal_bool Maximum_SDU_size_present;
+ kal_uint32 Maximum_SDU_size; // integer type
+ kal_bool SDU_error_ratio_present;
+ kal_uint8 SDU_error_ratio[SDU_ERROR_RATIO_STRING_LEN]; // string type
+ kal_bool Residual_bit_error_ratio_present;
+ kal_uint8 Residual_bit_error_ratio[RESIDUAL_BIT_ERROR_RATIO_STRING_LEN]; // string type
+ kal_bool Delivery_of_erroneous_SDUs_present;
+ atcmd_Delivery_of_erroneous_SDUs_enum Delivery_of_erroneous_SDUs; // integer type
+ kal_bool Transfer_delay_present;
+ kal_uint32 Transfer_delay; // integer type
+ kal_bool Traffic_handling_priority_present;
+ kal_uint32 Traffic_handling_priority; // integer type
+} at_cgeqneg_ind_struct;
+
+//+CGACT
+//SET command: +CGACT=[<state>[,<cid>[,<cid>[,...]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum state_parse_result;
+ atcmd_state_enum state; // integer type
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgact_req_struct;
+
+//READ response = [+CGACT: <cid>,<state>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool state_present;
+ atcmd_state_enum state; // integer type
+} at_cgact_ind_struct;
+
+//+CGCMOD
+//SET command: +CGCMOD[=<cid>[,<cid>[,...]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgcmod_req_struct;
+
+//+CGDATA
+//SET command: +CGDATA[=<L2P>[,<cid>[,<cid>[,...]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum L2P_parse_result;
+ kal_uint8 L2P[L2P_STRING_LEN]; // string type
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgdata_req_struct;
+
+//+CGPADDR
+//SET command: +CGPADDR[=<cid>[,<cid>[,...]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgpaddr_req_struct;
+
+//READ response = [+CGPADDR: <cid>[,<PDP_addr_1>[,<PDP_addr_2>]]]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool PDP_addr_1_present;
+ at_addr_struct PDP_addr_1; // string type
+ kal_bool PDP_addr_2_present;
+ at_addr_struct PDP_addr_2; // string type
+} at_cgpaddr_ind_struct;
+
+//+CGAUTO
+//SET command: +CGAUTO=[<n>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cgauto_n_parse_result;
+ atcmd_cgauto_n_enum cgauto_n; // integer type
+} at_cgauto_req_struct;
+
+//READ response = +CGAUTO: <n>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cgauto_n_present;
+ atcmd_cgauto_n_enum cgauto_n; // integer type
+} at_cgauto_ind_struct;
+
+//+CGANS
+//SET command: +CGANS[=<response>,[<L2P>,[<cid>]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum response_parse_result;
+ atcmd_response_enum response; // integer type
+ at_token_parse_result_enum L2P_parse_result;
+ kal_uint8 L2P[L2P_STRING_LEN]; // string type
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgans_req_struct;
+
+//+CGEREP
+//SET command: +CGEREP=[<mode>[,<bfr>]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cgerep_mode_parse_result;
+ atcmd_cgerep_mode_enum cgerep_mode; // integer type
+ at_token_parse_result_enum bfr_parse_result;
+ atcmd_bfr_enum bfr; // integer type
+} at_cgerep_req_struct;
+
+//READ response = +CGEREP: <mode>,<bfr>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cgerep_mode_present;
+ atcmd_cgerep_mode_enum cgerep_mode; // integer type
+ kal_bool bfr_present;
+ atcmd_bfr_enum bfr; // integer type
+} at_cgerep_ind_struct;
+
+//+CGCONTRDP
+//SET command: +CGCONTRDP[=<cid>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgcontrdp_req_struct;
+
+//READ response = [+CGCONTRDP: <cid>,<bearer_id>,<apn>[,<local_addr and subnet_mask>[,<gw_addr>[,<DNS_prim_addr>[,<DNS_sec_addr>[,<P-CSCF_prim_addr>[,<P-CSCF_sec_addr>[,<IM_CN_Signalling_Flag>[,<LIPA_indication>[,<IPv4_MTU>[,<WLAN_Offload>[,<Local_Addr_Ind>[,<Non-IP_MTU>[,<Serving_PLMN_rate_control_value>[,<Reliable_Data_Service>[,<PS_Data_Off_Support>[,<PSI>,<QFI>[,<SSC_mode>[,<S-NSSAI>[,<Access_type>[,<RQ_timer>]]]]]]]]]]]]]]]]]]]]]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool bearer_id_present;
+ kal_uint32 bearer_id; // integer type
+ kal_bool apn_present;
+ kal_uint8 apn[APN_STRING_LEN]; // string type
+ kal_bool local_addr_and_subnet_mask_present;
+ at_addr_and_mask_struct local_addr_and_subnet_mask; // string type
+ kal_bool gw_addr_present;
+ at_addr_struct gw_addr; // string type
+ kal_bool DNS_prim_addr_present;
+ at_addr_struct DNS_prim_addr; // string type
+ kal_bool DNS_sec_addr_present;
+ at_addr_struct DNS_sec_addr; // string type
+ kal_bool P_CSCF_prim_addr_present;
+ at_addr_struct P_CSCF_prim_addr; // string type
+ kal_bool P_CSCF_sec_addr_present;
+ at_addr_struct P_CSCF_sec_addr; // string type
+ kal_bool IM_CN_Signalling_Flag_present;
+ atcmd_IM_CN_Signalling_Flag_enum IM_CN_Signalling_Flag; // integer type
+ kal_bool LIPA_indication_present;
+ atcmd_LIPA_indication_enum LIPA_indication; // integer type
+ kal_bool IPv4_MTU_present;
+ kal_uint32 IPv4_MTU; // integer type
+ kal_bool WLAN_Offload_present;
+ atcmd_WLAN_Offload_enum WLAN_Offload; // integer type
+ kal_bool Local_Addr_Ind_present;
+ atcmd_Local_Addr_Ind_enum Local_Addr_Ind; // integer type
+ kal_bool Non_IP_MTU_present;
+ kal_uint32 Non_IP_MTU; // integer type
+ kal_bool Serving_PLMN_rate_control_value_present;
+ kal_uint32 Serving_PLMN_rate_control_value; // integer type
+ kal_bool Reliable_Data_Service_present;
+ kal_uint8 Reliable_Data_Service; // integer type
+ kal_bool PS_Data_off_Support_present;
+ kal_uint8 PS_Data_off_Support; // integer type
+ kal_bool PSI_present;
+ kal_uint8 PSI; // integer type
+ kal_bool QFI_present;
+ kal_uint8 QFI; // integer type
+ kal_bool SSC_mode_present;
+ kal_uint8 SSC_mode; // integer type
+ kal_bool S_NSSAI_present;
+ at_s_nssai_struct S_NSSAI; // string type
+ kal_bool Access_type_present;
+ kal_uint8 Access_type; // integer type
+ kal_bool RQ_timer_present;
+ kal_uint32 RQ_timer; // integer type
+} at_cgcontrdp_ind_struct;
+
+//+CGSCONTRDP
+//SET command: +CGSCONTRDP[=<cid>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgscontrdp_req_struct;
+
+//READ response = [+CGSCONTRDP: <cid>,<p_cid>,<bearer_id>[,<IM_CN_Signalling_Flag>[,<WLAN_Offload>[,<PSI>,<QFI>]]]]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool p_cid_present;
+ kal_uint32 p_cid; // integer type
+ kal_bool bearer_id_present;
+ kal_uint32 bearer_id; // integer type
+ kal_bool IM_CN_Signalling_Flag_present;
+ atcmd_IM_CN_Signalling_Flag_enum IM_CN_Signalling_Flag; // integer type
+ kal_bool WLAN_Offload_present;
+ atcmd_WLAN_Offload_enum WLAN_Offload; // integer type
+ kal_bool PSI_present;
+ kal_uint8 PSI; // integer type
+ kal_bool QFI_present;
+ kal_uint8 QFI; // integer type
+} at_cgscontrdp_ind_struct;
+
+//+CGTFTRDP
+//SET command: +CGTFTRDP[=<cid>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgtftrdp_req_struct;
+
+//READ response = [+CGTFTRDP: <cid>,<packet filter identifier>,<evaluation precedence index>,<remote address and subnet mask>,<protocol number (ipv4) / next header (ipv6)>,<local port range>,<remote port range>,<ipsec security parameter index (spi)>,<type of service (tos) (ipv4) and mask / traffic class (ipv6) and mask>,<flow label (ipv6)>,<direction>,<NW packet filter Identifier>,<local address and subnet mask>,<QRI>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool packet_filter_identifier_present;
+ kal_uint32 packet_filter_identifier; // integer type
+ kal_bool evaluation_precedence_index_present;
+ kal_uint32 evaluation_precedence_index; // integer type
+ kal_bool remote_address_and_subnet_mask_present;
+ at_addr_and_mask_struct remote_address_and_subnet_mask; // string type
+ kal_bool protocol_number_next_header_present;
+ kal_uint32 protocol_number_next_header; // integer type
+ kal_bool local_port_range_present;
+ kal_uint8 local_port_range[LOCAL_PORT_RANGE_STRING_LEN]; // string type
+ kal_bool remote_port_range_present;
+ kal_uint8 remote_port_range[REMOTE_PORT_RANGE_STRING_LEN]; // string type
+ kal_bool ipsec_spi_present;
+ kal_uint32 ipsec_spi; // numeric value
+ kal_bool tos_traffic_class_and_mask_present;
+ kal_uint8 tos_traffic_class_and_mask[TOS_TRAFFIC_CLASS_AND_MASK_STRING_LEN]; // string type
+ kal_bool flow_label_present;
+ kal_uint32 flow_label; // numeric value
+ kal_bool direction_present;
+ atcmd_direction_enum direction; // integer type
+ kal_bool NW_packet_filter_Identifier_present;
+ kal_uint32 NW_packet_filter_Identifier; // integer type
+ kal_bool local_address_and_subnet_mask_present;
+ at_addr_and_mask_struct local_address_and_subnet_mask; // string type
+ kal_bool QRI_present;
+ kal_uint16 QRI; // integer type
+} at_cgtftrdp_ind_struct;
+
+//+CGEQOS
+//SET command: +CGEQOS=[<cid>[,<QCI>[,<DL_GBR>,<UL_GBR>[,<DL_MBR>,<UL_MBR>]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum QCI_parse_result;
+ kal_uint32 QCI; // integer type
+ at_token_parse_result_enum DL_GBR_parse_result;
+ kal_uint64 DL_GBR; // integer type
+ at_token_parse_result_enum UL_GBR_parse_result;
+ kal_uint64 UL_GBR; // integer type
+ at_token_parse_result_enum DL_MBR_parse_result;
+ kal_uint64 DL_MBR; // integer type
+ at_token_parse_result_enum UL_MBR_parse_result;
+ kal_uint64 UL_MBR; // integer type
+} at_cgeqos_req_struct;
+
+//READ response = [+CGEQOS: <cid>,<QCI>,[<DL_GBR>,<UL_GBR>],[<DL_MBR>,<UL_MBR>]]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool QCI_present;
+ kal_uint32 QCI; // integer type
+ kal_bool DL_GBR_present;
+ kal_uint64 DL_GBR; // integer type
+ kal_bool UL_GBR_present;
+ kal_uint64 UL_GBR; // integer type
+ kal_bool DL_MBR_present;
+ kal_uint64 DL_MBR; // integer type
+ kal_bool UL_MBR_present;
+ kal_uint64 UL_MBR; // integer type
+} at_cgeqos_ind_struct;
+
+//+CGEQOSRDP
+//SET command: +CGEQOSRDP[=<cid>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgeqosrdp_req_struct;
+
+//READ response = [+CGEQOSRDP: <cid>,<QCI>,[<DL_GBR>,<UL_GBR>],[<DL_MBR>,<UL_MBR>][,<DL_AMBR>,<UL_AMBR>]]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool QCI_present;
+ kal_uint32 QCI; // integer type
+ kal_bool DL_GBR_present;
+ kal_uint64 DL_GBR; // integer type
+ kal_bool UL_GBR_present;
+ kal_uint64 UL_GBR; // integer type
+ kal_bool DL_MBR_present;
+ kal_uint64 DL_MBR; // integer type
+ kal_bool UL_MBR_present;
+ kal_uint64 UL_MBR; // integer type
+ kal_bool DL_AMBR_present;
+ kal_uint64 DL_AMBR; // integer type
+ kal_bool UL_AMBR_present;
+ kal_uint64 UL_AMBR; // integer type
+} at_cgeqosrdp_ind_struct;
+
+//+CG5QOS
+//SET command: +CG5QOS=[<cid>[,<5QI>[,<DL_GFBR>,<UL_GFBR>[,<DL_MFBR>,<UL_MFBR]]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum VQI_parse_result;
+ kal_uint32 VQI; // integer type
+ at_token_parse_result_enum DL_GFBR_parse_result;
+ kal_uint64 DL_GFBR; // integer type
+ at_token_parse_result_enum UL_GFBR_parse_result;
+ kal_uint64 UL_GFBR; // integer type
+ at_token_parse_result_enum DL_MFBR_parse_result;
+ kal_uint64 DL_MFBR; // integer type
+ at_token_parse_result_enum UL_MFBR_parse_result;
+ kal_uint64 UL_MFBR; // integer type
+} at_c5gqos_req_struct;
+
+//READ response = [+CG5QOS: <cid>,<5QI>[,<DL_GFBR>,<UL_GFBR>[,<DL_MFBR>,<UL_MFBR>]]]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool VQI_present;
+ kal_uint32 VQI; // integer type
+ kal_bool DL_GFBR_present;
+ kal_uint64 DL_GFBR; // integer type
+ kal_bool UL_GFBR_present;
+ kal_uint64 UL_GFBR; // integer type
+ kal_bool DL_MFBR_present;
+ kal_uint64 DL_MFBR; // integer type
+ kal_bool UL_MFBR_present;
+ kal_uint64 UL_MFBR; // integer type
+} at_c5gqos_ind_struct;
+
+//+CG5QOSRDP
+//SET command: +CG5QOSRDP[=<cid>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_c5gqosrdp_req_struct;
+
+//READ response = [+CG5QOSRDP: <cid>,<5QI>[,<DL_GFBR>,<UL_GFBR>[,<DL_MFBR>,<UL_MFBR>[,<DL_SAMBR>,<UL_SAMBR>[,<Averaging_window>]]]]]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool VQI_present;
+ kal_uint32 VQI; // integer type
+ kal_bool DL_GFBR_present;
+ kal_uint64 DL_GFBR; // integer type
+ kal_bool UL_GFBR_present;
+ kal_uint64 UL_GFBR; // integer type
+ kal_bool DL_MFBR_present;
+ kal_uint64 DL_MFBR; // integer type
+ kal_bool UL_MFBR_present;
+ kal_uint64 UL_MFBR; // integer type
+ kal_bool DL_SAMBR_present;
+ kal_uint64 DL_SAMBR; // integer type
+ kal_bool UL_SAMBR_present;
+ kal_uint64 UL_SAMBR; // integer type
+ kal_bool Averaging_window_present;
+ kal_uint32 Averaging_window; // integer type
+} at_c5gqosrdp_ind_struct;
+
+//+CGDEL
+//SET command: +CGDEL[=<cid>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgdel_req_struct;
+
+//READ response = [+CGDEL: <cid>[,<cid>[,...]]]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+} at_cgdel_ind_struct;
+
+//+CGAUTH
+//SET command: +CGAUTH=<cid>[,<auth_prot>[,<userid>[,<password>]]]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum auth_prot_parse_result;
+ atcmd_auth_prot_enum auth_prot; // integer type
+ at_token_parse_result_enum userid_parse_result;
+ kal_uint8 userid[USERID_STRING_LEN]; // string type
+ at_token_parse_result_enum password_parse_result;
+ kal_uint8 password[PASSWORD_STRING_LEN]; // string type
+} at_cgauth_req_struct;
+
+//READ response = [+CGAUTH: <cid>,<auth_prot>,<userid>,<password>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool auth_prot_present;
+ atcmd_auth_prot_enum auth_prot; // integer type
+ kal_bool userid_present;
+ kal_uint8 userid[USERID_STRING_LEN]; // string type
+ kal_bool password_present;
+ kal_uint8 password[PASSWORD_STRING_LEN]; // string type
+} at_cgauth_ind_struct;
+
+//+CLADN
+//SET command: +CGAUTH=[<n>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum n_parse_result;
+ atcmd_cladn_n_enum n; // interger type
+} at_cladn_req_struct;
+
+//READ response = [+CLADN: <n>,<ladn_information_length>,<ladn_information>]
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool n_present;
+ kal_uint8 n; // integer type
+ kal_bool ladn_information_length_present;
+ kal_uint16 ladn_information_length;
+ kal_bool ladn_information_present;
+ kal_uint8 ladn_information[LADN_INFO_LEN];
+} at_cladn_ind_struct;
+
+//+CLADNU: <ladn_information_length>,<ladn_information>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool ladn_information_length_present;
+ kal_uint16 ladn_information_length;
+ kal_bool ladn_information_present;
+ kal_uint8 ladn_information[LADN_INFO_LEN];
+} at_cladnu_ind_struct;
+
+//+ECNCFG
+//SET command: +ECNCFG=[<mobile_data>], [<data_roaming>],[<volte>], [<ims_test_mode>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum mobile_data_parse_result;
+ atcmd_mobile_data_enum mobile_data; // integer type
+ at_token_parse_result_enum data_roaming_parse_result;
+ atcmd_data_roaming_enum data_roaming; // integer type
+ at_token_parse_result_enum volte_parse_result;
+ atcmd_volte_enum volte; // integer type
+ at_token_parse_result_enum ims_test_mode_parse_result;
+ atcmd_ims_test_mode_enum ims_test_mode; // integer type
+} at_ecncfg_req_struct;
+
+//+EGDCONT
+//SET command: +EGDCONT=<cid>,<roaming_ip_type>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum roaming_ip_type_parse_result;
+ kal_uint8 roaming_ip_type[ROAMING_IP_TYPE_STRING_LEN]; // string type
+} at_egdcont_req_struct;
+
+//+VZWAPNETMR
+//SET command: +VZWAPNETMR=<wapn>,<max_conn>,<max_conn_t>,<wait_time>,<throttle_time>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum wapn_parse_result;
+ kal_uint32 wapn; // integer type
+ at_token_parse_result_enum max_conn_parse_result;
+ kal_uint32 max_conn; // integer type
+ at_token_parse_result_enum max_conn_t_parse_result;
+ kal_uint32 max_conn_t; // integer type
+ at_token_parse_result_enum wait_time_parse_result;
+ kal_uint32 wait_time; // integer type
+ at_token_parse_result_enum throttle_time_parse_result;
+ kal_uint32 throttle_time; // integer type
+} at_vzwapnetmr_req_struct;
+
+//READ response = +VZWAPNETMR: <wapn>,<max_conn>,<max_conn_t>,<wait_time>,<throttle_time>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool wapn_present;
+ kal_uint32 wapn; // integer type
+ kal_bool max_conn_present;
+ kal_uint32 max_conn; // integer type
+ kal_bool max_conn_t_present;
+ kal_uint32 max_conn_t; // integer type
+ kal_bool wait_time_present;
+ kal_uint32 wait_time; // integer type
+ kal_bool throttle_time_present;
+ kal_uint32 throttle_time; // integer type
+} at_vzwapnetmr_ind_struct;
+
+//+VZWAPNE
+//SET command: +VZWAPNE[=<wapn>,<apncl>,<apnni>,<apntype>,<apnb>,<apned>,<apntimer>,<s-nssai>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum wapn_parse_result;
+ kal_uint32 wapn; // integer type
+ at_token_parse_result_enum apncl_parse_result;
+ kal_uint32 apncl; // integer type
+ at_token_parse_result_enum apnni_parse_result;
+ kal_uint8 apnni[APNNI_STRING_LEN]; // string type
+ at_token_parse_result_enum apntype_parse_result;
+ kal_uint8 apntype[APNTYPE_STRING_LEN]; // string type
+ at_token_parse_result_enum apnb_parse_result;
+ kal_uint8 apnb[APNB_STRING_LEN]; // string type
+ at_token_parse_result_enum apned_parse_result;
+ kal_uint8 apned[APNED_STRING_LEN]; // string type
+ at_token_parse_result_enum apntimer_parse_result;
+ kal_uint32 apntimer; // integer type
+ at_token_parse_result_enum s_nssai_parse_result;
+ at_s_nssai_struct s_nssai;
+} at_vzwapne_req_struct;
+
+//READ response = +VZWAPNE: <wapn>,<apncl>,<apnni>,<apntype>,<apnb>,<apned>,<apntimer>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool wapn_present;
+ kal_uint32 wapn; // integer type
+ kal_bool apncl_present;
+ kal_uint32 apncl; // integer type
+ kal_bool apnni_present;
+ kal_uint8 apnni[APNNI_STRING_LEN]; // string type
+ kal_bool apntype_present;
+ kal_uint8 apntype[APNTYPE_STRING_LEN]; // string type
+ kal_bool apnb_present;
+ kal_uint8 apnb[APNB_STRING_LEN]; // string type
+ kal_bool apned_present;
+ kal_uint8 apned[APNED_STRING_LEN]; // string type
+ kal_bool apntimer_present;
+ kal_uint32 apntimer; // integer type
+} at_vzwapne_ind_struct;
+
+//+EGPAU
+//SET command: +EGPAU=<op>,<cid>[,<auth_type>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum op_parse_result;
+ atcmd_op_enum op; // integer type
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum auth_type_parse_result;
+ atcmd_auth_type_enum auth_type; // integer type
+} at_egpau_req_struct;
+
+//READ response = +EGPAU: <auth_type>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool auth_type_present;
+ atcmd_auth_type_enum auth_type; // integer type
+} at_egpau_ind_struct;
+
+//+EGACT
+//SET command: +EGACT=<state>,<cid>,<rat>,<deact_cause>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum state_parse_result;
+ atcmd_state_enum state; // integer type
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum rat_parse_result;
+ atcmd_rat_enum rat; // integer type
+ at_token_parse_result_enum deact_cause_parse_result;
+ atcmd_deact_cause_enum deact_cause; // integer type
+} at_egact_req_struct;
+
+//+CGSDATA
+//SET command: +CGSDATA=<byte>,<cid>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum byte_parse_result;
+ kal_uint32 byte; // integer type
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_cgsdata_req_struct;
+
+//+ACTTEST
+//SET command: +ACTTEST=<state> ,<cid>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum state_parse_result;
+ atcmd_state_enum state; // integer type
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_acttest_req_struct;
+
+//+PSBEARER
+//SET command: +PSBEARER=<mode>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum psbearer_mode_parse_result;
+ atcmd_psbearer_mode_enum psbearer_mode; // integer type
+} at_psbearer_req_struct;
+
+//READ response = +PSBEARER: <cell_data_speed_support>,<max_data_bearer_capability>,<scell_number_dl>,<scell_number_ul>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cell_data_speed_support_present;
+ atcmd_cell_data_speed_support_enum cell_data_speed_support; // integer type
+ kal_bool max_data_bearer_capability_present;
+ atcmd_max_data_bearer_capability_enum max_data_bearer_capability; // integer type
+ kal_bool scell_number_dl_present;
+ kal_uint32 scell_number_dl; // integer type
+ kal_bool scell_number_ul_present;
+ kal_uint32 scell_number_ul; // integer type
+} at_psbearer_ind_struct;
+
+//+EGFB
+//SET command: +EGFB=<fallback_enable>,<ipv4_first>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum fallback_enable_parse_result;
+ atcmd_fallback_enable_enum fallback_enable; // integer type
+ at_token_parse_result_enum ipv4_first_parse_result;
+ atcmd_ipv4_first_enum ipv4_first; // integer type
+} at_egfb_req_struct;
+
+//READ response = +EGFB: <fallback_enable>,<ipv4_first>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool fallback_enable_present;
+ atcmd_fallback_enable_enum fallback_enable; // integer type
+ kal_bool ipv4_first_present;
+ atcmd_ipv4_first_enum ipv4_first; // integer type
+} at_egfb_ind_struct;
+
+//+EGLD
+//SET command: +EGLD=<cid>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_egld_req_struct;
+
+//+EGDELPF
+//SET command: +EGDELPF=<cid>,<pfid>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum pfid_parse_result;
+ kal_uint32 pfid; // integer type
+} at_egdelpf_req_struct;
+
+//READ response = +EGDELPF: <cid>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_uint32 egdel_pfid_count;
+ kal_uint32 egdel_pfid[MAX_PACKET_FILTER_COUNT];
+} at_egdelpf_ind_struct;
+
+//+EGLNKPF
+//SET command: +EGLNKPF=<cid>,<linked_pfid>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum linked_pfid_parse_result;
+ kal_uint32 linked_pfid; // integer type
+} at_eglnkpf_req_struct;
+
+//READ response = +EGLNKPF: <cid>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_uint32 eglnk_pfid_count;
+ kal_uint32 eglnk_pfid[MAX_PACKET_FILTER_COUNT];
+} at_eglnkpf_ind_struct;
+
+//+EGPCORDP
+//SET command: +EGPCORDP=<cid>[,<IE>]
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum IE_parse_result;
+ kal_uint8 IE[IE_STRING_LEN]; // string type
+} at_egpcordp_req_struct;
+typedef at_egpcordp_req_struct at_bgpcordp_req_struct;
+
+//READ response = +EGPCORDP: <cid>, <IE>, <contents>
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool IE_present;
+ kal_uint8 IE[IE_STRING_LEN]; // string type
+ kal_bool contents_present;
+ kal_uint8 contents[AT_EGPCORDP_CONTENTS_STRING_LEN]; // string type
+} at_egpcordp_ind_struct;
+typedef at_egpcordp_ind_struct at_bgpcordp_ind_struct;
+
+//+EGPCO
+//SET command: +EGPCO=<cid>,<IE>,<content>[,<IE>,<content>[,...]]
+typedef struct{
+ at_token_parse_result_enum ID_parse_result;
+ kal_uint8 ID[IE_STRING_LEN]; // string type
+ at_token_parse_result_enum contents_parse_result;
+ kal_uint8 contents[EGPCO_IE_CONTENTS_STRING_LEN]; // string type
+}egpco_ie_struct;
+
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ kal_uint8 IE_count;
+ egpco_ie_struct IE[MAX_IE_COUNT];
+} at_egpco_req_struct;
+
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool ID_present;
+ kal_uint8 ID[IE_STRING_LEN]; // string type
+ kal_bool contents_present;
+ kal_uint8 contents[EGPCO_IE_CONTENTS_STRING_LEN]; // string type
+} at_egpco_ind_struct;
+
+//+EDALLOW
+//SET command: +EDALLOW=<is_data_allowed>
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum is_data_allowed_parse_result;
+ atcmd_is_data_allowed_enum is_data_allowed; // integer type
+} at_edallow_req_struct;
+
+
+
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool apn_index_present;
+ kal_uint8 apn_index; // integer type
+ kal_bool apn_present;
+ kal_uint8 apn[APN_STRING_LEN]; // string type
+ kal_bool inactivity_time_present;
+ kal_uint32 inactivity_time; // integer type
+} at_eapnsync_ind_struct;
+
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum apn_index_parse_result;
+ kal_uint8 apn_index; // integer type
+ at_token_parse_result_enum apn_parse_result;
+ kal_uint8 apn[APN_STRING_LEN]; // string type
+ at_token_parse_result_enum inactivity_time_parse_result;
+ kal_uint32 inactivity_time; // integer type
+} at_eapnsync_req_struct;
+
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool mode_present;
+ kal_uint8 mode; // integer type
+} at_evzwapfcia_ind_struct;
+
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum mode_parse_result;
+ kal_uint8 mode; // integer type
+} at_evzwapfcia_req_struct;
+
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool cid_present;
+ kal_uint32 cid; // integer type
+ kal_bool processing_time_limit_in_secs_present;
+ kal_uint32 processing_time_limit_in_secs; // integer type
+} at_eggrntrspt_ind_struct;
+
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+ at_token_parse_result_enum processing_time_limit_in_secs_parse_result;
+ kal_uint32 processing_time_limit_in_secs; // integer type
+} at_eggrntrspt_req_struct;
+
+typedef struct
+{
+ ATCMD_HDR
+} at_egpcap_req_struct;
+
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool max_pdp_support_num_present;
+ kal_uint32 max_pdp_support_num;
+ kal_bool max_epsb_support_num_present;
+ kal_uint32 max_epsb_support_num;
+} at_egpcap_test_mode_ind_struct;
+
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_bool ladn_info_len_present;
+ kal_uint8 ladn_info_len;
+ kal_bool ladn_info_present;
+ kal_uint8 ladn_info[LADN_INFO_LEN]; // integer type
+} at_crladn_ind_struct;
+
+typedef struct
+{
+ ATCMD_HDR
+ at_token_parse_result_enum cid_parse_result;
+ kal_uint32 cid; // integer type
+} at_escontind_req_struct;
+
+#ifdef __TC01__
+//+ETIMER IND
+typedef struct
+{
+ kal_uint32 src_id;
+ kal_char apn[APN_STRING_LEN];
+ atcmd_backoff_timer_state_enum timer_state;
+ kal_uint32 cause; //TBD: if needed
+ kal_uint32 exp_time;
+} at_backoff_timer_ind_struct;
+#endif
+#endif /* _ATCMD_STRUCT_H */
diff --git a/mcu/interface/protocol/l4_c2k/c2k_api_public.h b/mcu/interface/protocol/l4_c2k/c2k_api_public.h
new file mode 100644
index 0000000..4ccc613
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/c2k_api_public.h
@@ -0,0 +1,41 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 _C2K_API_PUBLIC_H
+#define _C2K_API_PUBLIC_H
+
+kal_bool IRATIsEVDOStandbyRAT(void);
+kal_bool cuim_current_pin_lock_status(kal_uint8 sim_index);
+
+#endif // _C2K_API_PUBLIC_H
diff --git a/mcu/interface/protocol/l4_c2k/elt_msg_struct.h b/mcu/interface/protocol/l4_c2k/elt_msg_struct.h
new file mode 100644
index 0000000..3173a7d
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/elt_msg_struct.h
@@ -0,0 +1,5579 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 _ELT_MSG_STRUCT_H
+#define _ELT_MSG_STRUCT_H
+
+/*****************************************************************************
+*
+* FILE NAME :elt_msg_struct.h
+*
+* DESCRIPTION :
+*
+*
+* HISTORY :
+* See Log at end of file
+*
+*****************************************************************************/
+/*----------------------------------------------------------------------------
+ Include Files
+----------------------------------------------------------------------------*/
+#ifndef RLP_STATISTIC
+#define RLP_STATISTIC 1
+#endif
+#include "fcpdefs.h"
+#include "pafrlp.h"
+#include "valgps.h"
+#include "hlpdef.h"
+#include "hlpapi.h"
+#include "hlpmip.h"
+#include "do_rcpapi.h"
+#include "rtm.h"
+#include "rtmqos.h"
+#include "ParRlp.h"
+#include "rlp_data.h"
+#include "scc_prot.h"
+#include "pswapi.h"
+#include "lmdtdso.h"
+#include "valsmsapi.h"
+#include "do_slcapi.h"
+#include "do_clcapi.h"
+#include "clcidp.h"
+#include "lmddefs.h"
+#include "etsapi.h"
+#include "sysKeydef.h"
+#include "mmiapi.h"
+#include "valpswapi.h"
+#include "lecapi.h"
+#include "do_clc_msg_struct.h"
+
+
+/*** 1xRTT ***/
+/* MSG_ID_UTS_LMD_FWD_FCH_CFG_MSG */
+typedef struct
+{
+ LmdFwdChnlTypeT PhysChan;
+ kal_uint16 PrimaryNumBits;
+ kal_uint16 PrimaryRouting;
+ kal_uint16 SignalingNumBits;
+ kal_uint16 SignalingRouting;
+ kal_uint16 SignalingCategory;
+ kal_uint16 HeaderBits;
+ kal_uint8 NullFramePossible;
+
+} UtsLmdFwdFchCfgMsgT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsLmdFwdFchCfgMsgT msg;
+} uts_lmd_fwd_fch_cfg_msg_struct;
+
+/* MSG_ID_UTS_LMD_REV_FCH_CFG_MSG */
+typedef struct
+{
+ kal_uint16 PtRate;
+ kal_uint8 MuxPdu;
+ kal_uint8 Header;
+ kal_uint16 PtBits;
+ kal_uint16 SigBits;
+ kal_uint16 SigInsBits;
+ kal_uint8 NullFrame;
+ kal_uint8 HeaderSize;
+} UtsLmdRevFchCfgMsgT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsLmdRevFchCfgMsgT msg;
+} uts_lmd_rev_fch_cfg_msg_struct;
+
+typedef enum
+{
+ ELT_FIX_TXDRC_SET = 0,
+ ELT_FIX_TXDRC_DISABLE = 1
+}FcpTestFixDrcValModeE;
+
+typedef struct
+{
+ FcpTestFixDrcValModeE EltFixDrcValMode;
+ kal_uint8 EltFixDrcVal;
+} FcpTestFixDrcValMsg;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ FcpTestFixDrcValMsg msg;
+} elt_fcp_fix_drcval_msg_struct;
+
+
+/* MSG_ID_UTS_LMD_SVC_FSCH_CFG_MSG */
+typedef struct
+{
+ kal_uint8 FschId;
+ kal_uint8 LtuBits;
+ kal_uint16 NumLtu;
+ kal_uint8 MuxPduType;
+ kal_uint8 NumPdu;
+ kal_uint16 PduBits;
+ kal_uint8 PduHeaderBits;
+ kal_uint8 PduSrid;
+ kal_uint16 PrimaryRouting;
+ SysRlpFrameRateE PduRate;
+ SysMultiplexOptionT MuxOpt;
+ kal_uint32 MsgId;
+} UtsLmdSvcFschCfgMsgT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsLmdSvcFschCfgMsgT msg;
+} uts_lmd_svc_fsch_cfg_msg_struct;
+
+/* MSG_ID_UTS_LMD_SVC_RSCH_CFG_MSG */
+typedef struct
+{
+ kal_uint8 RschId;
+ kal_uint8 LtuBits;
+ kal_uint16 NumLtu;
+ kal_uint16 PduHeader;
+ kal_uint8 NumPdu;
+ kal_uint8 NumFilledPdu;
+ kal_uint8 MuxPduType;
+ kal_uint16 PduBits;
+ kal_uint8 HeaderBits;
+ SysMultiplexOptionT MuxOpt;
+ kal_uint8 TurboCoding;
+} UtsLmdSvcRschCfgMsgT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsLmdSvcRschCfgMsgT msg;
+} uts_lmd_svc_rsch_cfg_msg_struct;
+
+/* MSG_ID_UTS_LMD_FWD_TRAFFIC_BAD_FRAME_MSG */
+typedef struct
+{
+ LmdFwdChnlTypeT PhysChan;
+} UtsLmdFwdTrafficBadFrameMsgT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsLmdFwdTrafficBadFrameMsgT msg;
+} uts_lmd_fwd_traffic_bad_frame_msg_struct;
+
+/* MSG_ID_UTS_LMD_FWD_FER_STATS_MSG */
+typedef struct
+{
+ kal_uint16 fchFer;/* FFCH FER(%), kal_uint16, scale=Q8, format=%4.2f */
+ kal_uint16 schFer;/* FSCH FER(%), kal_uint16, scale=Q8, format=%4.2f */
+} UtsLmdFwdFerStatsMsgT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsLmdFwdFerStatsMsgT msg;
+} uts_lmd_fwd_fer_stats_msg_struct;
+
+/* MSG_ID_UTS_LMD_FWD_STATS_MSG */
+typedef struct
+{
+ kal_uint32 FSYNCT;
+ kal_uint32 FPAGET;
+ kal_uint32 FFCHT;
+ kal_uint32 FSCHT;
+ kal_uint32 FSYNCB;
+ kal_uint32 FPAGEB;
+ kal_uint32 FFCHB;
+ kal_uint32 FSCHB;
+} UtsLmdFwdStatsMsgT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsLmdFwdStatsMsgT msg;
+} uts_lmd_fwd_stats_msg_struct;
+
+/* MSG_ID_UTS_LMD_TDSO_FCH_RX_STATS_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ TdsoFundRxSpyT msg;
+/*
+ Counters[0] TDSO_E1_R1, kal_uint32, base=10
+ Counters[1] TDSO_E1_RD, kal_uint32, base=10
+ Counters[2] TDSO_E1_RO, kal_uint32, base=10
+ Counters[3] TDSO_E1_RB, kal_uint32, base=10
+ Counters[4] TDSO_E1_RFL, kal_uint32, base=10
+ Counters[5] TDSO_E1_RE, kal_uint32, base=10
+ Counters[6] TDSO_E1_RERR, kal_uint32, base=10
+ Counters[7] TDSO_EN_RN, kal_uint32, base=10
+ Counters[8] TDSO_EN_RB, kal_uint32, base=10
+ Counters[9] TDSO_EN_RO, kal_uint32, base=10
+*/
+} uts_lmd_tdso_fch_rx_stats_msg_struct;
+
+/* MSG_ID_UTS_LMD_TDSO_FCH_TX_STATS_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ TdsoFundTxSpyT msg;
+/*
+ Counters[0] TDSO_E1_T1, kal_uint32, base=10
+ Counters[1] TDSO_E1_TD, kal_uint32, base=10
+ Counters[2] TDSO_E1_TB, kal_uint32, base=10
+ Counters[3] TDSO_EB_TB, kal_uint32, base=10
+ Counters[4] TDSO_EB_TO, kal_uint32, base=10
+
+*/
+} uts_lmd_tdso_fch_tx_stats_msg_struct;
+
+/* MSG_ID_UTS_LMD_TDSO_SUPP_TX_STATS_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ TdsoSuppTxSpyT msg;
+/*
+rate :
+ One Times Base Rate, 1,
+ Two Times Base Rate, 2,
+ Four Times Base Rate, 4,
+ Eight Times Base Rate, 8,
+ Sixteen Times Base Rate, 16,
+
+Counters[0] TDSO_ENx_TNx, kal_uint32, base=10
+Counters[1] TDSO_ENx_TB, kal_uint32, base=10
+Counters[2] TDSO_EB_TB, kal_uint32, base=10
+Counters[3] TDSO_EB_TO, kal_uint32, base=10
+
+*/
+
+} uts_lmd_tdso_supp_tx_stats_msg_struct;
+
+/* MSG_ID_UTS_LMD_TDSO_SUPP_RX_STATS_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ TdsoSuppRxSpyT msg;
+/*
+rate :
+ One Times Base Rate, 1,
+ Two Times Base Rate, 2,
+ Four Times Base Rate, 4,
+ Eight Times Base Rate, 8,
+ Sixteen Times Base Rate, 16,
+
+Counters[0] TDSO_ENx_RNx = 0,
+Counters[1] TDSO_ENx_RERR,
+Counters[2] TDSO_ENx_RE,
+Counters[3] TDSO_ENx_RB,
+Counters[4] TDSO_EB_RB,
+Counters[5] TDSO_EB_RO,
+
+*/
+} uts_lmd_tdso_supp_rx_stats_msg_struct;
+
+/* MSG_ID_UTS_LMD_TDSO_SUPP_PDU_RX_STATS_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ TdsoSuppPduRxSpyT msg;
+/*
+
+ Counters[0] TDSO_E3_R3, kal_uint32, base=10
+ Counters[1] TDSO_E3_RERR, kal_uint32, base=10
+ Counters[2] TDSO_E3_RE, kal_uint32, base=10
+ Counters[3] TDSO_E2_R2, kal_uint32, base=10
+ Counters[4] TDSO_E2_RERR, kal_uint32, base=10
+ Counters[5] TDSO_E2_RE, kal_uint32, base=10
+ Counters[6] TDSO_E1a_R1a, kal_uint32, base=10
+ Counters[7] TDSO_E1a_RERR, kal_uint32, base=10
+ Counters[8] TDSO_E1a_RE, kal_uint32, base=10
+ Counters[9] TDSO_E1b_R1b, kal_uint32, base=10
+ Counters[10] TDSO_E1b_RERR, kal_uint32, base=10
+ Counters[11] TDSO_E1b_RE, kal_uint32, base=10
+
+*/
+} uts_lmd_tdso_supp_pdu_rx_stats_msg_struct;
+
+
+/* MSG_ID_UTS_XRLP_FWD_FRAME_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ RlpFrameEvent msg;
+} uts_xrlp_fwd_frame_msg_struct;
+
+/* MSG_ID_UTS_XRLP_REV_FRAME_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ RlpFrameEvent msg;
+} uts_xrlp_rev_frame_msg_struct;
+
+/* MSG_ID_UTS_XRLP_EVENT_STATS_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ RlpStatsEvent msg;
+} uts_xrlp_event_stats_msg_struct;
+
+/* MSG_ID_UTS_PSW_LOC_TX_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 data[255];
+} uts_psw_loc_tx_msg_struct;
+
+/* MSG_ID_UTS_PSW_LOC_RX_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 data[255];
+} uts_psw_loc_rx_msg_struct;
+
+/* MSG_ID_UTS_PE_ERI_VAL_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRoamIndicationMsgT msg;
+} uts_pe_eri_val_msg_struct;
+
+
+/* MSG_ID_UTS_PE_QPCH_MEAS_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ QpchSpyData msg;
+} uts_pe_qpch_meas_msg_struct;
+
+/* MSG_ID_UTS_SCC_PS_PKT_HAT_HT_TMR_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_bool HAindicator;
+ kal_bool HATStart;
+ kal_bool HTStart;
+} uts_scc_ps_pkt_hat_ht_tmr_msg_struct;
+
+/* MSG_ID_UTS_SCC_PS_PKT_ZONE_LIST_MSG */
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 len;
+ kal_uint8 num;
+ PZone list[SOC_PKT_CON_LIST_LEN_MAX];
+} uts_scc_ps_pkt_zone_list_msg_struct;
+
+/* MSG_ID_UTS_PE_MSG_WAITING_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 msgCount;
+} uts_pe_msg_waiting_msg_struct;
+
+/* MSG_ID_UTS_PE_SIGNAL_INFO_RECORD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 signalType;
+ kal_uint32 alertPitch;
+ kal_uint32 signal;
+} uts_pe_signal_info_record_msg_struct;
+/* MSG_ID_UTS_PSW_REPORT_EVENT_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CallProcessingEventT evntType;
+} uts_psw_report_event_msg_struct;
+
+/* MSG_ID_UTS_PS_SMS_SUCC_BS_SMS_ACK_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint16 seqNum;
+} uts_ps_sms_succ_bs_sms_ack_msg_struct;
+
+/* VAL SMS */
+typedef enum
+{
+ SMS_ELT_UIM,
+ SMS_ELT_FLASH
+} ValSmsEltStorageT;
+
+typedef enum
+{
+ SMS,
+ EMS
+} ValSmsEltEmsFlagT;
+
+typedef enum
+{
+ ASCII,
+ UNICODE
+} ValSmsEltPhbTypeT;
+
+typedef enum
+{
+ DontSave,
+ Save
+} ValSmsEltSaveT;
+
+typedef enum
+{
+ NotConfirmed,
+ Confirmed
+} ValSmsEltConfirmationT;
+
+typedef enum
+{
+ SMS_ERROR_CLASS_NO_ERROR,
+ SMS_ERROR_CLASS_RSVD,
+ SMS_ERROR_CLASS_TEMP,
+ SMS_ERROR_CLASS_PERM
+} ValSmsEltErrClassT;
+
+/* MSG_ID_UTS_SMS_ETS_API_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 Event;
+ /* Event, kal_uint8, base=enum:Added/Deleted/Modified/Received/Sent */
+ ValSmsEltStorageT Storage;
+ kal_uint16 Index;
+} uts_sms_ets_api_msg_struct;
+
+/* MSG_ID_UTS_OTASP_UPDATE_DATA_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+} uts_otasp_update_data_msg_struct;
+
+/* MSG_ID_UTS_CP_STATE_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CPState state;
+} uts_cp_state_msg_struct;
+
+
+/* for spy measurement results */
+typedef struct
+{
+ kal_bool Valid;
+ kal_uint16 PnPhase;
+ kal_uint8 PnOffset;
+ kal_uint8 EcIo; /* unit: -0.5dB */
+} PswPilotMeasResultT;
+
+typedef struct
+{
+ kal_int16 PilotSeq;
+ kal_uint16 ReferencePN;
+ kal_uint8 NumActive; /* Number of active set pilot measurements */
+ kal_uint8 NumCandidate; /* Number of candidate set pilot measurements */
+ kal_uint8 NumNeighbor; /* Number of neighbor set pilot measurements */
+ kal_uint8 NumRemaining; /* Number of remaining set pilot measurements */
+ PswPilotMeasResultT Active [SYS_CP_MAX_ACTIVE_LIST_PILOTS];
+ PswPilotMeasResultT Candidate [SYS_CP_MAX_CANDIDATE_LIST_PILOTS];
+ PswPilotMeasResultT Neighbor [SYS_CP_MAX_NEIGHBOR_LIST_PILOTS];
+ PswPilotMeasResultT Remaining [SYS_CP_MAX_NEIGHBOR_LIST_PILOTS];
+} UtsPswMeasurementResultMsgT;
+
+/* MSG_ID_UTS_PSW_MEASUREMENT_RESULT_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsPswMeasurementResultMsgT msg;
+} uts_psw_measurement_result_msg_struct;
+
+typedef struct
+{
+ kal_bool match;
+ kal_int8 mismatchStep;
+ CPState cpState;
+ CpIdleSubStateT idleSubState;
+ kal_int8 accessReason;
+ kal_bool pageDuplicate;
+ kal_bool voiceAllowed;
+ SysServiceTypeT currServiceType;
+ SysServiceTypeT pagingServiceType;
+ kal_int16 prevSoInSameGpm;
+ kal_int8 pendedUserEvent;
+ kal_bool e911Mode;
+ kal_bool isPoweringDown;
+ kal_bool SBP_STATUS_SPRINT_SMS;
+ kal_bool CP_1XMO_BKOFF_TIMER;
+ kal_bool CP_SILENT_RETRY_RESET_TIMER;
+ ConnStateT HlpGetCurrentConnStatus;
+ NspeAppT AppType;
+ kal_int8 HlpCheckCAMState;
+ kal_bool ddtmEnabled;
+ kal_bool UiccDbmIsUimModeDisabled;
+ kal_bool PswUiccGetFactoryMode;
+ UiccCardStatusType PswUimGetUimCardStatus;
+#ifdef MTK_DEV_C2K_IRAT
+ kal_bool IRATGet1XRegEnabled;
+ kal_bool IRATGet1XPSEnabled;
+ rsvas_sim_enum rsvasGetCurrentSimId;
+#endif
+} UtsPswIngoreMatchedPageParamMsgT;
+
+/* MSG_ID_UTS_PSW_IGNORE_MATCHED_PAGE_PARAM_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsPswIngoreMatchedPageParamMsgT msg;
+} uts_psw_ignore_matched_page_param_msg_struct;
+
+
+/*** EVDO ***/
+/** FCP **/
+/* DSAF */
+typedef struct
+{
+ DoChanTypeT chanType;
+ kal_uint16 subType;
+ kal_uint16 dataLen;
+ kal_uint8 data[600];
+} UtsFcpSnpRawDataMsgT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsFcpSnpRawDataMsgT msg;
+} uts_cp_fcp_snp_raw_data_msg_struct;
+
+/* PAF */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ EVDORLPStatsMeasT msg;
+} uts_cp_fcp_paf_dparlp_stat_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ EVDORevAFwdMFRLPStatsMeasT FwdMFRLPStats[4];
+} uts_cp_fcp_paf_mfparlp_stat_msg_struct;
+
+/* FTM */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PacketRecSpyT msg;
+
+ /*
+ packetRec array of 32 elements
+ Drc_C2i array of 32 elements
+ */
+} uts_cp_fcp_packet_rec_cdm_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ FcpPacketPerfStatT msg;
+ /*
+ TotalBits, kal_uint32, scale=Q3, format=%10.2f
+ FwdPER(percent), kal_uint16, scale=Q8, format=%4.2f
+ AN_ThrPut(kbps), kal_uint16, scale=Q4, format=%4.2f
+ AT_ThrPut(kbps), kal_uint16, scale=Q4, format=%4.2f
+ */
+} uts_cp_fcp_perf_stat_msg_struct;
+
+/* MSG_ID_ELT_CCM_SUPERVISION_EXPIRED_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ EltCcmSupervisionExpiredRspMsgT msg;
+} elt_ccm_supervision_expired_rsp_msg_struct;
+
+/** RCP **/
+/* DSAR */
+typedef struct
+{
+ DoChanTypeT chanType;
+ kal_uint16 subType;
+ kal_uint16 protocolType;
+ kal_uint16 dataLen;
+ kal_uint8 data[300];
+} UtsRcpSnpRawDataMsgT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UtsRcpSnpRawDataMsgT msg;
+} uts_cp_rcp_snp_raw_data_msg_struct;
+
+/* PAR */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ EVDORevARevMFRLPStatsMeasT RlpStatsMeas[4];
+} uts_cp_rcp_par_rlp_stat_msg_struct;
+
+/* RTM */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ Rtm3SpyPktInfoStatesT Rtm3SpyPktInfoStates[RTM_MAX_STATES_SPY_SUBFR_NO];
+
+ /*
+ TransmitMode, kal_uint8, base=enum:0: HICAP/1: LOLAT
+ txT2Pmax, kal_uint16, scale=Q2, format=%10.8f
+ potentialT2POutflow0, kal_uint32, scale=Q8, format=%10.8f
+ */
+} uts_cp_rcp_rtm3_packet_info_states_msg_struct;
+/* MSG_ID_UTS_CP_RCP_RTM3_STATES_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ Rtm3SpyStatesT Rtm3SpyStates[RTM_MAX_STATES_SPY_SUBFR_NO];
+ /*
+ TransmitModeAck, kal_uint8, base=10, base=enum:0: HICAP/1: LOLAT
+ TransmitModeNak, kal_uint8, base=10, base=enum:0: HICAP/1: LOLAT
+ TransmitMode, kal_uint8, base=10, base=enum:0: HICAP/1: LOLAT
+ */
+} uts_cp_rcp_rtm3_states_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ RtmQoSSpyDataT RtmQoSSpyData[RTM_QOS_SPY_SUBFR_NO];
+ /*
+ txT2P, kal_uint16, scale=Q7, format=%10.8f, indent=1
+ pilotStrength, kal_int16, scale=Q2, format=%10.8f
+ frab, kal_int8, scale=Q7, format=%10.8f
+ t2POutflow0, kal_int32, scale=Q8, format=%10.8f
+ bucketLevelSat0, kal_int32, scale=Q7, format=%10.8f
+ deltaT2PInflow0, kal_int32, scale=Q8, format=%10.8f
+ t2PInflow0, kal_int32, scale=Q8, format=%10.8f
+ bucketLevel0, kal_int32, scale=Q6, format=%10.8f
+ bucketFactor0, kal_int32, scale=Q8, format=%10.8f
+ */
+
+} uts_cp_rcp_rtm3_t2p_stat_states_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 combBB;
+ kal_uint8 currRate;
+ kal_uint8 x;
+ kal_uint8 transProb;
+ kal_uint8 maxRate;
+} uts_cp_rcp_rtm_grant7_msg_struct;
+
+
+/* TXH */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ RcpTxAgcDataT msg;
+ /*
+ TxAgcMode kal_uint16, base=enum:RCP Tx AGC Type {RPC_TXAGC_DISABLED / RPC_TXAGC_DO_ACCESS / RPC_TXAGC_DO_TRAFFIC / RPC_TXAGC_1xRTT_REVERSE / RPC_TXAGC_TEST_MODE}
+ TxGainStateSlot, kal_uint16, base=enum:RCP Tx AGC Gain State {HWD_LOW_GAIN_STATE / HWD_MED_GAIN_STATE / HWD_HIGH_GAIN_STATE}
+ TxGainStateHslot, kal_uint16, base=enum:RCP Tx AGC Gain State{HWD_LOW_GAIN_STATE / HWD_MED_GAIN_STATE / HWD_HIGH_GAIN_STATE}
+
+ PowerBaseALog2 (Alog2), kal_int16, scale=Q7, format=%4.2f
+ OpenLoopRxPwrFiltALog2 (Alog2), kal_int16, scale=Q7, format=%4.2f
+ PowerBase (dBm), kal_int16, scale=Q7, format=%4.2f
+ OpenLoopRxPwrFilt (dBm), kal_int16, scale=Q7, format=%4.2f
+
+ CloseLoopAdjALog2 (Alog2), kal_int16, scale=Q7, format=%4.2f
+ CloseLoopAdj (dBm), kal_int16, scale=Q7, format=%4.2f
+
+ UnadjPwrALog2 (Alog2), kal_int16, scale=Q7, format=%4.2f
+ TotalAdjALog2 (Alog2), kal_int16, scale=Q7, format=%4.2f
+ TxPwrALog2Slot (Alog2), kal_int16, scale=Q7, format=%4.2f
+ TxPwrALog2Hslot (Alog2), kal_int16, scale=Q7, format=%4.2f
+ UnadjPwr (dBm), kal_int16, scale=Q7, format=%4.2f
+ TotalAdj (dBm), kal_int16, scale=Q7, format=%4.2f
+ TotalTxPwrSlot (dBm), kal_int16, scale=Q7, format=%4.2f
+ TotalTxPwrHslot(dBm), kal_int16, scale=Q7, format=%4.2f
+
+ Slot_Ks (linear), kal_uint16, scale=Q7, format=%4.2f
+ Slot_KsALog2 (Alog2), kal_int16, scale=Q7, format=%4.2f
+ Slot_KsDbm (dBm), kal_int16, scale=Q7, format=%4.2f
+
+ Hslot_Ks (linear), kal_uint16, scale=Q7, format=%4.2f
+ Hslot_KsALog2 (Alog2), kal_int16, scale=Q7, format=%4.2f
+ Hslot_KsDbm (dBm), kal_int16, scale=Q7, format=%4.2f
+
+ TotalMaxTxPwrALog2(ALog2), kal_int16, scale=Q7, format=%4.2f
+ TotalMaxTxPwr(dBm), kal_int16, scale=Q7, format=%4.2f
+
+ TotalMinTxPwrALog2 (ALog2), kal_int16, scale=Q7, format=%4.2f
+ TotalMinTxPwr (dBm), kal_int16, scale=Q7, format=%4.2f
+
+ TxDacValueSlot, kal_uint16, base=16
+ TxDacValueHslot, kal_uint16, base=16
+ */
+
+} uts_cp_rcp_txagc_msg_struct;
+
+/** define Tx AGC control command message */
+/** MSG_ID_ELT_RCP_TX_AGC_CTRL_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ RcpTstTxAgcCtrlCmdT Msg;
+} elt_rcp_tx_agc_ctrl_cmd_msg_struct;
+
+/** define Tx AGC control response message */
+/** MSG_ID_ELT_RCP_TX_AGC_CTRL_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ RcpTstTxAgcCtrlRspT Msg;
+} elt_rcp_tx_agc_ctrl_rsp_msg_struct;
+
+/** CLC **/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ MonSpyL3StateT msg;
+ /* Begin Enum, AlmpState:Init,0; Idle,1; ConnectionSetup,2; Connected,3; End */
+ /* Begin Enum, InspState:Inactive,0; NetworkDetermination,1; PilotAcq,2;
+ * Sync,3; TimingChange,4; INSP_WFR_1XASSIST_SIG,5;
+ * End
+ */
+ /* Begin Enum, IdpState:Inactive,0; Monitor,1; Sleep,2; ConnectionSetup,3;
+ * FreezePending,4; Freeze,5; ConnFrozen,6; WaitFor1XAssistAcqSignal,7;
+ * End
+ */
+ /* Begin Enum, CspState:Inactive,0; Closing,1; Open,2; End */
+ /* Begin Enum, RupState:Inactive,0; Idle,1; Connected,2; IRAT_MEASURE,3; End */
+ /* Begin Enum, OmpState:Inactive,0; Active,1; End */
+ /* bHybridOn:0->Off, 1->On. */
+} uts_cp_clc_l3_state_msg_struct;
+
+/** SLC **/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ MonSpySessionStateT msg;
+} uts_cp_slc_session_state_msg_struct;
+
+/** VAL **/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsLocationUpdateSpy2MsgT msg;
+/*
+Instance ID, kal_uint32
+LocationInfoIncl, kal_uint8, base=kal_bool
+
+Validity Mask, kal_uint32,exist=(LocationInfoIncl==1)
+UTC Time, ValGpsSystemTimeT,exist=(LocationInfoIncl==1)
+Latitude, kal_int32,exist=(LocationInfoIncl==1)
+Longitude, kal_int32,exist=(LocationInfoIncl==1)
+Speed, double,exist=(LocationInfoIncl==1)
+Heading, double,exist=(LocationInfoIncl==1)
+Magnetic Variation, double,exist=(LocationInfoIncl==1)
+Altitude WRT Sea Level, double,exist=(LocationInfoIncl==1)
+Altitude WRT Ellipsoid, double,exist=(LocationInfoIncl==1)
+Fix Quality, ValGpsFixQualityT,exist=(LocationInfoIncl==1)
+Fix Type, ValGpsFixTypeT,exist=(LocationInfoIncl==1)
+Selection Type, ValGpsSelectionTypeT,exist=(LocationInfoIncl==1)
+Position Dilution Of Precision, double,exist=(LocationInfoIncl==1)
+Horizontal Dilution Of Precision, double,exist=(LocationInfoIncl==1)
+Vertical Dilution Of Precision, double,exist=(LocationInfoIncl==1)
+Satellite Count, kal_uint32,exist=(LocationInfoIncl==1)
+Satellites Used PRNs, array,type=kal_uint32,maxsize=12,columns=16,exist=(LocationInfoIncl==1)
+Satellites In View, kal_uint32,exist=(LocationInfoIncl==1)
+Satellites In View PRNs, array,type=kal_uint32,maxsize=12,columns=16,exist=(LocationInfoIncl==1)
+Satellites In View Elevation, array,type=kal_uint32,maxsize=12,columns=16,exist=(LocationInfoIncl==1)
+Satellites In View Azimuth, array,type=kal_uint32,maxsize=12,columns=16,exist=(LocationInfoIncl==1)
+Satellites In View SNR, array,type=kal_uint32,maxsize=12,columns=16,exist=(LocationInfoIncl==1)
+GPS Position Error, record,type=VAL GPS Position Error Rec,maxsize=1,exist=(LocationInfoIncl==1)
+Fix Mode, kal_uint8,base=enum:VAL GPS Fix Mode,exist=(LocationInfoIncl==1)
+GPS Session Count, kal_uint32,exist=(LocationInfoIncl==1)
+Number Of Positions, kal_uint32,exist=(LocationInfoIncl==1)
+Horizontal Velocity, kal_uint32,exist=(LocationInfoIncl==1)
+Vertical Velocity, kal_uint32,exist=(LocationInfoIncl==1)
+
+*/
+} uts_cp_val_gps_loc_update_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsSearchEventRspSpyT msg;
+ /* SearchEvent:
+ CP_VAL_GPS_SEARCH_START,
+ CP_VAL_GPS_SEARCH_STOP,
+ CP_VAL_GPS_INPRORESS,
+ */
+
+ /* searchType
+ CP_VAL_GPS_FIX_MODE_UNKNOWN, 0,
+ CP_VAL_GPS_FIX_MODE_MSA,
+ CP_VAL_GPS_FIX_MODE_MSB,
+ CP_VAL_GPS_FIX_MODE_MSS,
+ CP_VAL_GPS_FIX_MODE_AFLT,
+ CP_VAL_GPS_FIX_MODE_SPEED_OPTIMAL,
+ CP_VAL_GPS_FIX_MODE_ACCURACY_OPTIMAL,
+ CP_VAL_GPS_FIX_MODE_DATA_OPTIMAL,
+ CP_VAL_GPS_FIX_MODE_CONTROL_PLANE,
+ CP_VAL_GPS_FIX_MODE_COUNT,
+ */
+} uts_cp_val_gps_search_event_msg_struct;
+
+/* MSG_ID_UTS_CP_VAL_GPS_SESS_EVENT_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsSessStateSpyT msg;
+}uts_cp_val_gps_sess_event_msg_struct;
+
+/* MSG_ID_UTS_CP_VAL_GPS_LOC_RESP_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsLocRespSpyT msg;
+}uts_cp_val_gps_loc_resp_msg_struct;
+
+/* MSG_ID_UTS_CP_VAL_GPS_CP_LOC_RESP_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsETSCpLocRespMsgT msg;
+}uts_cp_val_gps_cp_loc_resp_msg_struct;
+
+/* MSG_ID_ELT_GPS_IS801_FLOW_MS_RSP_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ PswIs801FlowMsRspMsg msg;
+}elt_gps_is801_flow_ms_rsp_msg_struct;
+
+/* MSG_ID_ELT_GPS_IS801_FLOW_MS_REQ_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ PswIs801FlowMsReqMsg msg;
+}elt_gps_is801_flow_ms_req_msg_struct;
+
+/* MSG_ID_ELT_GPS_IS801_FLOW_BS_REQ_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ PswIs801FlowBsReqMsg msg;
+}elt_gps_is801_flow_bs_req_msg_struct;
+
+/* MSG_ID_ELT_GPS_IS801_FLOW_BS_RSP_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ PswIs801FlowBsRspMsg msg;
+}elt_gps_is801_flow_bs_rsp_msg_struct;
+
+
+/* Trace spy end */
+
+/* elt cmd rsp start */
+/* Add ilm message */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValAllDataInitMsgT msg;
+} elt_val_all_data_init_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswPowerMsgT msg;
+} elt_val_power_ctrl_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_ACT_PROFILE_ID_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_act_profile_id_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_ACT_PROFILE_ID_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpActiveProfile_APIStruct msg;
+} elt_hlp_get_act_profile_id_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_ACT_PROFILE_ID_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpActiveProfile_APIStruct msg;
+} elt_hlp_set_act_profile_id_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_ACT_PROFILE_ID_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_act_profile_id_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_AN_NAI_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_an_nai_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_AN_NAI_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpANNAI_APIStruct msg;
+} elt_hlp_get_an_nai_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_AN_NAI_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpANNAI_APIStruct msg;
+} elt_hlp_set_an_nai_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_AN_NAI_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_an_nai_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_AN_PASSWORD_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_an_password_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_AN_PASSWORD_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpAnPassword_APIStruct msg;
+} elt_hlp_get_an_password_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_AN_PASSWORD_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpAnPassword_APIStruct msg;
+} elt_hlp_set_an_password_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_AN_PASSWORD_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_an_password_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_AN_BINARY_PASSWORD_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpAnBinaryPassword_APIStruct msg;
+} elt_hlp_set_an_binary_password_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_AN_BINARY_PASSWORD_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_an_binary_password_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_QNC_ENABLED_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_qnc_enabled_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_QNC_ENABLED_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpQncEnabled_APIStruct msg;
+} elt_hlp_get_qnc_enabled_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_QNC_ENABLED_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpQncEnabled_APIStruct msg;
+} elt_hlp_set_qnc_enabled_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_QNC_ENABLED_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_qnc_enabled_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_DATA_SO_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_data_so_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_DATA_SO_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpDataSOType SOType;
+} elt_hlp_get_data_so_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_DATA_SO_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpDataSOType SOType;
+} elt_hlp_set_data_so_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_DATA_SO_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_data_so_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_DORMANT_TIMER_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_dormant_timer_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_DORMANT_TIMER_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpDormantTimerData_APIStruct msg;
+} elt_hlp_get_dormant_timer_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_DORMANT_TIMER_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpDormantTimerData_APIStruct msg;
+} elt_hlp_set_dormant_timer_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_DORMANT_TIMER_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_dormant_timer_rsp_msg_struct;
+
+
+
+
+/* MSG_ID_ELT_HLP_GET_HSPD_PROFILE_DATA_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ kal_uint8 ProfileId;
+} elt_hlp_get_hspd_profile_data_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_HSPD_PROFILE_DATA_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpProfileData_APIStruct msg;
+} elt_hlp_get_hspd_profile_data_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_HSPD_PROFILE_DATA_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpProfileData_APIStruct msg;
+} elt_hlp_set_hspd_profile_data_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_HSPD_PROFILE_DATA_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_hspd_profile_data_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_HSPD_SECURE_SEG_PROFILE_DATA_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ kal_uint8 ProfileId;
+} elt_hlp_get_hspd_secure_seg_profile_data_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_HSPD_SECURE_SEG_PROFILE_DATA_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpSecureProfileData_APIStruct msg;
+} elt_hlp_get_hspd_secure_seg_profile_data_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_HSPD_SECURE_SEG_PROFILE_BYTE_DATA_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpSecureProfileData_APIStruct msg;
+} elt_hlp_set_hspd_secure_seg_profile_byte_data_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_HSPD_SECURE_SEG_PROFILE_BYTE_DATA_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_hspd_secure_seg_profile_byte_data_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_MIP_BINARY_PASSWORD_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ kal_uint8 ProfileId;
+} elt_hlp_get_mip_binary_password_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_MIP_BINARY_PASSWORD_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpMIPPasswordHex_APIStruct msg;
+} elt_hlp_get_mip_binary_password_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_MIP_BINARY_PASSWORD_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpMIPPasswordHex_APIStruct msg;
+} elt_hlp_set_mip_binary_password_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_MIP_BINARY_PASSWORD_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_mip_binary_password_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_REG_BACKOFF_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_reg_backoff_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_REG_BACKOFF_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpReRegBackoff_APIStruct msg;
+} elt_hlp_get_reg_backoff_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_REG_BACKOFF_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpReRegBackoff_APIStruct msg;
+} elt_hlp_set_reg_backoff_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_REG_BACKOFF_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_reg_backoff_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_NUM_REG_RETRIES_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_num_reg_retries_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_NUM_REG_RETRIES_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpNumRegRetries_APIStruct msg;
+} elt_hlp_get_num_reg_retries_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_NUM_REG_RETRIES_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpNumRegRetries_APIStruct msg;
+} elt_hlp_set_num_reg_retries_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_NUM_REG_RETRIES_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_num_reg_retries_rsp_msg_struct;
+
+
+/* MSG_ID_ELT_HLP_GET_MIP_MODE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_mip_mode_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_MIP_MODE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ IPServiceTypeT mipMode;
+} elt_hlp_get_mip_mode_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_MIP_MODE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ IPServiceTypeT mipMode;
+} elt_hlp_set_mip_mode_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_MIP_MODE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_mip_mode_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_MN_HA_AUTH_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_mn_ha_auth_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_MN_HA_AUTH_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HAAuthNumber MN_HA_Auth_mode;
+} elt_hlp_get_mn_ha_auth_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_MN_HA_AUTH_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HAAuthNumber MN_HA_Auth_mode;
+} elt_hlp_set_mn_ha_auth_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_MN_HA_AUTH_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_mn_ha_auth_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_NPKOID_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_npkoid_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_NPKOID_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpPKOID_APIStruct msg;
+} elt_hlp_get_npkoid_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_NPKOID_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpPKOID_APIStruct msg;
+} elt_hlp_set_npkoid_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_NPKOID_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_npkoid_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_NUM_PROFILE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_num_profile_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_NUM_PROFILE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpNumProfiles_APIStruct msg;
+} elt_hlp_get_num_profile_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_NUM_PROFILE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpNumProfiles_APIStruct msg;
+} elt_hlp_set_num_profile_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_NUM_PROFILE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_num_profile_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_SIP_NAI_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_sip_nai_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_SIP_NAI_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpSIPNAI_APIStruct msg;
+} elt_hlp_get_sip_nai_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_SIP_NAI_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpSIPNAI_APIStruct msg;
+} elt_hlp_set_sip_nai_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_SIP_NAI_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_sip_nai_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_SIP_DUN_NAI_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_sip_dun_nai_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_SIP_DUN_NAI_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpSIPDUNNAI_APIStruct msg;
+} elt_hlp_get_sip_dun_nai_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_SIP_DUN_NAI_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpSIPDUNNAI_APIStruct msg;
+} elt_hlp_set_sip_dun_nai_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_SIP_DUN_NAI_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_sip_dun_nai_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_SIP_BINARY_PASSWORD_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_sip_binary_password_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_SIP_BINARY_PASSWORD_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ kal_uint8 passwordLength;
+ kal_uint8 Password[16];
+ //HlpSIPDUNNAI_APIStruct msg;
+} elt_hlp_get_sip_binary_password_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_SIP_BINARY_PASSWORD_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpSIPPasswordHex_APIStruct msg;
+ //kal_uint8 passwordLength;
+ //kal_uint8 Password[16];
+} elt_hlp_set_sip_binary_password_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_SIP_BINARY_PASSWORD_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_sip_binary_password_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_DATA_PPP_UM_CONFIG_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+} elt_hlp_get_data_ppp_um_config_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_GET_DATA_PPP_UM_CONFIG_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+ HlpPppUmCfg_APIStruct msg;
+} elt_hlp_get_data_ppp_um_config_rsp_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_DATA_PPP_UM_CONFIG_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmOperationType opType;
+ HlpPppUmCfg_APIStruct msg;
+} elt_hlp_set_data_ppp_um_config_cmd_msg_struct;
+
+/* MSG_ID_ELT_HLP_SET_DATA_PPP_UM_CONFIG_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpParmAccessResultCode result;
+} elt_hlp_set_data_ppp_um_config_rsp_msg_struct;
+
+
+/* ETS CMD LMD */
+/* MSG_ID_ELT_LMD_CLEAR_FER_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_lmd_clear_fer_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ LmdMsoClearStatsMsgT msg;
+} elt_lmd_clear_markov_stats_cmd_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ LmdTdsoClearStatsMsgT msg;
+} elt_lmd_clear_tdso_stats_cmd_msg_struct;
+
+
+/* ETS CMD PSW */
+
+/*ELT_PSW_CALL_HANGUP_CMD_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_call_hangup_cmd_msg_struct;
+
+/*ELT_PSW_CLEAR_MRU_CMD_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_clear_mru_cmd_msg_struct;
+
+
+/*ELT_PSW_GET_CURRENT_TIME_CMD_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_get_current_time_cmd_msg_struct;
+
+typedef struct
+{
+ kal_uint8 SysTime[SYS_SYSTIME_SIZE];
+} PswSystemTimeMsgT;
+
+/*ELT_PSW_GET_CURRENT_TIME_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptSystemTimeMsgT msg;
+ //PswSystemTimeMsgT msg;
+ /* msg.SysTime[] : Full System Time, bit,count=36,base=16,pos=none */
+} elt_psw_get_current_time_rsp_msg_struct;
+
+/*ELT_PSW_GET_ACTIVE_NAM_CMD_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_get_active_nam_cmd_msg_struct;
+
+/*ELT_PSW_GET_ACTIVE_NAM_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswGetActiveNamResponseMsgT msg;
+ /*
+ msg.CurrentActiveNam:
+ typedef enum
+ {
+ NAM_1 = 1,
+ NAM_2
+ } NamNumber;
+ */
+} elt_psw_get_active_nam_rsp_msg_struct;
+
+/*ELT_PSW_GET_RETRIEVABLE_STATISTICS_CMD_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswGetRetrievableParameterMsgT msg;
+} elt_psw_get_retrievable_statistics_cmd_msg_struct;
+
+/*ELT_PSW_GET_RETRIEVABLE_STATISTICS_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GetRetrievableParameterRspMsgT msg;
+/*
+ msg.StatCounter:
+ Begin Enum, GroupID
+ MUX1_REV_FCH, 0x00, RO
+ MUX1_FOR_FCH, 0x01, RO
+ PAG, 0x02, RO
+ ACC, 0x03, RO
+ LAYER2_RTC, 0x04, RO
+ MUX2_REV_FCH, 0x05, RO
+ MUX2_FOR_FCH, 0x06, RO
+ SCCH_REV, 0x07, RO
+ SCCH_FOR, 0x08, RO
+ MUX1_REV_DCCH, 0x09, RO
+ MUX1_FOR_DCCH, 0x0a, RO
+ MUX2_REV_DCCH, 0x0b, RO
+ MUX2_FOR_DCCH, 0x0c, RO
+ SCH0_REV, 0x0d, RO
+ SCH1_REV, 0x0e, RO
+ SCH0_FOR, 0x0f, RO
+ SCH1_FOR, 0x10, RO
+ End
+
+ msg.Value[]:
+ kal_uint32 Value[MAX_STAT_ELEMENT];
+Begin Message, CP Get Retrievable Statistics MUX1_REV_FCH Rsp
+ MUX1 REV FCH 1, kal_uint32, indent=1
+ MUX1 REV FCH 2, kal_uint32, indent=1
+ MUX1 REV FCH 3, kal_uint32, indent=1
+ MUX1 REV FCH 4, kal_uint32, indent=1
+ MUX1 REV FCH 5, kal_uint32, indent=1
+ MUX1 REV FCH 6, kal_uint32, indent=1
+ MUX1 REV FCH 7, kal_uint32, indent=1
+ MUX1 REV FCH 8, kal_uint32, indent=1
+ MUX1 REV FCH 9, kal_uint32, indent=1
+ MUX1 REV FCH 10, kal_uint32, indent=1
+ MUX1 REV FCH 11, kal_uint32, indent=1
+ MUX1 REV FCH 12, kal_uint32, indent=1
+ MUX1 REV FCH 13, kal_uint32, indent=1
+ MUX1 REV FCH 14, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics MUX1_FOR_FCH Rsp
+ MUX1 FOR FCH 1, kal_uint32, indent=1
+ MUX1 FOR FCH 2, kal_uint32, indent=1
+ MUX1 FOR FCH 3, kal_uint32, indent=1
+ MUX1 FOR FCH 4, kal_uint32, indent=1
+ MUX1 FOR FCH 5, kal_uint32, indent=1
+ MUX1 FOR FCH 6, kal_uint32, indent=1
+ MUX1 FOR FCH 7, kal_uint32, indent=1
+ MUX1 FOR FCH 8, kal_uint32, indent=1
+ MUX1 FOR FCH 9, kal_uint32, indent=1
+ MUX1 FOR FCH 10, kal_uint32, indent=1
+ MUX1 FOR FCH 11, kal_uint32, indent=1
+ MUX1 FOR FCH 12, kal_uint32, indent=1
+ MUX1 FOR FCH 13, kal_uint32, indent=1
+ MUX1 FOR FCH 14, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics PAG Rsp
+ PAG_1, kal_uint32, indent=1
+ PAG_2, kal_uint32, indent=1
+ PAG_3, kal_uint32, indent=1
+ PAG_4, kal_uint32, indent=1
+ PAG_5, kal_uint32, indent=1
+ PAG_6, kal_uint32, indent=1
+ PAG_7, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics ACC Rsp
+ ACC_1, kal_uint32, indent=1
+ ACC_2, kal_uint32, indent=1
+ ACC_3, kal_uint32, indent=1
+ ACC_4, kal_uint32, indent=1
+ ACC_5, kal_uint32, indent=1
+ ACC_6, kal_uint32, indent=1
+ ACC_7, kal_uint32, indent=1
+ ACC_8, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics LAYER2_RTC Rsp
+ LAYER2_RTC1, kal_uint32, indent=1
+ LAYER2_RTC2, kal_uint32, indent=1
+ LAYER2_RTC3, kal_uint32, indent=1
+ LAYER2_RTC4, kal_uint32, indent=1
+ LAYER2_RTC5, kal_uint32, indent=1
+ OTHER_SYS_TIME1, kal_uint32, indent=1
+ OTHER_SYS_TIME2, kal_uint32, indent=1
+ OTHER_SYS_TIME3, kal_uint32, indent=1
+ OTHER_SYS_TIME4, kal_uint32, indent=1
+ OTHER_SYS_TIME5, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics MUX2_REV_FCH Rsp
+ MUX2_REV_FCH_1, kal_uint32, indent=1
+ MUX2_REV_FCH_2, kal_uint32, indent=1
+ MUX2_REV_FCH_3, kal_uint32, indent=1
+ MUX2_REV_FCH_4, kal_uint32, indent=1
+ MUX2_REV_FCH_5, kal_uint32, indent=1
+ MUX2_REV_FCH_6, kal_uint32, indent=1
+ MUX2_REV_FCH_7, kal_uint32, indent=1
+ MUX2_REV_FCH_8, kal_uint32, indent=1
+ MUX2_REV_FCH_9, kal_uint32, indent=1
+ MUX2_REV_FCH_10, kal_uint32, indent=1
+ MUX2_REV_FCH_11, kal_uint32, indent=1
+ MUX2_REV_FCH_12, kal_uint32, indent=1
+ MUX2_REV_FCH_13, kal_uint32, indent=1
+ MUX2_REV_FCH_14, kal_uint32, indent=1
+ MUX2_REV_FCH_15, kal_uint32, indent=1
+ MUX2_REV_FCH_16, kal_uint32, indent=1
+ MUX2_REV_FCH_17, kal_uint32, indent=1
+ MUX2_REV_FCH_18, kal_uint32, indent=1
+ MUX2_REV_FCH_19, kal_uint32, indent=1
+ MUX2_REV_FCH_20, kal_uint32, indent=1
+ MUX2_REV_FCH_21, kal_uint32, indent=1
+ MUX2_REV_FCH_22, kal_uint32, indent=1
+ MUX2_REV_FCH_23, kal_uint32, indent=1
+ MUX2_REV_FCH_24, kal_uint32, indent=1
+ MUX2_REV_FCH_25, kal_uint32, indent=1
+ MUX2_REV_FCH_26, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics MUX2_FOR_FCH Rsp
+ MUX2_FOR_FCH_1, kal_uint32, indent=1
+ MUX2_FOR_FCH_2, kal_uint32, indent=1
+ MUX2_FOR_FCH_3, kal_uint32, indent=1
+ MUX2_FOR_FCH_4, kal_uint32, indent=1
+ MUX2_FOR_FCH_5, kal_uint32, indent=1
+ MUX2_FOR_FCH_6, kal_uint32, indent=1
+ MUX2_FOR_FCH_7, kal_uint32, indent=1
+ MUX2_FOR_FCH_8, kal_uint32, indent=1
+ MUX2_FOR_FCH_9, kal_uint32, indent=1
+ MUX2_FOR_FCH_10, kal_uint32, indent=1
+ MUX2_FOR_FCH_11, kal_uint32, indent=1
+ MUX2_FOR_FCH_12, kal_uint32, indent=1
+ MUX2_FOR_FCH_13, kal_uint32, indent=1
+ MUX2_FOR_FCH_14, kal_uint32, indent=1
+ MUX2_FOR_FCH_15, kal_uint32, indent=1
+ MUX2_FOR_FCH_16, kal_uint32, indent=1
+ MUX2_FOR_FCH_17, kal_uint32, indent=1
+ MUX2_FOR_FCH_18, kal_uint32, indent=1
+ MUX2_FOR_FCH_19, kal_uint32, indent=1
+ MUX2_FOR_FCH_20, kal_uint32, indent=1
+ MUX2_FOR_FCH_21, kal_uint32, indent=1
+ MUX2_FOR_FCH_22, kal_uint32, indent=1
+ MUX2_FOR_FCH_23, kal_uint32, indent=1
+ MUX2_FOR_FCH_24, kal_uint32, indent=1
+ MUX2_FOR_FCH_25, kal_uint32, indent=1
+ MUX2_FOR_FCH_26, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics SCCH_REV Rsp
+ SCCH1_REV_S, kal_uint32, indent=1
+ SCCH1_REV_P, kal_uint32, indent=1
+ SCCH2_REV_S, kal_uint32, indent=1
+ SCCH2_REV_P, kal_uint32, indent=1
+ SCCH3_REV_S, kal_uint32, indent=1
+ SCCH3_REV_P, kal_uint32, indent=1
+ SCCH4_REV_S, kal_uint32, indent=1
+ SCCH4_REV_P, kal_uint32, indent=1
+ SCCH5_REV_S, kal_uint32, indent=1
+ SCCH5_REV_P, kal_uint32, indent=1
+ SCCH6_REV_S, kal_uint32, indent=1
+ SCCH6_REV_P, kal_uint32, indent=1
+ SCCH7_REV_S, kal_uint32, indent=1
+ SCCH7_REV_P, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics SCCH_FOR Rsp
+ SCCH1_FOR_S, kal_uint32, indent=1
+ SCCH1_FOR_P, kal_uint32, indent=1
+ SCCH2_FOR_S, kal_uint32, indent=1
+ SCCH2_FOR_P, kal_uint32, indent=1
+ SCCH3_FOR_S, kal_uint32, indent=1
+ SCCH3_FOR_P, kal_uint32, indent=1
+ SCCH4_FOR_S, kal_uint32, indent=1
+ SCCH4_FOR_P, kal_uint32, indent=1
+ SCCH5_FOR_S, kal_uint32, indent=1
+ SCCH5_FOR_P, kal_uint32, indent=1
+ SCCH6_FOR_S, kal_uint32, indent=1
+ SCCH6_FOR_P, kal_uint32, indent=1
+ SCCH7_FOR_S, kal_uint32, indent=1
+ SCCH7_FOR_P, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics MUX1_REV_DCCH Rsp
+ MUX1_REV_DCCH_1, kal_uint32, indent=1
+ MUX1_REV_DCCH_2, kal_uint32, indent=1
+ MUX1_REV_DCCH_3, kal_uint32, indent=1
+ MUX1_REV_DCCH_4, kal_uint32, indent=1
+ MUX1_REV_DCCH_5, kal_uint32, indent=1
+ MUX1_REV_DCCH_6, kal_uint32, indent=1
+ MUX1_REV_DCCH_7, kal_uint32, indent=1
+ MUX1_REV_DCCH_8, kal_uint32, indent=1
+ MUX1_REV_DCCH_9, kal_uint32, indent=1
+ MUX1_REV_DCCH_10, kal_uint32, indent=1
+ MUX1_REV_DCCH_11, kal_uint32, indent=1
+ MUX1_REV_DCCH_12, kal_uint32, indent=1
+ MUX1_REV_DCCH_13, kal_uint32, indent=1
+ MUX1_REV_DCCH_14, kal_uint32, indent=1
+ MUX1_REV_DCCH_15, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics MUX1_FOR_DCCH Rsp
+ MUX1_FOR_DCCH_1, kal_uint32, indent=1
+ MUX1_FOR_DCCH_2, kal_uint32, indent=1
+ MUX1_FOR_DCCH_3, kal_uint32, indent=1
+ MUX1_FOR_DCCH_4, kal_uint32, indent=1
+ MUX1_FOR_DCCH_5, kal_uint32, indent=1
+ MUX1_FOR_DCCH_6, kal_uint32, indent=1
+ MUX1_FOR_DCCH_7, kal_uint32, indent=1
+ MUX1_FOR_DCCH_8, kal_uint32, indent=1
+ MUX1_FOR_DCCH_9, kal_uint32, indent=1
+ MUX1_FOR_DCCH_10, kal_uint32, indent=1
+ MUX1_FOR_DCCH_11, kal_uint32, indent=1
+ MUX1_FOR_DCCH_12, kal_uint32, indent=1
+ MUX1_FOR_DCCH_13, kal_uint32, indent=1
+ MUX1_FOR_DCCH_14, kal_uint32, indent=1
+ MUX1_FOR_DCCH_15, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics MUX2_REV_DCCH Rsp
+ MUX2_REV_DCCH_1, kal_uint32, indent=1
+ MUX2_REV_DCCH_2, kal_uint32, indent=1
+ MUX2_REV_DCCH_3, kal_uint32, indent=1
+ MUX2_REV_DCCH_4, kal_uint32, indent=1
+ MUX2_REV_DCCH_5, kal_uint32, indent=1
+ MUX2_REV_DCCH_6, kal_uint32, indent=1
+ MUX2_REV_DCCH_7, kal_uint32, indent=1
+ MUX2_REV_DCCH_8, kal_uint32, indent=1
+ MUX2_REV_DCCH_9, kal_uint32, indent=1
+ MUX2_REV_DCCH_10, kal_uint32, indent=1
+ MUX2_REV_DCCH_11, kal_uint32, indent=1
+ MUX2_REV_DCCH_12, kal_uint32, indent=1
+ MUX2_REV_DCCH_13, kal_uint32, indent=1
+ MUX2_REV_DCCH_14, kal_uint32, indent=1
+ MUX2_REV_DCCH_15, kal_uint32, indent=1
+ MUX2_REV_DCCH_16, kal_uint32, indent=1
+ MUX2_REV_DCCH_17, kal_uint32, indent=1
+ MUX2_REV_DCCH_18, kal_uint32, indent=1
+ MUX2_REV_DCCH_19, kal_uint32, indent=1
+ MUX2_REV_DCCH_20, kal_uint32, indent=1
+ MUX2_REV_DCCH_21, kal_uint32, indent=1
+ MUX2_REV_DCCH_22, kal_uint32, indent=1
+ MUX2_REV_DCCH_23, kal_uint32, indent=1
+ MUX2_REV_DCCH_24, kal_uint32, indent=1
+ MUX2_REV_DCCH_25, kal_uint32, indent=1
+ MUX2_REV_DCCH_26, kal_uint32, indent=1
+ MUX2_REV_DCCH_27, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics MUX2_FOR_DCCH Rsp
+ MUX2_FOR_DCCH_1, kal_uint32, indent=1
+ MUX2_FOR_DCCH_2, kal_uint32, indent=1
+ MUX2_FOR_DCCH_3, kal_uint32, indent=1
+ MUX2_FOR_DCCH_4, kal_uint32, indent=1
+ MUX2_FOR_DCCH_5, kal_uint32, indent=1
+ MUX2_FOR_DCCH_6, kal_uint32, indent=1
+ MUX2_FOR_DCCH_7, kal_uint32, indent=1
+ MUX2_FOR_DCCH_8, kal_uint32, indent=1
+ MUX2_FOR_DCCH_9, kal_uint32, indent=1
+ MUX2_FOR_DCCH_10, kal_uint32, indent=1
+ MUX2_FOR_DCCH_11, kal_uint32, indent=1
+ MUX2_FOR_DCCH_12, kal_uint32, indent=1
+ MUX2_FOR_DCCH_13, kal_uint32, indent=1
+ MUX2_FOR_DCCH_14, kal_uint32, indent=1
+ MUX2_FOR_DCCH_15, kal_uint32, indent=1
+ MUX2_FOR_DCCH_16, kal_uint32, indent=1
+ MUX2_FOR_DCCH_17, kal_uint32, indent=1
+ MUX2_FOR_DCCH_18, kal_uint32, indent=1
+ MUX2_FOR_DCCH_19, kal_uint32, indent=1
+ MUX2_FOR_DCCH_20, kal_uint32, indent=1
+ MUX2_FOR_DCCH_21, kal_uint32, indent=1
+ MUX2_FOR_DCCH_22, kal_uint32, indent=1
+ MUX2_FOR_DCCH_23, kal_uint32, indent=1
+ MUX2_FOR_DCCH_24, kal_uint32, indent=1
+ MUX2_FOR_DCCH_25, kal_uint32, indent=1
+ MUX2_FOR_DCCH_26, kal_uint32, indent=1
+ MUX2_FOR_DCCH_27, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics SCH0_REV Rsp
+ SCH0_REV_1X, kal_uint32, indent=1
+ SCH0_REV_2X, kal_uint32, indent=1
+ SCH0_REV_4X, kal_uint32, indent=1
+ SCH0_REV_8X, kal_uint32, indent=1
+ SCH0_REV_16X, kal_uint32, indent=1
+ SCH0_REV_LTU, kal_uint32, indent=1
+ SCH0_REV_LTUOK, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics SCH1_REV Rsp
+ SCH1_REV_1X, kal_uint32, indent=1
+ SCH1_REV_2X, kal_uint32, indent=1
+ SCH1_REV_4X, kal_uint32, indent=1
+ SCH1_REV_8X, kal_uint32, indent=1
+ SCH1_REV_16X, kal_uint32, indent=1
+ SCH1_REV_LTU, kal_uint32, indent=1
+ SCH1_REV_LTUOK, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics SCH0_FOR Rsp
+ SCH0_FOR_1X, kal_uint32, indent=1
+ SCH0_FOR_2X, kal_uint32, indent=1
+ SCH0_FOR_4X, kal_uint32, indent=1
+ SCH0_FOR_8X, kal_uint32, indent=1
+ SCH0_FOR_16X, kal_uint32, indent=1
+ SCH0_FOR_LTU, kal_uint32, indent=1
+ SCH0_FOR_LTUOK, kal_uint32, indent=1
+End
+
+Begin Message, CP Get Retrievable Statistics SCH1_FOR Rsp
+ SCH1_FOR_1X, kal_uint32, indent=1
+ SCH1_FOR_2X, kal_uint32, indent=1
+ SCH1_FOR_4X, kal_uint32, indent=1
+ SCH1_FOR_8X, kal_uint32, indent=1
+ SCH1_FOR_16X, kal_uint32, indent=1
+ SCH1_FOR_LTU, kal_uint32, indent=1
+ SCH1_FOR_LTUOK, kal_uint32, indent=1
+End
+*/
+} elt_psw_get_retrievable_statistics_rsp_msg_struct;
+
+/*ELT_PSW_GET_SPC_CMD_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_get_spc_cmd_msg_struct;
+
+/*ELT_PSW_GET_SPC_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswGetSpcRspMsgT msg;
+} elt_psw_get_spc_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_get_ssd_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswGetSSDRspMsgT msg;
+} elt_psw_get_ssd_rsp_msg_struct;
+
+/*ELT_PSW_GET_P_REV_IN_USE_CMD_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_get_p_rev_in_use_cmd_msg_struct;
+
+/*ELT_PSW_GET_P_REV_IN_USE_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswGetPRevInUseResponseMsgT msg;
+ /* msg.P_Rev_In_Use:
+ Begin Enum, P_REV
+ JST_008, 1
+ IS_95, 2
+ IS_95A, 3
+ IS_95B Custom, 4
+ IS_95B, 5
+ IS_2000, 6
+ End
+ */
+} elt_psw_get_p_rev_in_use_rsp_msg_struct;
+
+/*ELT_PSW_READ_RAW_IMSI_CMD_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_read_raw_imsi_cmd_msg_struct;
+
+/*ELT_PSW_READ_RAW_IMSI_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswReadRawIMSIRspT msg;
+} elt_psw_read_raw_imsi_rsp_msg_struct;
+
+/*ELT_PSW_SELECT_ACTIVE_NAM_CMD_MSG*/
+/*
+ SelectActiveNam:
+ typedef enum
+ {
+ NAM_1 = 1,
+ NAM_2
+ } NamNumber;
+ */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSelectActiveNamMsgT msg;
+} elt_psw_select_active_nam_cmd_msg_struct;
+
+/*ELT_PSW_SELECT_ACTIVE_NAM_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSelectActiveNamResponseMsgT msg;
+} elt_psw_select_active_nam_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_PKZID_HYSTERESIS_TIMER_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSetPkzidHysterTmrMsgT msg;
+} elt_psw_set_pkzid_hysteresis_timer_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_PKZID_HYSTERESIS_TIMER_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_set_pkzid_hysteresis_timer_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_PRIVACY_MODE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSetPrivacyModeMsgT msg;
+} elt_psw_set_privacy_mode_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_PRIVACY_MODE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_set_privacy_mode_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_parm_get_voice_privacy_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiVoicePrivacyMode VoicePrivacy;
+} elt_psw_parm_get_voice_privacy_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_RETRIEVABLE_STATISTICS_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSetRetrievableParameterMsgT msg;
+} elt_psw_set_retrievable_statistics_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_RETRIEVABLE_STATISTICS_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_set_retrievable_statistics_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_SERVICE_OPTION_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSetServiceConfigMsgT msg;
+ /*
+ msg.ServiceOption:
+ Begin Enum, Service Options
+ Srv Opt 1 Basic 8K Vocoder, 1,
+ Srv Opt 2 8K Mobile Loopback, 2 ,
+ Srv Opt 3 Enhanced 8K Vocoder, 3 ,
+ Srv Opt 4 Asyn Data Rate Set 1, 4 ,
+ Srv Opt 5 Fax Rate Set 1, 5 ,
+ Srv Opt 6 SMS Rate Set 1, 6 ,
+ Srv Opt 9 13K Mobile Loopback, 9 ,
+ Srv Opt 12 Async Data Pref Rate Set 2, 12 ,
+ Srv Opt 13 Fax Pref Rate Set 2, 13 ,
+ Srv Opt 14 SMS Rate Set 2, 14 ,
+ Srv Opt 15 Low Speed Packet Data RS2, 15 ,
+ Srv Opt 17 Basic 13K Vocoder, 17 ,
+ Srv Opt 18 Otasp Pref Rate Set 1, 18 ,
+ Srv Opt 19 Otasp Pref Rate Set 2, 19 ,
+ Srv Opt 25 Medium Speed Packet Data RS2, 25 ,
+ Srv Opt 32 Test Data Service Option, 32 ,
+ Srv Opt 33 High Speed Packet Data, 33 ,
+ Srv Opt 35 Location Services RS 1, 35 ,
+ Srv Opt 36 Location Services RS 2, 36 ,
+ Srv Opt 54 Markov 2000, 54 ,
+ Srv Opt 55 FCH Loopback, 55 ,
+ Srv Opt 68 EVRC-B Vocoder, 68 ,
+ Srv Opt 73 EVRC-NW Vocoder, 73 ,
+ Srv Opt 75 1xAdv Loopback, 75 ,
+ Srv Opt 4100 Async Data Pref Rate Set 1, 0x1004 ,
+ Srv Opt 4101 Fax Pref Rate Set 1, 0x1005 ,
+ Srv Opt 32768 Basic 13K Vocoder, 0x8000 ,
+ Srv Opt 32798 Markov RS1, 0x801E ,
+ Srv Opt 32799 Markov RS2, 0x801F ,
+ Srv Opt 32858 High Speed Packet Data, 0x805A ,
+ Srv Opt 32859 High Speed Packet Data, 0x805B ,
+ AMPS Analog Voice, 0xFFFF ,
+ Set All SOs or Reset All to default, 0 ,
+ End
+
+ msg.forRc:
+ msg.revRc:
+ Begin Enum, RcPrefType
+ RC_PREF_1, 1
+ RC_PREF_2, 2
+ RC_PREF_3, 3
+ RC_PREF_4, 4
+ RC_PREF_5, 5
+ RC_PREF_6, 6
+ RC_PREF_7, 7
+ RC_PREF_8, 8
+ RC_PREF_9, 9
+ End
+
+ */
+} elt_psw_set_service_option_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_SERVICE_OPTION_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_set_service_option_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_SPC_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSetSPCMsgT msg;
+} elt_psw_set_spc_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_SPC_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSetSecureDataRspMsgT msg;
+} elt_psw_set_spc_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_STATUS_REQUEST_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_status_request_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_STATUS_REQUEST_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswStatusResponseMsgT msg;
+#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 !*/
+#endif
+} elt_psw_status_request_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_TEST_MODE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswEngineTestModeMsgT msg;
+#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 !*/
+#endif
+} elt_psw_test_mode_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_TEST_MODE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_test_mode_rsp_msg_struct;
+
+/* ELT PSW PARM GET CMD common */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+} eltPswParmGetCmdCommon;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SLOTTED_MODE_ALLOWED_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_slotted_mode_allowed_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SLOTTED_MODE_ALLOWED_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSlottedModeAllowed_APIStruct slottedModeAllowedRsp;
+} eltPswParmGetSlottedModeAllowedRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetSlottedModeAllowedRsp msg;
+} elt_psw_parm_get_slotted_mode_allowed_rsp_msg_struct;
+
+
+/* MSG_ID_ELT_PSW_PARM_GET_ACCESS_OVERLOAD_CLASS_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_access_overload_class_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_ACCESS_OVERLOAD_CLASS_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswAccolc_APIStruct accolcRsp;
+} eltPswParmGetAccOverloadClassRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetAccOverloadClassRsp msg;
+} elt_psw_parm_get_access_overload_class_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_CDMA_PREF_AORB_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_cdma_pref_aorb_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_CDMA_PREF_AORB_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPrefCDMA_AorB_APIStruct prefCmdaAorbRsp;
+} eltPswParmGetCdmaPrefAorbRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCdmaPrefAorbRsp msg;
+} elt_psw_parm_get_cdma_pref_aorb_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_DISTANCE_BASED_PARMS_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_distance_based_parms_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_DISTANCE_BASED_PARMS_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswDistanceBasedParms_APIStruct distanceBaseParmsRsp;
+} eltPswParmGetDistanceBasedParmsRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetDistanceBasedParmsRsp msg;
+} elt_psw_parm_get_distance_based_parms_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_ENCODED_MSID_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswGetEncodedMSIDMsg_APIStruct enCodedMsidGet;
+} eltPswParmGetEncodedMsidCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetEncodedMsidCmd msg;
+} elt_psw_parm_get_encoded_msid_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_ENCODED_MSID_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswGetEncodedMSIDRsp_APIStruct enCodedMsidRsp;
+} eltPswParmGetEncodedMsidRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetEncodedMsidRsp msg;
+} elt_psw_parm_get_encoded_msid_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_ESN_MEID_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_esn_meid_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_ESN_MEID_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswEsnMeid_APIStruct esnMeidRsp;
+} eltPswParmGetEsnMeidRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetEsnMeidRsp msg;
+} elt_psw_parm_get_esn_meid_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_FOREIGN_NID_REG_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_foreign_nid_reg_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_FOREIGN_NID_REG_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswForeignNidReg_APIStruct foreignNidRegRsp;
+} eltPswParmGetForeignNidRegRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetForeignNidRegRsp msg;
+} elt_psw_parm_get_foreign_nid_reg_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_FOREIGN_SID_REG_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_foreign_sid_reg_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_FOREIGN_SID_REG_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswForeignSidReg_APIStruct foreignSidRegRsp;
+} eltPswParmGetForeignSidRegRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetForeignSidRegRsp msg;
+} elt_psw_parm_get_foreign_sid_reg_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_HOME_SYS_REG_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_home_sys_reg_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_HOME_SYS_REG_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswHomeSysReg_APIStruct homeSysRegRsp;
+} eltPswParmGetHomeSysRegRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetHomeSysRegRsp msg;
+} elt_psw_parm_get_home_sys_reg_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_IMSI_S1_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswGetIMSIS12_APIStruct imsiS1Get;
+} eltPswParmGetImsiS1Cmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetImsiS1Cmd msg;
+} elt_psw_parm_get_imsi_s1_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_IMSI_S1_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswGetIMSIS1Rsp_APIStruct imsiS1Rsp;
+} eltPswParmGetImsiS1Rsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetImsiS1Rsp msg;
+} elt_psw_parm_get_imsi_s1_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_IMSI_S2_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswGetIMSIS12_APIStruct imsiS2Get;
+} eltPswParmGetImsiS2Cmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetImsiS2Cmd msg;
+} elt_psw_parm_get_imsi_s2_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_IMSI_S2_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswGetIMSIS2Rsp_APIStruct imsiS2Rsp;
+} eltPswParmGetImsiS2Rsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetImsiS2Rsp msg;
+} elt_psw_parm_get_imsi_s2_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_MDN_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_mdn_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_MDN_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswRawMdn_APIStruct rawMdnRsp;
+} eltPswParmGetMdnRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetMdnRsp msg;
+} elt_psw_parm_get_mdn_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_MSID_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_msid_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_MSID_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswGetRawMSID_APIStruct rawMsidRsp;
+} eltPswParmGetMsidRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetMsidRsp msg;
+} elt_psw_parm_get_msid_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_POSITIVE_SID_NID_LIST_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_positive_sid_nid_list_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_POSITIVE_SID_NID_LIST_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSIDNIDList_APIStruct pSidNidListRsp;
+} eltPswParmGetPositiveSidNidListRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetPositiveSidNidListRsp msg;
+} elt_psw_parm_get_positive_sid_nid_list_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_PREF_HOME_MO_SO_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_pref_home_mo_so_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_PREF_HOME_MO_SO_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPrefHomeMOSO_APIStruct prefHomeMoSoRsp;
+} eltPswParmGetPrefHomeMoSoRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetPrefHomeMoSoRsp msg;
+} elt_psw_parm_get_pref_home_mo_so_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_PREF_HOME_MT_SO_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_pref_home_mt_so_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_PREF_HOME_MT_SO_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPrefHomeMTSO_APIStruct prefHomeMtSoRsp;
+} eltPswParmGetPrefHomeMtSoRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetPrefHomeMtSoRsp msg;
+} elt_psw_parm_get_pref_home_mt_so_rsp_msg_struct;
+
+/* pref service option:
+ Begin Enum, Pref Voice Service Options
+ Srv Opt 1 Basic 8K Vocoder, 1,
+ Srv Opt 3 Enhanced 8K Vocoder, 3,
+ Srv Opt 17 Basic 13K Vocoder, 17,
+ Srv Opt EVRC-B, 68,
+ Srv Opt EVRC-NW, 73,
+ Srv Opt QUALCOMM 17, 0x8000,
+ End
+ */
+
+/* MSG_ID_ELT_PSW_PARM_GET_PREF_ROAM_MO_SO_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_pref_roam_mo_so_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_PREF_ROAM_MO_SO_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPrefRoamMOSO_APIStruct prefRoamMoSoRsp;
+} eltPswParmGetPrefRoamMoSoRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetPrefRoamMoSoRsp msg;
+} elt_psw_parm_get_pref_roam_mo_so_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_PREV_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_prev_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_PREV_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPRev_APIStruct prevRsp;
+} eltPswParmGetPrevRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetPrevRsp msg;
+} elt_psw_parm_get_prev_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_PRL_INFO_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_prl_info_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_PRL_INFO_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPrlInfo_APIStruct prlInfoRsp;
+} eltPswParmGetPrlInfoRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetPrlInfoRsp msg;
+} elt_psw_parm_get_prl_info_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SCM_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_scm_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SCM_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSCM_APIStruct scmRsp;
+} eltPswParmGetScmRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetScmRsp msg;
+} elt_psw_parm_get_scm_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SO_SUPPORT_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswGetSOSupport_APIStruct soSupportGet;
+} eltPswParmGetSoSupportCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetSoSupportCmd msg;
+} elt_psw_parm_get_so_support_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SO_SUPPORT_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSOSupport_APIStruct soSupportRsp;
+} eltPswParmGetSoSupportRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetSoSupportRsp msg;
+} elt_psw_parm_get_so_support_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SID_NID_LIST_SP_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_sid_nid_list_sp_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SID_NID_LIST_SP_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSidNidListsp_APIStruct sidNidListSpRsp;
+} eltPswParmGetSidNidListSpRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetSidNidListSpRsp msg;
+} elt_psw_parm_get_sid_nid_list_sp_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SLOT_CYCLE_INDEX_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_slot_cycle_index_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SLOT_CYCLE_INDEX_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSlotCycleIndex_APIStruct slotCycleIndexRsp;
+} eltPswParmGetSlotCycleIndexRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetSlotCycleIndexRsp msg;
+} elt_psw_parm_get_slot_cycle_index_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SPC_CHANGE_ENABLE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_spc_change_enable_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SPC_CHANGE_ENABLE_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSPCChangeEnable_APIStruct spcChangeEnableRsp;
+} eltPswParmGetSpcChangeEnableRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetSpcChangeEnableRsp msg;
+} elt_psw_parm_get_spc_change_enable_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_GET_SYSTEM_SELECT_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmdCommon msg;
+} elt_psw_parm_get_system_select_cmd_msg_struct;
+
+
+/* MSG_ID_ELT_PSW_PARM_GET_SYSTEM_SELECT_RSP_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSysSelect_APIStruct sysSelectRsp;
+} eltPswParmGetSystemSelectRsp;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetSystemSelectRsp msg;
+} elt_psw_parm_get_system_select_rsp_msg_struct;
+
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ union eltPswParmGetUnion
+ {
+ /* for PSW_PARM_GET_ENCODED_MSID */
+ PswGetEncodedMSIDMsg_APIStruct enCodedMsidGet;
+
+ /* for PSW_PARM_GET_IMSI_S1 */
+ PswGetIMSIS12_APIStruct imsiS1Get;
+
+ /* for PSW_PARM_GET_IMSI_S2 */
+ PswGetIMSIS12_APIStruct imsiS2Get;
+
+ /* PSW_PARM_GET_SO_SUPPORT */
+ PswGetSOSupport_APIStruct soSupportGet;
+ }u;
+} eltPswParmGetCmd;
+
+/*
+eltPswParmGetCmd parmOpId u:
+{
+ PSW_PARM_GET_ENCODED_MSID enCodedMsidGet;
+ PSW_PARM_GET_IMSI_S1 imsiS1Get;
+ PSW_PARM_GET_IMSI_S2 imsiS2Get;
+ PSW_PARM_GET_SO_SUPPORT soSupportGet;
+};*/
+
+/* so support:
+ Begin Enum, Service Options
+ Srv Opt 1 Basic 8K Vocoder, 1,
+ Srv Opt 2 8K Mobile Loopback, 2 ,
+ Srv Opt 3 Enhanced 8K Vocoder, 3 ,
+ Srv Opt 4 Asyn Data Rate Set 1, 4 ,
+ Srv Opt 5 Fax Rate Set 1, 5 ,
+ Srv Opt 6 SMS Rate Set 1, 6 ,
+ Srv Opt 9 13K Mobile Loopback, 9 ,
+ Srv Opt 12 Async Data Pref Rate Set 2, 12 ,
+ Srv Opt 13 Fax Pref Rate Set 2, 13 ,
+ Srv Opt 14 SMS Rate Set 2, 14 ,
+ Srv Opt 15 Low Speed Packet Data RS2, 15 ,
+ Srv Opt 17 Basic 13K Vocoder, 17 ,
+ Srv Opt 18 Otasp Pref Rate Set 1, 18 ,
+ Srv Opt 19 Otasp Pref Rate Set 2, 19 ,
+ Srv Opt 25 Medium Speed Packet Data RS2, 25 ,
+ Srv Opt 32 Test Data Service Option, 32 ,
+ Srv Opt 33 High Speed Packet Data, 33 ,
+ Srv Opt 35 Location Services RS 1, 35 ,
+ Srv Opt 36 Location Services RS 2, 36 ,
+ Srv Opt 54 Markov 2000, 54 ,
+ Srv Opt 55 FCH Loopback, 55 ,
+ Srv Opt 68 EVRC-B Vocoder, 68 ,
+ Srv Opt 73 EVRC-NW Vocoder, 73 ,
+ Srv Opt 75 1xAdv Loopback, 75 ,
+ Srv Opt 4100 Async Data Pref Rate Set 1, 0x1004 ,
+ Srv Opt 4101 Fax Pref Rate Set 1, 0x1005 ,
+ Srv Opt 32768 Basic 13K Vocoder, 0x8000 ,
+ Srv Opt 32798 Markov RS1, 0x801E ,
+ Srv Opt 32799 Markov RS2, 0x801F ,
+ Srv Opt 32858 High Speed Packet Data, 0x805A ,
+ Srv Opt 32859 High Speed Packet Data, 0x805B ,
+ AMPS Analog Voice, 0xFFFF ,
+ Set All SOs or Reset All to default, 0 ,
+ End
+ */
+
+/* MSG_ID_ELT_PSW_PARM_GET_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetCmd msg;
+} elt_psw_parm_get_cmd_msg_struct;
+
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ union eltPswParmRspUnion
+ {
+ /* for PSW_PARM_GET_ACCESS_OVERLOAD_CLASS */
+ PswAccolc_APIStruct accolcRsp;
+
+ /* for PSW_PARM_GET_CDMA_PREF_AorB */
+ PswPrefCDMA_AorB_APIStruct prefCmdaAorbRsp;
+
+ /* for PSW_PARM_GET_DISTANCE_BASED_PARMS */
+ PswDistanceBasedParms_APIStruct distanceBaseParmsRsp;
+
+ /* for PSW_PARM_GET_ENCODED_MSID */
+ PswGetEncodedMSIDRsp_APIStruct enCodedMsidRsp;
+
+ /* for PSW_PARM_GET_ESN_MEID */
+ PswEsnMeid_APIStruct esnMeidRsp;
+
+ /* for PSW_PARM_GET_FOREIGN_NID_REGISTRATION */
+ PswForeignNidReg_APIStruct foreignNidRegRsp;
+
+ /* for PSW_PARM_GET_FOREIGN_SID_REGISTRATION */
+ PswForeignSidReg_APIStruct foreignSidRegRsp;
+
+ /* for PSW_PARM_GET_HOME_SYS_REGISTRATION */
+ PswHomeSysReg_APIStruct homeSysRegRsp;
+
+ /* for PSW_PARM_GET_IMSI_S1 */
+ PswGetIMSIS1Rsp_APIStruct imsiS1Rsp;
+
+ /* for PSW_PARM_GET_IMSI_S2 */
+ PswGetIMSIS2Rsp_APIStruct imsiS2Rsp;
+
+ /* for PSW_PARM_GET_MDN */
+ PswRawMdn_APIStruct rawMdnRsp;
+
+ /* for PSW_PARM_GET_MSID */
+ PswGetRawMSID_APIStruct rawMsidRsp;
+
+ /* for PSW_PARM_GET_PREF_HOME_MO_SO */
+ PswPrefHomeMOSO_APIStruct prefHomeMoSoRsp;
+
+ /* PSW_PARM_GET_PREF_HOME_MT_SO */
+ PswPrefHomeMTSO_APIStruct prefHomeMtSoRsp;
+
+ /* PSW_PARM_GET_PREF_ROAM_MO_SO */
+ PswPrefRoamMOSO_APIStruct prefRoamMoSoRsp;
+
+ // PSW_PARM_GET_PREV
+ PswPRev_APIStruct prevRsp;
+
+ // PSW_PARM_GET_PRL_INFO
+ PswPrlInfo_APIStruct prlInfoRsp;
+
+ // PSW_PARM_GET_SCM
+ PswSCM_APIStruct scmRsp;
+
+ /* PSW_PARM_GET_SO_SUPPORT */
+ PswSOSupport_APIStruct soSupportRsp;
+
+ /* PSW_PARM_GET_SID_NID_LIST_SP */
+ PswSidNidListsp_APIStruct sidNidListSpRsp;
+
+ // PSW_PARM_GET_SLOT_CYCLE_INDEX
+ PswSlotCycleIndex_APIStruct slotCycleIndexRsp;
+
+ // PSW_PARM_GET_SPC_CHANGE_ENABLE
+ PswSPCChangeEnable_APIStruct spcChangeEnableRsp;
+
+ // PSW_PARM_GET_SYSTEM_SELECT
+ PswSysSelect_APIStruct sysSelectRsp;
+
+ /* for PSW_PARM_GET_SLOTTED_MODE_ALLOWED */
+ PswSlottedModeAllowed_APIStruct slottedModeAllowedRsp;
+
+ // PSW_PARM_GET_POSITIVE_SID_NID_LIST
+ PswSIDNIDList_APIStruct pSidNidListRsp;
+ }u;
+} eltPswParmGetRsp;
+
+/*
+eltPswParmGetRsp parmOpId u:
+{
+ PSW_PARM_GET_ACCESS_OVERLOAD_CLASS accolcRsp;
+
+ PSW_PARM_GET_CDMA_PREF_AorB prefCmdaAorbRsp;
+
+ PSW_PARM_GET_DISTANCE_BASED_PARMS distanceBaseParmsRsp;
+
+ PSW_PARM_GET_ENCODED_MSID enCodedMsidRsp;
+
+ PSW_PARM_GET_ESN_MEID esnMeidRsp;
+
+ PSW_PARM_GET_FOREIGN_NID_REGISTRATION foreignNidRegRsp;
+
+ PSW_PARM_GET_FOREIGN_SID_REGISTRATION foreignSidRegRsp;
+
+ PSW_PARM_GET_HOME_SYS_REGISTRATION homeSysRegRsp;
+
+ PSW_PARM_GET_IMSI_S1 imsiS1Rsp;
+
+ PSW_PARM_GET_IMSI_S2 imsiS2Rsp;
+
+ PSW_PARM_GET_MDN rawMdnRsp;
+
+ PSW_PARM_GET_MSID rawMsidRsp;
+
+ PSW_PARM_GET_PREF_HOME_MO_SO prefHomeMoSoRsp;
+
+ PSW_PARM_GET_PREF_HOME_MT_SO prefHomeMtSoRsp;
+
+ PSW_PARM_GET_PREF_ROAM_MO_SO prefRoamMoSoRsp;
+
+
+ PSW_PARM_GET_PREV prevRsp;
+
+ PSW_PARM_GET_PRL_INFO prlInfoRsp;
+
+ PSW_PARM_GET_SCM scmRsp;
+
+ PSW_PARM_GET_SO_SUPPORT soSupportRsp;
+
+ PSW_PARM_GET_SID_NID_LIST_SP sidNidListSpRsp;
+
+ PSW_PARM_GET_SLOT_CYCLE_INDEX slotCycleIndexRsp;
+
+ PSW_PARM_GET_SPC_CHANGE_ENABLE spcChangeEnableRsp;
+
+ PSW_PARM_GET_SYSTEM_SELECT sysSelectRsp;
+
+ PSW_PARM_GET_SLOTTED_MODE_ALLOWED slottedModeAllowedRsp;
+
+ PSW_PARM_GET_POSITIVE_SID_NID_LIST pSidNidListRsp;
+};*/
+
+/* MSG_ID_ELT_PSW_PARM_GET_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmGetRsp msg;
+} elt_psw_parm_get_rsp_msg_struct;
+
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ union eltPswParmSetUnion
+ {
+ PswAccolc_APIStruct accolcSet;
+ PswAkey_APIStruct akeySet;
+ PswPrefCDMA_AorB_APIStruct prefCmdaAorbSet;
+ PswSetEncodedMSID_APIStruct enCodedMsidSet;
+ PswForeignNidReg_APIStruct foreignNidRegSet;
+ PswForeignSidReg_APIStruct foreignSidRegSet;
+ PswHomeSysReg_APIStruct homeSysRegSet;
+ PswSetIMSIS1_APIStruct imsiS1Set;
+ PswSetIMSIS2_APIStruct imsiS2Set;
+ PswRawMdn_APIStruct rawMdnSet;
+ PswSetRawMSID_APIStruct rawMsidSet;
+ PswSIDNIDList_APIStruct pSidNidListSet;
+ PswPrefHomeMOSO_APIStruct prefHomeMoSoSet;
+ PswPrefHomeMTSO_APIStruct prefHomeMtSoSet;
+ PswPrefRoamMOSO_APIStruct prefRoamMoSoSet;
+ PswPRev_APIStruct prevSet;
+ PswSCM_APIStruct scmSet;
+ PswSOSupport_APIStruct soSupportSet;
+ PswSidNidListsp_APIStruct sidNidListSpSet;
+ PswSlotCycleIndex_APIStruct slotCycleIndexSet;
+ PswSPCChangeEnable_APIStruct spcChangeEnableSet;
+ PswSysSelect_APIStruct sysSelectSet;
+ }u;
+} eltPswParmSetCmd;
+
+/*
+eltPswParmSetCmd parmOpId u:
+{
+ PSW_PARM_SET_ACCESS_OVERLOAD_CLASS accolcSet;
+
+ PSW_PARM_SET_AKEY akeySet;
+
+ PSW_PARM_SET_CDMA_PREF_AorB prefCmdaAorbSet;
+
+ PSW_PARM_SET_ENCODED_MSID enCodedMsidSet;
+
+ PSW_PARM_SET_FOREIGN_SID_REGISTRATION foreignNidRegSet;
+
+ PSW_PARM_SET_FOREIGN_NID_REGISTRATION foreignSidRegSet;
+
+ PSW_PARM_SET_HOME_SYS_REGISTRATION homeSysRegSet;
+
+ PSW_PARM_SET_IMSI_S1 imsiS1Set;
+
+ PSW_PARM_SET_IMSI_S2 imsiS2Set;
+
+ PSW_PARM_SET_MDN rawMdnSet;
+
+ PSW_PARM_SET_MSID rawMsidSet;
+
+ PSW_PARM_SET_PREF_HOME_MO_SO prefHomeMoSoSet;
+
+ PSW_PARM_SET_PREF_HOME_MT_SO prefHomeMtSoSet;
+
+ PSW_PARM_SET_PREF_ROAM_MO_SO prefRoamMoSoSet;
+
+ PSW_PARM_SET_PREV prevSet;
+
+ PSW_PARM_SET_SCM scmSet;
+
+ PSW_PARM_SET_SO_SUPPORT soSupportSet;
+
+ PSW_PARM_SET_SID_NID_LIST_SP sidNidListSpSet;
+
+ PSW_PARM_SET_SLOT_CYCLE_INDEX slotCycleIndexSet;
+
+ PSW_PARM_SET_SPC_CHANGE_ENABLE spcChangeEnableSet;
+
+ PSW_PARM_SET_SYSTEM_SELECT sysSelectSet;
+};*/
+
+/* MSG_ID_ELT_PSW_PARM_SET_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCmd msg;
+} elt_psw_parm_set_cmd_msg_struct;
+
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ kal_bool result;
+} eltPswParmSetCommonRsp;
+
+/* MSG_ID_ELT_PSW_PARM_SET_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_ACCESS_OVERLOAD_CLASS_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswAccolc_APIStruct accolcSet;
+} eltPswParmSetAccOverloadClassCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetAccOverloadClassCmd msg;
+} elt_psw_parm_set_access_overload_class_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_ACCESS_OVERLOAD_CLASS_RSP_MSG */
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_access_overload_class_rsp_msg_struct;
+
+
+/* MSG_ID_ELT_PSW_PARM_SET_AKEY_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswAkey_APIStruct akeySet;
+} eltPswParmSetAkeyCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetAkeyCmd msg;
+} elt_psw_parm_set_akey_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_AKEY_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_akey_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_CDMA_PREF_AORB_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPrefCDMA_AorB_APIStruct prefCmdaAorbSet;
+} eltPswParmSetCdmaPrefAorbCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCdmaPrefAorbCmd msg;
+} elt_psw_parm_set_cdma_pref_aorb_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_CDMA_PREF_AORB_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_cdma_pref_aorb_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_ENCODED_MSID_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSetEncodedMSID_APIStruct enCodedMsidSet;
+} eltPswParmSetEncodedMsidCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetEncodedMsidCmd msg;
+} elt_psw_parm_set_encoded_msid_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_ENCODED_MSID_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_encoded_msid_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_FOREIGN_NID_REG_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswForeignNidReg_APIStruct foreignNidRegSet;
+} eltPswParmSetForeignNidRegCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetForeignNidRegCmd msg;
+} elt_psw_parm_set_foreign_nid_reg_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_FOREIGN_NID_REG_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_foreign_nid_reg_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_FOREIGN_SID_REG_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswForeignSidReg_APIStruct foreignSidRegSet;
+} eltPswParmSetForeignSidRegCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetForeignSidRegCmd msg;
+} elt_psw_parm_set_foreign_sid_reg_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_FOREIGN_SID_REG_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_foreign_sid_reg_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_HOME_SYS_REG_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswHomeSysReg_APIStruct homeSysRegSet;
+} eltPswParmSetHomeSysRegCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetHomeSysRegCmd msg;
+} elt_psw_parm_set_home_sys_reg_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_HOME_SYS_REG_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_home_sys_reg_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_IMSI_S1_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSetIMSIS1_APIStruct imsiS1Set;
+} eltPswParmSetImsiS1Cmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetImsiS1Cmd msg;
+} elt_psw_parm_set_imsi_s1_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_IMSI_S1_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_imsi_s1_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_IMSI_S2_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSetIMSIS2_APIStruct imsiS2Set;
+} eltPswParmSetImsiS2Cmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetImsiS2Cmd msg;
+} elt_psw_parm_set_imsi_s2_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_IMSI_S2_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_imsi_s2_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_MDN_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswRawMdn_APIStruct rawMdnSet;
+} eltPswParmSetMdnCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetMdnCmd msg;
+} elt_psw_parm_set_mdn_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_MDN_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_mdn_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_MSID_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSetRawMSID_APIStruct rawMsidSet;
+} eltPswParmSetMsidCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetMsidCmd msg;
+} elt_psw_parm_set_msid_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_MSID_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_msid_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_POSITIVE_SID_NID_LIST_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSIDNIDList_APIStruct pSidNidListSet;
+} eltPswParmSetPositiveSidNidListCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetPositiveSidNidListCmd msg;
+} elt_psw_parm_set_positive_sid_nid_list_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_POSITIVE_SID_NID_LIST_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_positive_sid_nid_list_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_PREF_HOME_MO_SO_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPrefHomeMOSO_APIStruct prefHomeMoSoSet;
+} eltPswParmSetPrefHomeMoSoCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetPrefHomeMoSoCmd msg;
+} elt_psw_parm_set_pref_home_mo_so_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_PREF_HOME_MO_SO_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_pref_home_mo_so_rsp_msg_struct;
+
+/* pref service option:
+ Begin Enum, Pref Voice Service Options
+ Srv Opt 1 Basic 8K Vocoder, 1,
+ Srv Opt 3 Enhanced 8K Vocoder, 3,
+ Srv Opt 17 Basic 13K Vocoder, 17,
+ Srv Opt EVRC-B, 68,
+ Srv Opt EVRC-NW, 73,
+ Srv Opt QUALCOMM 17, 0x8000,
+ End
+ */
+
+/* MSG_ID_ELT_PSW_PARM_SET_PREF_HOME_MT_SO_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPrefHomeMTSO_APIStruct prefHomeMtSoSet;
+} eltPswParmSetPrefHomeMtSoCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetPrefHomeMtSoCmd msg;
+} elt_psw_parm_set_pref_home_mt_so_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_PREF_HOME_MT_SO_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_pref_home_mt_so_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_PREF_ROAM_MO_SO_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPrefRoamMOSO_APIStruct prefRoamMoSoSet;
+} eltPswParmSetPrefRoamMoSoCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetPrefRoamMoSoCmd msg;
+} elt_psw_parm_set_pref_roam_mo_so_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_PREF_ROAM_MO_SO_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_pref_roam_mo_so_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_PREV_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswPRev_APIStruct prevSet;
+} eltPswParmSetPrevCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetPrevCmd msg;
+} elt_psw_parm_set_prev_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_PREV_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_prev_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SCM_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSCM_APIStruct scmSet;
+} eltPswParmSetScmCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetScmCmd msg;
+} elt_psw_parm_set_scm_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SCM_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_scm_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SO_SUPPORT_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSOSupport_APIStruct soSupportSet;
+} eltPswParmSetSoSupportCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetSoSupportCmd msg;
+} elt_psw_parm_set_so_support_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SO_SUPPORT_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_so_support_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SID_NID_LIST_SP_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSidNidListsp_APIStruct sidNidListSpSet;
+} eltPswParmSetSidNidListSpCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetSidNidListSpCmd msg;
+} elt_psw_parm_set_sid_nid_list_sp_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SID_NID_LIST_SP_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_sid_nid_list_sp_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SLOT_CYCLE_INDEX_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSlotCycleIndex_APIStruct slotCycleIndexSet;
+} eltPswParmSetSlotCycleIndexCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetSlotCycleIndexCmd msg;
+} elt_psw_parm_set_slot_cycle_index_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SLOT_CYCLE_INDEX_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_slot_cycle_index_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SPC_CHANGE_ENABLE_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSPCChangeEnable_APIStruct spcChangeEnableSet;
+} eltPswParmSetSpcChangeEnableCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetSpcChangeEnableCmd msg;
+} elt_psw_parm_set_spc_change_enable_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SPC_CHANGE_ENABLE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_spc_change_enable_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SYSTEM_SELECT_CMD_MSG */
+typedef struct
+{
+ PswParmOperationId parmOpId;
+ PswParmOperationType opType;
+ PswSysSelect_APIStruct sysSelectSet;
+} eltPswParmSetSystemSelectCmd;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetSystemSelectCmd msg;
+} elt_psw_parm_set_system_select_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_PARM_SET_SYSTEM_SELECT_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswParmSetCommonRsp msg;
+} elt_psw_parm_set_system_select_rsp_msg_struct;
+
+
+/* MSG_ID_ELT_PSW_GET_CP_BC_TO_CDMA_BC_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_get_cp_bc_to_cdma_bc_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_GET_CP_BC_TO_CDMA_BC_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswGetCpBcToCdmaBcRspMsgT msg;
+ /*
+ msg.bandClass:
+Begin Enum, Cdma Band
+ BAND_CLASS_0,
+ BAND_CLASS_1,
+ BAND_CLASS_2,
+ BAND_CLASS_3,
+ BAND_CLASS_4,
+ BAND_CLASS_5,
+ BAND_CLASS_6,
+ BAND_CLASS_7,
+ BAND_CLASS_8,
+ BAND_CLASS_9,
+ BAND_CLASS_10,
+ BAND_CLASS_11,
+ BAND_CLASS_12,
+ BAND_CLASS_13,
+ BAND_CLASS_14,
+ BAND_CLASS_15,
+ BAND_CLASS_16,
+End
+
+ msg.calibTable:
+Begin enum, Hwd Calib Table Id
+ 0 BAND A,
+ 1 BAND B,
+ 2 BAND C,
+ 3 BAND D,
+ 4 BAND E,
+End
+ */
+} elt_psw_get_cp_bc_to_cdma_bc_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_NST_POWERUP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswNstPowerupMsgT msg;
+} elt_psw_nst_powerup_msg_struct;
+
+/* MSG_ID_ELT_PSW_NST_TRANSMIT_TCH_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswNstTransmitTchMsgT msg;
+} elt_psw_nst_transmit_tch_msg_struct;
+
+/* MSG_ID_ELT_PSW_NST_EXIT_TEST_MODE_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswNstExitMsgT msg;
+} elt_psw_nst_exit_test_mode_msg_struct;
+
+/* MSG_ID_ELT_PSW_NST_RX_PWR_REQ_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswNstRxPwrReqMsgT msg;
+} elt_psw_nst_rx_pwr_req_msg_struct;
+
+/* MSG_ID_ELT_PSW_NST_TX_PWR_LEVEL_SET_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswNstTxPwrLevelSetMsgT msg;
+} elt_psw_nst_tx_pwr_level_set_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_IMSI_M_VALID_STATUS_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSetImsiMValidT msg;
+} elt_psw_set_imsi_m_valid_status_cmd_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_IMSI_M_VALID_STATUS_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_psw_set_imsi_m_valid_status_rsp_msg_struct;
+
+/* MSG_ID_ELT_PSW_SET_MOBILE_ID_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSetMobileIDMsgT msg;
+} elt_psw_set_mobile_id_cmd_msg_struct;
+
+typedef struct
+{
+ kal_bool result;
+} eltPswCommonRsp;
+
+/* MSG_ID_ELT_PSW_SET_MOBILE_ID_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ eltPswCommonRsp msg;
+} elt_psw_set_mobile_id_rsp_msg_struct;
+
+
+/* CLC TASK START */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ClcInitTstMsgT msg;
+ /* RmcRFMode:0->NO RF1->1 RF;
+ * Begin Enum, RFPaths
+ * Main, 1
+ * Diversity, 2
+ * Main and Diversity, 3
+ * End
+ * C3Enabled: 0->Disable;1->Enable;
+ * SessionAutoMode:0->Disable;1->Enable;
+ * CssEnabled:0->False;1->True;
+ */
+} elt_clc_initacq_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_clc_initacq_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_clc_get_l3_status_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ MonSpyL3StateT msg;
+ /* Begin Enum, AlmpState:Init,0; Idle,1; ConnectionSetup,2; Connected,3; End */
+ /* Begin Enum, InspState:Inactive,0; NetworkDetermination,1; PilotAcq,2;
+ * Sync,3; TimingChange,4; INSP_WFR_1XASSIST_SIG,5;
+ * End
+ */
+ /* Begin Enum, IdpState:Inactive,0; Monitor,1; Sleep,2; ConnectionSetup,3;
+ * FreezePending,4; Freeze,5; ConnFrozen,6; WaitFor1XAssistAcqSignal,7;
+ * End
+ */
+ /* Begin Enum, CspState:Inactive,0; Closing,1; Open,2; End */
+ /* Begin Enum, RupState:Inactive,0; Idle,1; Connected,2; IRAT_MEASURE,3; End */
+ /* Begin Enum, OmpState:Inactive,0; Active,1; End */
+ /* bHybridOn:0->Off, 1->On. */
+} elt_clc_get_l3_status_rsp_msg_struct;
+
+typedef enum
+{
+ PARM_MIN_VALUE,
+ PARM_MAX_VALUE,
+ PARM_DEFAULT_VALUE,
+ PARM_CUSTOM_VALUE
+} ParmOperationType;
+
+typedef struct
+{
+ DoParmOperationId parmId;
+ ParmOperationType opType;
+}clcDoParaCmdInfoT;
+
+typedef struct
+{
+ DoParmOperationId parmId;
+ DoParmAccessResultCode resultCode;
+}clcDoParaRspInfoT;
+
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoHybridModeData_APIStruct hybridModeSet;
+ /* Begin Enum,HybridMode:
+ Non-Hybrid,
+ Hybrid,
+ End
+ */
+}clcDoHybridSetT;
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoPrefCCCycleData_APIStruct ccCycleSet;
+ /*PrefCCCycleEnable:0->False,1->True.*/
+}clcDoCcCycleSetT;
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoStreamConfiguration_APIStruct strConfigSet;
+}clcDoStrConfigSetT;
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoForceRel0NegoData_APIStruct forceRel0NegSet;
+ /*ScpForceRel0Config::0->Diable,1->Enable.*/
+}clcDoForceRel0NegSetT;
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoNotDisturbData_APIStruct notDisturbSet;
+ /*NotDisturb::0->Diable,1->Enable.*/
+}clcDoNotDisturbSetT;
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoFtMacDrcGatingData_APIStruct ftMacDrcGatSet;
+ /* Begin Enum, FtMacDrcGating
+ Continous,
+ Discontinous,
+ End
+ */
+}clcDoFtMacDrcGatSetT;
+
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoLUPUnsolicitedData_APIStruct lupUnsolicitedSet;
+ /*LUPUnsolicitedEnable:
+ Begin Enum, LUPUnsolicitedEnable
+ Disable,
+ Enable,
+ End
+ */
+}clcDoLupUnsolicitedSetT;
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoRxDiversityCtrlData_APIStruct rxDiversityCtrlSet;
+}clcDoRxDiversityCtrlSetT;
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoExtendedSlotCycleData_APIStruct extendedSlotCycleSet;
+ /*T_Dual_Idle:unit in second.
+ Begin Enum, T_HRPD_ExtendedSC/T_1x_ExtendedSC:
+ 3072 slots(5.12s), 0x09,
+ 6144 slots(10.24s), 0x0a,
+ 12288 slots(20.48s), 0x0b,
+ 24576 slots(40.96s), 0x0c,
+ End
+ */
+}clcDoExtendedSlotCycleSetT;
+
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoPrefModeData_APIStruct prefModeSet;
+ /*Begin Enum, PrefMode:
+ Eng Pref Mode Analog, 0
+ Eng Pref Mode Cdma, 1
+ Eng Pref Mode Analog Only, 2
+ Eng Pref Mode Cdma Only, 3
+ Automatic, 4
+ Emergency, 5
+ Home Only, 6
+ Cdma Only, 7
+ HDR Only, 8
+ Hybrid Only, 9
+ SHDR Only, 10
+ End
+ */
+
+}clcDoPrefModeSetT;
+
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoeHRPDModeData_APIStruct eHRPDModeSet;
+ /*Disable::0->Diable,1->Enable.*/
+} clcDoEHRPDModeSetT;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoHybridSetT msg;
+} elt_clc_do_hybrid_mode_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_hybrid_mode_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoCcCycleSetT msg;
+} elt_clc_do_pref_cc_cycle_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_pref_cc_cycle_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoStrConfigSetT msg;
+} elt_clc_do_stream_config_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_stream_config_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoForceRel0NegSetT msg;
+} elt_clc_do_force_r0_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_force_r0_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoNotDisturbSetT msg;
+} elt_clc_do_not_disturb_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_not_disturb_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoFtMacDrcGatSetT msg;
+} elt_clc_do_ft_mac_drc_gating_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_ft_mac_drc_gating_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoLupUnsolicitedSetT msg;
+} elt_clc_do_lup_unsolicited_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_lup_unsolicited_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoRxDiversityCtrlSetT msg;
+} elt_clc_do_rx_diversity_ctrl_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_rx_diversity_ctrl_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoExtendedSlotCycleSetT msg;
+} elt_clc_do_ext_slot_cycle_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_ext_slot_cycle_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoPrefModeSetT msg;
+} elt_clc_do_pref_mode_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_pref_mode_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoEHRPDModeSetT msg;
+} elt_clc_do_ehrpd_mode_set_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaRspInfoT msg;
+} elt_clc_do_ehrpd_mode_set_rsp_msg_struct;
+
+
+typedef struct
+{
+ clcDoParaRspInfoT paraInfo;
+ DoHybridModeData_APIStruct hybridModeGet;
+ /* Begin Enum,HybridMode:
+ Non-Hybrid,
+ Hybrid,
+ End
+ */
+}clcDoHybridGetT;
+typedef struct
+{
+ clcDoParaCmdInfoT paraInfo;
+ DoPrefCCCycleData_APIStruct ccCycleGet;
+ /*PrefCCCycleEnable:0->False,1->True.*/
+}clcDoCcCycleGetT;
+typedef struct
+{
+ clcDoParaRspInfoT paraInfo;
+ DoStreamConfiguration_APIStruct strConfigGet;
+}clcDoStrConfigGetT;
+typedef struct
+{
+ clcDoParaRspInfoT paraInfo;
+ DoForceRel0NegoData_APIStruct forceRel0NegGet;
+ /*ScpForceRel0Config::0->Diable,1->Enable.*/
+}clcDoForceRel0NegGetT;
+typedef struct
+{
+ clcDoParaRspInfoT paraInfo;
+ DoNotDisturbData_APIStruct notDisturbGet;
+ /*NotDisturb::0->Diable,1->Enable.*/
+}clcDoNotDisturbGetT;
+typedef struct
+{
+ clcDoParaRspInfoT paraInfo;
+ DoFtMacDrcGatingData_APIStruct ftMacDrcGatGet;
+ /* Begin Enum, FtMacDrcGating
+ Continous,
+ Discontinous,
+ End
+ */
+}clcDoFtMacDrcGatGetT;
+
+typedef struct
+{
+ clcDoParaRspInfoT paraInfo;
+ DoLUPUnsolicitedData_APIStruct lupUnsolicitedGet;
+ /*LUPUnsolicitedEnable:
+ Begin Enum, LUPUnsolicitedEnable
+ Disable,
+ Enable,
+ End
+ */
+}clcDoLupUnsolicitedGetT;
+typedef struct
+{
+ clcDoParaRspInfoT paraInfo;
+ DoRxDiversityCtrlData_APIStruct rxDiversityCtrlGet;
+}clcDoRxDiversityCtrlGetT;
+typedef struct
+{
+ clcDoParaRspInfoT paraInfo;
+ DoExtendedSlotCycleData_APIStruct extendedSlotCycleGet;
+ /*T_Dual_Idle:unit in second.
+ Begin Enum, T_HRPD_ExtendedSC/T_1x_ExtendedSC:
+ 3072 slots(5.12s), 0x09,
+ 6144 slots(10.24s), 0x0a,
+ 12288 slots(20.48s), 0x0b,
+ 24576 slots(40.96s), 0x0c,
+ End
+ */
+}clcDoExtendedSlotCycleGetT;
+
+typedef struct
+{
+ clcDoParaRspInfoT paraInfo;
+ DoPrefModeData_APIStruct prefModeGet;
+ /*Begin Enum, PrefMode:
+ Eng Pref Mode Analog, 0
+ Eng Pref Mode Cdma, 1
+ Eng Pref Mode Analog Only, 2
+ Eng Pref Mode Cdma Only, 3
+ Automatic, 4
+ Emergency, 5
+ Home Only, 6
+ Cdma Only, 7
+ HDR Only, 8
+ Hybrid Only, 9
+ SHDR Only, 10
+ End
+ */
+
+}clcDoPrefModeGetT;
+
+typedef struct
+{
+ clcDoParaRspInfoT paraInfo;
+ DoeHRPDModeData_APIStruct eHRPDModeGet;
+ /*Disable::0->Diable,1->Enable.*/
+} clcDoEHRPDModeGetT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_hybrid_mode_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoHybridGetT msg;
+} elt_clc_do_hybrid_mode_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_pref_cc_cycle_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoCcCycleGetT msg;
+} elt_clc_do_pref_cc_cycle_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_stream_config_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoStrConfigGetT msg;
+} elt_clc_do_stream_config_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_force_r0_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoForceRel0NegGetT msg;
+} elt_clc_do_force_r0_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_not_disturb_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoNotDisturbGetT msg;
+} elt_clc_do_not_disturb_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_ft_mac_drc_gating_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoFtMacDrcGatGetT msg;
+} elt_clc_do_ft_mac_drc_gating_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_lup_unsolicited_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoLupUnsolicitedGetT msg;
+} elt_clc_do_lup_unsolicited_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_rx_diversity_ctrl_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoRxDiversityCtrlGetT msg;
+} elt_clc_do_rx_diversity_ctrl_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_ext_slot_cycle_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoExtendedSlotCycleGetT msg;
+} elt_clc_do_ext_slot_cycle_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_pref_mode_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoPrefModeGetT msg;
+} elt_clc_do_pref_mode_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoParaCmdInfoT msg;
+} elt_clc_do_ehrpd_mode_get_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ clcDoEHRPDModeGetT msg;
+} elt_clc_do_ehrpd_mode_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_clc_idp_do_sys_status_get_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ EtsGetDoSysStatusRspT msg;
+ /* bSloteMode:0->Disable;1->Enable.*/
+} elt_clc_idp_do_sys_status_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IdpSlottedModeSetMsgT msg;
+ /*bSlottedModeEnabled::0->Disable;1->Enable.*/
+} elt_clc_idp_slotted_mode_set_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IdpSlottedModeSetRspT msg;
+} elt_clc_idp_slotted_mode_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_clc_almp_open_conn_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_clc_almp_open_conn_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_clc_almp_rel_conn_cmd_msg_struct,elt_clc_almp_rel_conn_shdr_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ClcAlmpRelConnRspT msg;
+} elt_clc_almp_rel_conn_rsp_msg_struct,elt_clc_almp_rel_conn_shdr_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IdpEltHandoffMsgT msg;
+} elt_clc_idp_handoff_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_clc_idp_handoff_rsp_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ClcNstTstMsgT msg;
+} elt_clc_nst_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_clc_connreq_cmd_msg_struct;
+
+/* CLC TASK END */
+
+
+/* SLC TASK START */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_slc_state_get_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ MonSpySessionStateT msg;
+} elt_slc_state_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_slc_smp_session_close_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_slc_smp_session_close_rsp_msg_struct;
+/* SLC TASK END */
+
+/* CSS TASK START */
+/* CSS_DBM_INIT_NVRAM_TO_DEFAULT_MSG */
+/* MSG_ID_ELT_CSS_DBM_INIT_NVRAM_TO_DEFAULT_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssDbmInitDBToDefaultMsgT msg;
+} elt_css_dbm_init_nvram_to_default_cmd_msg_struct;
+
+/* CSS_TEST_CFG_MSG */
+/* MSG_ID_ELT_CSS_TEST_CFG_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssTestCfgT msg;
+} elt_css_test_cfg_cmd_msg_struct;
+
+/* CSS_1X_CLEAR_MRU_MSG */
+/* MSG_ID_ELT_CSS_1X_CLEAR_MRU_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+}elt_css_1x_clear_mru_cmd_msg_struct;
+
+/* CSS_DO_CLEAR_MRU_MSG */
+/* MSG_ID_ELT_CSS_DO_CLEAR_MRU_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+}elt_css_do_clear_mru_cmd_msg_struct;
+
+/* CSS_GET_PRL_ID_MSG */
+/* MSG_ID_ELT_CSS_GET_PRL_ID_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_css_get_prl_id_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssGetPrlIdRspMsgT msg;
+} elt_css_get_prl_id_rsp_msg_struct;
+
+/* CSS_OOSA_SET_PARMS_MSG */
+/* MSG_ID_ELT_CSS_OOSA_SET_PARMS_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssOOSASetPhaseParmsMsgT msg;
+}elt_css_oosa_set_parms_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssOOSASetPhaseParmsRspMsgT msg;
+}elt_css_oosa_set_parms_rsp_msg_struct;
+
+
+/* CSS_OOSA_GET_PARMS_MSG */
+/* MSG_ID_ELT_CSS_OOSA_GET_PARMS_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssOOSAGetPhaseParmsMsgT msg;
+}elt_css_oosa_get_parms_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssOOSAGetPhaseParmsRspMsgT msg;
+}elt_css_oosa_get_parms_rsp_msg_struct;
+
+/* CSS_OOSA_SET_ENABLE_MSG */
+/* MSG_ID_ELT_CSS_OOSA_SET_ENABLE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSASetEnable_APIStruct msg;
+}elt_css_oosa_set_enable_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSASetEnableRsp_APIStruct msg;
+}elt_css_oosa_set_enable_rsp_msg_struct;
+
+/* CSS_OOSA_GET_ENABLE_MSG */
+/* MSG_ID_ELT_CSS_OOSA_GET_ENABLE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSAGetEnable_APIStruct msg;
+}elt_css_oosa_get_enable_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSAGetEnableRsp_APIStruct msg;
+} elt_css_oosa_get_enable_rsp_msg_struct;
+
+/* CSS_OOSA_SET_NUM_PHASES_MSG */
+/* MSG_ID_ELT_CSS_OOSA_SET_NUM_PHASES_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSASetNumPhases_APIStruct msg;
+} elt_css_oosa_set_num_phases_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSASetNumPhasesRsp_APIStruct msg;
+} elt_css_oosa_set_num_phases_rsp_msg_struct;
+
+/* CSS_OOSA_GET_NUM_PHASES_MSG */
+/* MSG_ID_ELT_CSS_OOSA_GET_NUM_PHASES_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSAGetNumPhases_APIStruct msg;
+} elt_css_oosa_get_num_phases_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSAGetNumPhasesRsp_APIStruct msg;
+} elt_css_oosa_get_num_phases_rsp_msg_struct;
+
+/* CSS_OOSA_SET_CURRENT_STAGE_MSG */
+/* MSG_ID_ELT_CSS_OOSA_SET_CURRENT_STAGE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSASetCurrentStage_APIStruct msg;
+} elt_css_oosa_set_current_stage_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSASetCurrentStageRsp_APIStruct msg;
+} elt_css_oosa_set_current_stage_rsp_msg_struct;
+
+/* CSS_OOSA_GET_CURRENT_STAGE_MSG */
+/* MSG_ID_ELT_CSS_OOSA_GET_CURRENT_STAGE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSAGetCurrentStage_APIStruct msg;
+}elt_css_oosa_get_current_stage_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmOOSAGetCurrentStageRsp_APIStruct msg;
+}elt_css_oosa_get_current_stage_rsp_msg_struct;
+
+/* CSS_GET_MCC_MSG */
+/* MSG_ID_ELT_CSS_GET_MCC_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmGetMccT msg;
+} elt_css_get_mcc_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CpsmGetMcccRspT msg;
+} elt_css_get_mcc_rsp_msg_struct;
+
+/* CSS_GET_ERI_VERSION_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_css_get_eri_version_number_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssEriVersionNumberRspMsgT msg;
+} elt_css_get_eri_version_number_rsp_msg_struct;
+/* CSS TASK END */
+
+/* ETS CMD GPS */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValPswIs801TcpConnReqMsgT msg;
+} elt_gps_loc_tcp_conn_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_gps_loc_tcp_conn_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_gps_loc_tcp_close_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_gps_loc_tcp_close_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValNMEACfgSetMsgT msg;
+} elt_gps_nmea_cfg_set_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_gps_nmea_cfg_set_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValNmeaCfgGetReqMsgT msg;
+} elt_gps_nmea_cfg_get_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValNmeaCfgGetReqMsgT msg;
+} elt_gps_nmea_cfg_get_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsOpenDeviceHwInitMsgT msg;
+} elt_gps_open_device_hw_init_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsOpenDeviceHwInitRspMsgT msg;
+} elt_gps_open_device_hw_init_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsCloseDeviceMsgT msg;
+} elt_gps_close_device_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsCloseDeviceRspMsgT msg;
+} elt_gps_close_device_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsPositionGetMsgT msg;
+} elt_gps_position_get_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsPositionGetRspMsgT msg;
+} elt_gps_position_get_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsStartFixMsgT msg;
+} elt_gps_start_fix_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsStartFixRspMsgT msg;
+} elt_gps_start_fix_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsQueryFixMsgT msg;
+} elt_gps_query_fix_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsQueryFixRspMsgT msg;
+} elt_gps_query_fix_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsStopFixMsgT msg;
+} elt_gps_stop_fix_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsStopFixRspMsgT msg;
+} elt_gps_stop_fix_rsp_msg_struct;
+
+/* MSG_ID_ELT_GPS_CONFIG_FIX_MODE_SET_CMD_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsFixModeConfigMsgT msg;
+} elt_gps_config_fix_mode_set_cmd_msg_struct;
+
+/* MSG_ID_ELT_GPS_CONFIG_FIX_MODE_SET_RSP_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsFixModeConfigRspMsgT msg;
+} elt_gps_config_fix_mode_set_rsp_msg_struct;
+
+/*MSG_ID_ELT_GPS_CONFIG_FIX_RATE_SET_CMD_MSG*/
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsFixRateConfigMsgT msg;
+} elt_gps_config_fix_rate_set_cmd_msg_struct;
+
+/*MSG_ID_ELT_GPS_CONFIG_FIX_RATE_SET_RSP_MSG*/
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsFixRateConfigRspMsgT msg;
+} elt_gps_config_fix_rate_set_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsQosConfigMsgT msg;
+} elt_gps_config_qos_set_cmd_msg_struct;
+
+/* MSG_ID_ELT_GPS_CONFIG_QOS_SET_RSP_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsQosConfigRspMsgT msg;
+} elt_gps_config_qos_set_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ kal_bool bAddrValid;
+ kal_bool IPType; /*0: IPV4; 1: IPV6*/
+ kal_uint8 Ipv4Addr[4];
+ kal_uint32 IPv6Addr[4];
+ kal_uint32 PortNum;
+ kal_bool bURLValid;
+ kal_uint8 URLAddr[256];
+} elt_gps_write_server_config_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsStatusT Status;
+} elt_gps_write_server_config_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_gps_read_server_config_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_bool bAddrValid;
+ kal_bool IPType; /*0: IPV4; 1: IPV6*/
+ kal_uint8 Ipv4Addr[4];
+ kal_uint32 IPv6Addr[4];
+ kal_uint32 PortNum;
+ kal_bool bURLValid;
+ kal_uint8 URLAddr[256];
+} elt_gps_read_server_config_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsEnableSecurityMsgT msg;
+} elt_gps_enable_security_cmd_msg_struct;
+/* MSG_ID_ELT_GPS_ENABLE_SECURITY_RSP_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsEnableSecurityRspMsgT msg;
+} elt_gps_enable_security_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsWriteSecurityConfigMsgT msg;
+} elt_gps_write_security_config_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsWriteSecurityConfigRspMsgT msg;
+} elt_gps_write_security_config_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsReadSecurityConfigMsgT msg;
+} elt_gps_read_security_config_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsReadSecurityConfigRspMsgT msg;
+} elt_gps_read_security_config_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsReadSecurityConfigMsgT msg;
+} elt_gps_read_security_config_w_status_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsReadSecurityConfigRspWithStatusMsgT msg;
+} elt_gps_read_security_config_w_status_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsReadEncryptConfigMsgT msg;
+} elt_gps_read_encrypt_config_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsReadEncryptConfigRspMsgT msg;
+} elt_gps_read_encrypt_config_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsReadEncryptConfigMsgT msg;
+} elt_gps_read_encrypt_config_w_status_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsReadEncryptConfigRspWithStatusMsgT msg;
+} elt_gps_read_encrypt_config_w_status_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsLbsPrivacySettingGetMsgT msg;
+} elt_gps_lbs_privacy_setting_get_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsLbsPrivacySettingGetRspMsgT msg;
+} elt_gps_lbs_privacy_setting_get_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsLbsPrivacySettingsSetMsgT msg;
+} elt_gps_lbs_privacy_setting_set_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsLbsPrivacySettingsSetRspMsgT msg;
+} elt_gps_lbs_privacy_setting_set_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsBaseSSDGetMsgT msg;
+} elt_gps_basessd_get_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsBaseSSDGetRspMsgT msg;
+} elt_gps_basessd_get_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsRandPeriodSetMsgT msg;
+} elt_gps_rand_period_set_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsRandPeriodSetRspMsgT msg;
+} elt_gps_rand_period_set_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsResetAssistMsgT msg;
+} elt_gps_reset_assist_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsResetAssistRspMsgT msg;
+} elt_gps_reset_assist_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsRestartFixMsgT msg;
+} elt_gps_restart_fix_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 InstanceID;
+ kal_uint8 Status;
+ /* Status:
+ CP_VAL_GPS_SUCCESS, 0,
+ CP_VAL_GPS_ERROR_INVALID_PARM,
+ CP_VAL_GPS_ERROR_INVALID_SECURITY_STATUS,
+ CP_VAL_GPS_ERROR_LOCATION_REQ_QUEUE_FULL,
+ CP_VAL_GPS_ERROR_PREV_LOCATION_REQ_PENDING,
+ */
+} elt_gps_restart_fix_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsSetSecMsgT msg;
+} elt_gps_sec_set_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsSetSecRspMsgT msg;
+} elt_gps_sec_set_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsConfigTechMsgT msg;
+} elt_gps_config_tech_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_gps_config_tech_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_pgps_cfg_set_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_pgps_cfg_set_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_pgps_cfg_get_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_pgps_cfg_get_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_pgps_start_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+} elt_pgps_start_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsWriteOffsetInfoMsgT msg;
+} elt_gps_write_offset_info_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsWriteOffsetInfoRspMsgT msg;
+} elt_gps_write_offset_info_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsReadOffsetInfoMsgT msg;
+} elt_gps_read_offset_info_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsReadOffsetInfoRspMsgT msg;
+} elt_gps_read_offset_info_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsNmeaOuputSettingsMsgT msg;
+} elt_gps_nmea_output_setting_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsNmeaOuputSettingsRspMsgT msg;
+} elt_gps_nmea_output_setting_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsFixRateConfigGetMsgT msg;
+} elt_gps_config_fix_rate_get_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsFixRateConfigGetRspMsgT msg;
+} elt_gps_config_fix_rate_get_rsp_msg_struct;
+
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsCTMpcCfgMsgT msg;
+}elt_gps_ct_mpc_ip_cfg_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsCTMpcCfgRspMsgT msg;
+}elt_gps_ct_mpc_ip_cfg_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ValGpsBaseSSDSetMsgT msg;
+}elt_gps_basessd_set_cmd_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsBaseSSDSetRspMsgT msg;
+}elt_gps_basessd_set_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsCTMpcPasswrdUsernameCfgMsgT msg;
+}elt_gps_mpc_ip_username_passwrd_cfg_set_cmd_struct;
+
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsCTMpcPasswrdUsernameCfgRspMsgT msg;
+}elt_gps_mpc_ip_username_passwrd_cfg_set_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsTestModeSetT msg;
+}elt_gps_test_mode_set_cmd_msg_struct;
+
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsTestModeSetRspMsgT msg;
+}elt_gps_test_mode_set_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsStateGetMsgT msg;
+}elt_gps_lbs_state_get_cmd_msg_struct;
+
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsStateGetRspMsgT msg;
+}elt_gps_lbs_state_get_rsp_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsStartModeSetMsgT msg;
+}elt_gps_start_mode_set_cmd_msg_struct;
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsStartModeSetRspMsgT msg;
+}elt_gps_start_mode_set_rsp_msg_struct;
+
+/* MSG_ID_ELT_GPS_CP_VAL_MPC_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsCpValMpcMsgT msg;
+}elt_gps_cp_val_mpc_msg_struct;
+
+/* MSG_ID_ELT_GPS_CP_LOC_RESP_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsLocRespMsgT msg;
+}elt_gps_cp_loc_resp_msg_struct;
+
+/* MSG_ID_ELT_GPS_LOC_STATE_MSG */
+typedef struct
+{
+LOCAL_PARA_HDR
+ ValGpsStateChangeParamsSpyMsgT msg;
+}elt_gps_loc_state_msg_struct;
+
+
+/*LEC*/
+typedef struct
+{
+LOCAL_PARA_HDR
+ LecPgpsOnOffMsgT msg;
+}elt_lec_tst_gps_pgps_on_off_cmd_msg_struct;
+
+typedef struct
+{
+LOCAL_PARA_HDR
+ LecPgpsOnOffMsgRspT msg;
+}elt_lec_tst_gps_pgps_on_off_rsp_msg_struct;
+
+
+/* UI */
+/* MSG_ID_ELT_VAL_SET_SMS_CH_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_bool isTraffic;
+} elt_val_set_sms_ch_cmd_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_val_set_sms_ch_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+} elt_val_ui_parm_get_auto_answer_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+ kal_bool AutoAnswerMode;
+ kal_uint8 Rings;
+} elt_val_ui_parm_get_auto_answer_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+} elt_val_ui_parm_get_auto_redial_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+ kal_bool AutoRedialMode;
+ AutoRedialIntervalType Interval;
+} elt_val_ui_parm_get_auto_redial_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_val_ui_parm_get_dtmf_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiDTMFMode DTMFMode;
+} elt_val_ui_parm_get_dtmf_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+} elt_val_ui_parm_get_lock_code_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+ kal_uint8 LockCode[NUM_UI_LOCK_CODE_DIGITS];
+} elt_val_ui_parm_get_lock_code_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+} elt_val_ui_parm_get_voice_privacy_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+ UiVoicePrivacyMode VoicePrivacy;
+} elt_val_ui_parm_get_voice_privacy_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+} elt_val_ui_parm_get_voice_privacy_alert_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+ kal_bool VoicePrivacyAlertMode;
+} elt_val_ui_parm_get_voice_privacy_alert_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+ kal_bool AutoAnswerMode;
+ kal_uint8 Rings;
+} elt_val_ui_parm_set_auto_answer_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+} elt_val_ui_parm_set_auto_answer_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+ kal_bool AutoRedialMode;
+ AutoRedialIntervalType Interval;
+} elt_val_ui_parm_set_auto_redial_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+} elt_val_ui_parm_set_auto_redial_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiDTMFMode DTMFMode;
+} elt_val_ui_parm_set_dtmf_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_val_ui_parm_set_dtmf_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+ kal_uint8 LockCode[NUM_UI_LOCK_CODE_DIGITS];
+} elt_val_ui_parm_set_lock_code_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+} elt_val_ui_parm_set_lock_code_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+ UiVoicePrivacyMode VoicePrivacy;
+} elt_val_ui_parm_set_voice_privacy_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+} elt_val_ui_parm_set_voice_privacy_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+ kal_bool VoicePrivacyAlertMode;
+} elt_val_ui_parm_set_voice_privacy_alert_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UiParmOperationId UiParmId;
+ UiParmOperationType opType;
+} elt_val_ui_parm_set_voice_privacy_alert_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ EtsDispTextMsgT etsDispTextInfo;
+} elt_val_ui_cp_display_rsp_msg_struct;
+
+typedef enum
+{
+ VAL_KEY_PRESS,
+ VAL_KEY_RELEASE,
+ VAL_KEY_HOLD,
+ VAL_KEY_STATUS_NUM
+}ValKeyStatusT;
+
+typedef struct
+{
+ ValKeyStatusT Status;
+ SysKeyIdT KeyId;
+} ValKeypadMsgT;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValKeypadMsgT valKeyInfo;
+} elt_val_ui_cp_key_press_cmd_msg_struct;
+
+typedef struct
+{
+ ValSmsEtsStatT Status;
+ ValSmsEtsMsgTypeT Type;
+ ValSmsEltStorageT Storage;
+ kal_uint16 Index;
+ ValSmsEltEmsFlagT EmsFlag;
+ kal_uint8 EmsSegment;
+ kal_uint8 EmsLast;
+ ValSmsEltPhbTypeT PhbType;
+ kal_uint8 PhbByteCount;
+ kal_uint8 Phonebook[32];
+ kal_uint8 Pdu_data[256];
+} ValSmsEltGetMsgRspMsgT;
+
+/* MSG_ID_ELT_VAL_SMS_DEL_ALL_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEtsMsgTypeT Type;
+ ValSmsEltStorageT Storage;
+} elt_val_sms_del_all_cmd_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_DEL_ALL_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEtsStatT Status;
+ ValSmsEtsMsgTypeT Type;
+ ValSmsEltStorageT Storage;
+} elt_val_sms_del_all_rsp_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_DEL_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint16 Index;
+ ValSmsEltStorageT Storage;
+} elt_val_sms_del_cmd_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_DEL_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEtsStatT Status;
+ kal_uint16 Index;
+ ValSmsEltStorageT Storage;
+} elt_val_sms_del_rsp_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_GET_FIRST_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEtsMsgTypeT Type;
+ ValSmsEltStorageT Storage;
+} elt_val_sms_get_first_cmd_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_GET_FIRST_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEltGetMsgRspMsgT msg;
+} elt_val_sms_get_first_rsp_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_GET_NEXT_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_val_sms_get_next_cmd_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_GET_NEXT_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEltGetMsgRspMsgT msg;
+} elt_val_sms_get_next_rsp_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_GET_COUNT_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEltStorageT Storage;
+} elt_val_sms_get_count_cmd_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_GET_COUNT_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEtsGetCountRspMsgT msg;
+} elt_val_sms_get_count_rsp_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_SEND_INDEX_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEltStorageT Storage;
+ kal_uint16 Index;
+ ValSmsEltSaveT SaveFlag;
+ ValSmsEltConfirmationT ConfirmFlag;
+} elt_val_sms_send_index_cmd_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_SEND_INDEX_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEtsStatT Status;
+ ValSmsEltStorageT Storage;
+ kal_uint16 Index;
+} elt_val_sms_send_index_rsp_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_SEND_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEltStorageT Storage;
+ kal_uint16 Index;
+ ValSmsEltEmsFlagT EmsFlag;
+ kal_uint8 EmsSegment;
+ kal_uint8 EmsLast;
+ ValSmsEltSaveT SaveFlag;
+ ValSmsEltConfirmationT ConfirmFlag;
+ kal_uint8 pdu_len;
+ kal_uint8 Pdu_data[253];
+} elt_val_sms_send_cmd_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_SEND_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEtsStatT Status;
+ ValSmsEltStorageT Storage;
+ kal_uint16 Index;
+ kal_uint8 EmsSegment;
+ kal_uint16 RefNum;
+ ValSmsEltErrClassT ErrorClass;
+} elt_val_sms_send_rsp_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_SET_STATUS_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEltStorageT Storage;
+ kal_uint16 Index;
+ kal_bool Read;
+} elt_val_sms_set_status_cmd_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_SET_STATUS_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEtsStatT Status;
+ ValSmsEltStorageT Storage;
+ kal_uint16 Index;
+} elt_val_sms_set_status_rsp_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_WRITE_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEtsMsgTypeT Type;
+ ValSmsEltStorageT Storage;
+ kal_uint16 Index;
+ ValSmsEltEmsFlagT EmsFlag;
+ kal_uint8 EmsSegment;
+ kal_uint8 EmsLast;
+ kal_uint8 pdu_len;
+ kal_uint8 Pdu_data[253];
+} elt_val_sms_write_cmd_msg_struct;
+
+/* MSG_ID_ELT_VAL_SMS_WRITE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsEtsStatT Status;
+ ValSmsEltStorageT Storage;
+ kal_uint16 Index;
+ kal_uint8 EmsSegment;
+ kal_uint16 RefNum;
+ ValSmsEltErrClassT ErrorClass;
+} elt_val_sms_write_rsp_msg_struct;
+
+/* MSG_ID_ELT_RCP_RTM_TEST_TXCHANSTAT_GET_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} elt_rcp_rtm_test_txchanstat_get_cmd_msg_struct;
+
+/* MSG_ID_ELT_RCP_RTM_TEST_TXCHANSTAT_GET_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ RtmTestTxChanStatGetRspMsgT msg;
+/*
+pilotChanGain (Q6), kal_uint16, base=10
+drcChanGain (Q7), kal_uint16, base=10
+ackChanGain (Q6), kal_uint16, base=10
+dataChanGain (Q5), kal_uint16, base=10
+rriChanGain (Q6), kal_uint16, base=10
+drcLockPeriod, kal_uint16, base=10
+*/
+} elt_rcp_rtm_test_txchanstat_get_rsp_msg_struct;
+
+/* MSG_ID_ELT_VAL_GET_ALERT_STATUS_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+}elt_val_get_alert_status_cmd_msg_struct;
+
+/* MSG_ID_ELT_VAL_GET_ALERT_STATUS_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValAlertStatusRspMsgT msg;
+}elt_val_get_alert_status_rsp_msg_struct;
+
+/* MSG_ID_ELT_C2K_VERSION_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+}elt_c2k_version_cmd_msg_struct;
+
+/* MSG_ID_ELT_C2K_VERSION_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 version[128];
+}elt_c2k_version_rsp_msg_struct;
+
+/* MSG_ID_ELT_UIM_SET_FACTORY_MODE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+}elt_uim_set_factory_mode_rsp_msg_struct;
+
+/* MSG_ID_ELT_UIM_GET_FACTORY_MODE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_bool factory_mode;
+}elt_uim_get_factory_mode_rsp_msg_struct;
+
+/* MSG_ID_ELT_C2K_LOOPBACK_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 size;
+ kal_uint8 msg[128];
+}elt_c2k_loopback_cmd_msg_struct;
+
+/* Data Sturcture for CP Loopback Rsp Msg */
+typedef struct
+{
+ kal_uint32 size;
+ kal_uint8 msg[128];
+} C2kLoopbackRspMsgT;
+
+/* MSG_ID_ELT_C2K_LOOPBACK_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ C2kLoopbackRspMsgT lpdata;
+}elt_c2k_loopback_rsp_msg_struct;
+
+/* MSG_ID_ELT_C2K_CONFIGURATION_CMD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+}elt_c2k_configuration_cmd_struct;
+
+/* Data Sturcture for CP Config Info Rsp Msg */
+typedef struct
+{
+ kal_uint8 AsicType;
+ kal_uint8 CPVersion;
+ kal_uint8 DSMPatchId;
+ kal_uint8 DSVPatchId;
+ kal_uint8 RFOption;
+ kal_uint8 RefClockFreq;
+ kal_bool UIMEnabled;
+ kal_bool FileSysEnabled;
+ kal_bool DataSvcEnabled;
+ kal_bool SchEnabled;
+ kal_bool DiversityEnabled;
+ kal_bool GPSEnabled;
+ kal_bool AuxAdcPollingEnabled;
+ kal_bool DigitalRxAgcEnabled;
+ kal_uint8 ManufactureId[20];
+ kal_uint8 ModelId[20];
+ kal_uint8 VerInfo[3];
+ kal_uint8 MobileIdType;
+ kal_bool EPRL_Supported;
+} C2kConfigInfoRspMsgT;
+typedef enum
+{
+ ESN_Only = 1,
+ MEIDorESN= 2
+
+} CPMobileIDType;
+
+/* MSG_ID_ELT_C2K_CONFIGURATION_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ C2kConfigInfoRspMsgT info;
+}elt_c2k_configuration_rsp_msg_struct;
+/* MSG_ID_ELT_SYS_C2K_FRC_SYNC */
+
+/* MSG_ID_L4C_ENTER_FACTORY_MODE_REQ */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ Ll1aStandbyGapLenIndT Msg;
+} elt_ll1a_standby_gap_length_ind_msg_struct; /* MSG_ID_ELT_LL1A_STANDBY_GAP_LENGTH_IND_MSG */
+
+
+/* MSG_ID_L4C_ENTER_FACTORY_MODE_REQ */
+typedef struct
+{
+ LOCAL_PARA_HDR
+
+} l4c_enter_factory_mode_req_struct;
+
+typedef struct
+{
+ kal_int16 Band;
+ kal_int32 Groupdelay;
+}AgpsGroupDelayMsgT;
+
+/*MSG_ID_ELT_L1D_GET_AGPS_GROUP_DELAY_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AgpsGroupDelayMsgT info[5];
+}elt_l1d_get_agps_group_delay_rsp_msg_struct;
+
+/*MSG_ID_ELT_L1D_SET_AGPS_GROUP_DELAY_CMD_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AgpsGroupDelayMsgT setinfo;
+}elt_l1d_set_agps_group_delay_cmd_msg_struct;
+
+/*MSG_ID_ELT_L1D_GET_AGPS_GROUP_DELAY_CMD_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}elt_l1d_get_agps_group_delay_cmd_msg_struct;
+
+/*MSG_ID_ELT_L1D_SET_AGPS_GROUP_DELAY_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AgpsGroupDelayMsgT info[5];
+}elt_l1d_set_agps_group_delay_rsp_msg_struct;
+
+#endif
diff --git a/mcu/interface/protocol/l4_c2k/etsapi.h b/mcu/interface/protocol/l4_c2k/etsapi.h
new file mode 100644
index 0000000..91992b6
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/etsapi.h
@@ -0,0 +1,217 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 1998-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+/*****************************************************************************
+
+ FILE NAME: etsapi.h
+
+ DESCRIPTION:
+
+ This file contains all the constants, mail message definition and
+ function prototypes exported by the ets unit.
+
+*****************************************************************************/
+
+#ifndef ETSAPI_H
+#define ETSAPI_H
+
+#include "monapi.h"
+#include "sysdefs.h"
+#include "sysapi.h"
+
+/*------------------------------------------------------------------------
+ * Constants
+ *------------------------------------------------------------------------*/
+
+ /* msg size constants */
+#define ETS_MSG_ID_LEN 2
+#define ETS_CHECKSUM_LEN 1
+#define ETS_MAX_MSG_BUFF_LEN EXE_MAX_ETS_MSG_SIZE
+#define ETS_MAX_MSG_LEN (ETS_MAX_MSG_BUFF_LEN + ETS_MSG_ID_LEN)
+#define ETS_MAX_PACKET_LEN (ETS_MAX_MSG_LEN + ETS_CHECKSUM_LEN)
+
+ /* msg framing chars */
+#define ETS_SER_ESC_CHAR 0xFD
+#define ETS_SER_SYNC_CHAR 0xFE
+#define ETS_SER_MOD_CHAR 0xFF
+
+/* USB and SS_LTE_DO DPRAM interface use same ETS msg format definitions */
+#define ETS_USB_SYNC 0x98BADCFE /* SYNCH field, reversed to fit a kal_uint32 format */
+#define ETS_USB_SYNC_SZ sizeof(kal_uint32) /* size of SYNCH field */
+#define ETS_USB_PAD 0xFE /* to pad ETS msgs to 4 bytes */
+
+typedef PACKED_PREFIX struct {
+ kal_uint32 Synch; /* synch signature */
+ kal_uint16 MsgLen; /* msg size, including msg id */
+ kal_uint16 MsgId; /* ETS message id */
+} PACKED_POSTFIX EtsMsgHeaderT;
+
+
+ /* ETS display size for MMI */
+#define ETS_MAX_DISPLAY_COLS 16
+#define ETS_MAX_DISPLAY_ROWS 2
+
+/*------------------------------------------------------------------------
+ * Mailbox, signal amd message IDs exported byETS
+ *-----------------------------------------------------------------------*/
+
+
+
+
+/*------------------------------------------------------------------------
+ * Mailbox, signal amd message IDs exported by ETS task
+ *-----------------------------------------------------------------------*/
+
+#define ETS_MAILBOX_ETS EXE_MAILBOX_1_ID /* ETS (MonFault/trace/spy/mailbox */
+#define ETS_MAILBOX_ETS_EVENT EXE_MESSAGE_MBOX_1
+
+#define ETS_MAILBOX_CMD EXE_MAILBOX_2_ID /* Command mailbox */
+#define ETS_MAILBOX_CMD_EVENT EXE_MESSAGE_MBOX_2
+
+#define ETS_QUEUE_FULL_SIGNAL EXE_SIGNAL_1 /* used by EXE */
+#define ETS_USB_RX_MSG_SIGNAL EXE_SIGNAL_2 /* data received */
+#define ETS_USB_TX_MSG_SIGNAL EXE_SIGNAL_3 /* data sent */
+#define ETS_UART_RX_ETS_MSG_SIGNAL EXE_SIGNAL_4
+#define ETS_STARTUP_SIGNAL EXE_SIGNAL_5
+#ifdef MTK_DEV_LOG_SPLM
+#define ETS_RX_SPLM_MSG_SIGNAL EXE_SIGNAL_6
+#endif
+
+/* TBD: Change to ETS_R/TX_MSG_SIGNAL */
+#define ETS_RX_ETS_MSG_SIGNAL ETS_USB_RX_MSG_SIGNAL
+#define ETS_TX_ETS_MSG_SIGNAL ETS_USB_TX_MSG_SIGNAL
+
+ /* grouping of USB data signals */
+#define ETS_USB_ALL_SIGNAL (ETS_USB_RX_MSG_SIGNAL | ETS_USB_TX_MSG_SIGNAL)
+
+/*------------------------------------------------------------------------
+ * Message IDs for _ETS mailbox
+ *-----------------------------------------------------------------------*/
+
+ /* enum for ETS message IDs is in iopets.h */
+
+ /* IOP_CP_DISPLAY_ETS */
+typedef enum
+{
+ ETS_ROW_1 = 0,
+ ETS_ROW_2 = 1
+} EtsRowIdT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_uint8 Row;
+ kal_uint8 Column;
+ kal_uint8 Text[ETS_MAX_DISPLAY_COLS + 1];
+} PACKED_POSTFIX EtsDispTextMsgT;
+
+/* IOP_DSPM_PEEK_ETS */
+/* IOP_DSPV_PEEK_ETS */
+typedef PACKED_PREFIX struct
+{
+ kal_uint16 StartAddr;
+ kal_uint16 NumWords;
+ kal_uint16 Data[1];
+} PACKED_POSTFIX EtsDspPeekRspMsgT;
+
+/* IOP_GENERIC_ACK_ETS */
+typedef PACKED_PREFIX struct
+{
+ kal_uint16 MsgId;
+} PACKED_POSTFIX EtsGenericAckT;
+
+/* IOP_ENABLE_GENERIC_ACK_MSG */
+typedef PACKED_PREFIX struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint16 Enable;
+} PACKED_POSTFIX EtsEnableGenericAckMsgT;
+
+/* ETS_DEFERRED_HALT_MSG */
+typedef PACKED_PREFIX struct
+{
+ MonFaultUnitT UnitNum;
+ kal_uint32 FaultCode1;
+ kal_uint32 FaultCode2;
+} PACKED_POSTFIX EtsDeferredHaltMsgT;
+
+/*------------------------------------------------------------------------
+ * Message IDs for _CMD mailbox
+ *-----------------------------------------------------------------------*/
+
+typedef enum
+{
+ ETS_ENABLE_GENERIC_ACK_MSG,
+ ETS_SET_CHANNEL_DEVICE_MSG,
+ ETS_DEFERRED_HALT_MSG,
+#ifdef SYS_OPTION_DUAL_CARDS
+ UIM_ETS_SET_ACCESS_SLOT_MSG,
+#endif
+#ifdef MTK_DEV_LOG_FILTER_NVRAM
+ ETS_NVRAM_LOG_FILTER_UPDATE_ACK_MSG,
+ ETS_LOG_FILTER_UPDATE_MSG,
+#endif
+ ETS_CMD_MSG_NUM
+} EtsMsgIdT;
+
+/*------------------------------------------------------------------------
+ * Exported ETS functions
+ *-----------------------------------------------------------------------*/
+
+extern void EtsTxCriticalFault(MonFaultUnitT UnitNum, kal_uint32 FaultCode1, kal_uint32 FaultCode2);
+
+extern void EtsTxCriticalMsg( kal_uint32 MsgId, void *MsgDataP, kal_uint32 MsgDataSize );
+
+extern void EtsTxFaultFileInfo(char *FilenameBuffer);
+
+#if (defined(MTK_DEV_BUG_FIX_SS) && defined(BOARD_CBP80_FLASH)) || defined(MTK_PLT_MODEM_ONLY)
+extern void EtsUartTxCriticalMsg( kal_uint32 MsgId, void* MsgDataP, kal_uint32 MsgDataSize ) ;
+#endif
+
+#ifdef MTK_DEV_OPTIMIZE_LOGGING
+extern void MonLogOptUartTxEts (void);
+#endif
+
+#endif /* ETSAPI_H */
+
+
+
diff --git a/mcu/interface/protocol/l4_c2k/gmss_cval_struct.h b/mcu/interface/protocol/l4_c2k/gmss_cval_struct.h
new file mode 100644
index 0000000..d3f0a0d
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/gmss_cval_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) 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:
+ * ---------
+ * gmss_cval_struct.h
+ *
+ * Project:
+ * --------
+ * LR12
+ *
+ * Description:
+ * ------------
+ * This file is the interface between MD1/GMSS and MD3/VAL
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *============================================================================
+ * HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ * removed!
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+
+#ifndef _GMSS_CVAL_STRUCT_H_
+#define _GMSS_CVAL_STRUCT_H_
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_bool is_dan_sms_start;
+}gmss_cval_send_dan_sms_ind_struct;
+
+#endif /* _GMSS_CVAL_STRUCT_H_ */
+
diff --git a/mcu/interface/protocol/l4_c2k/iopapi.h b/mcu/interface/protocol/l4_c2k/iopapi.h
new file mode 100644
index 0000000..7be725b
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/iopapi.h
@@ -0,0 +1,631 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 1998-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+/*****************************************************************************
+
+ FILE NAME: iopapi.h
+
+ DESCRIPTION:
+
+ This file contains all the constants, mail message definition and
+ function prototypes exported by the IOP unit.
+
+*****************************************************************************/
+
+#ifndef IOPAPI_H
+#define IOPAPI_H
+
+#include "cpbuf.h"
+
+
+/*------------------------------------------------------------------------
+ * Message IDs for _CMD mailbox
+ *-----------------------------------------------------------------------*/
+#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 !*/
+#ifdef SYS_OPTION_LTEDO_UART
+/* under construction !*/
+#endif
+/* under construction !*/
+/* under construction !*/
+#endif
+
+typedef enum
+{
+ IOP_ACK = 0,
+ IOP_SET_BAUD
+} IopBaudCmdT;
+
+typedef PACKED_PREFIX struct
+{
+ ExeRspMsgT RspInfo;
+ IopBaudCmdT Cmd;
+ kal_uint8 Delay;
+} PACKED_POSTFIX IopSetBaudMsgT;
+
+
+ /* IOP_SETBAUD_DATA_MSG */
+typedef PACKED_PREFIX struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint8 UartNum;
+} PACKED_POSTFIX IopSetDataBaudMsgT;
+
+ /* IOP_USB_ETS_CTRL_MSG */
+typedef PACKED_PREFIX struct
+{
+ kal_bool Open;
+} PACKED_POSTFIX IopUsbEtsCtrlMsgT;
+
+ /* IOP_CNG_UART_MSG */
+typedef enum {
+ NO_UART,
+ ETS_UART,
+ GPS_UART,
+ GPS_UART_VASCO
+#if ((defined BLUETOOTH_CSR) || (defined BLUETOOTH_BCM2046))
+ ,
+ BT_UART
+#endif
+
+#ifdef SYS_OPTION_IOPHAL_UART
+ ,
+ AT_UART,
+ DATA_UART,
+ IOPHAL_UART
+#endif
+#ifdef SYS_OPTION_LTEDO_UART
+ ,
+ LTEDO_UART
+#endif
+}UartTypeT;
+
+
+
+typedef enum
+{
+ IOP_HAL_SER_DEV,
+ IOP_HAL_USB_DEV,
+ IOP_HAL_DPRAM_DEV,
+ IOP_HAL_SDIO_SLAVE_DEV,
+ IOP_HAL_SDIO_MASTER_DEV,
+ IOP_HAL_ESPI_DEV,
+ IOP_HAL_MUX_DEV,
+ IOP_HAL_CCIF_DEV,
+ IOP_HAL_DEV_NUM, /* Always last in this list */
+ IOP_HAL_INVALID_DEV=0xff
+}IOP_HAL_DEVICE;
+
+typedef IOP_HAL_DEVICE IopDeviceHalT;
+typedef IOP_HAL_DEVICE IopDeviceInfoT;
+typedef IOP_HAL_DEVICE IopDeviceDataT;
+
+typedef IOP_HAL_DEVICE CPTranDevT;
+
+typedef PACKED_PREFIX struct {
+ CPTranDevT InfoDev;
+} PACKED_POSTFIX IopCpTxDevMsgT;
+
+typedef PACKED_PREFIX struct {
+ IopDeviceInfoT InfoDev;
+ IopDeviceDataT DataDev;
+} PACKED_POSTFIX IopSetDevMsgT;
+
+typedef PACKED_PREFIX struct {
+ ExeRspMsgT RspInfo;
+ kal_uint8 Channel;
+ kal_uint8 Device;
+} PACKED_POSTFIX IopChanSwitchMsgT;
+#define SIZEOF_CH_SWITCH_RSP_MSG 2
+
+typedef PACKED_PREFIX struct {
+ ExeRspMsgT RspInfo;
+ kal_uint8 Channel;
+} PACKED_POSTFIX IopChanQueryMsgT;
+#define SIZEOF_CH_QUERY_RSP_MSG 3
+
+typedef PACKED_PREFIX struct {
+ ExeRspMsgT RspInfo;
+ kal_uint8 Channel;
+ kal_bool state;
+} PACKED_POSTFIX IopChanOnOffMsgT;
+#define SIZEOF_CH_ONOFF_RSP_MSG 2
+
+ /* IOP_AIW_C109_IND_MSG */
+typedef PACKED_PREFIX struct {
+ kal_bool C109On; /* status of C109, active high */
+ kal_uint8 chan;
+} PACKED_POSTFIX IopValC109IndMsgT;
+
+ /* IOP_USB_C108_IND_MSG */
+typedef PACKED_PREFIX struct {
+ kal_bool C108On; /* status of C108 as reported by USB windriver, active high */
+ kal_bool CableUnplugged; /* KAL_TRUE if this IND sent because cable unplugged */
+} PACKED_POSTFIX IopUsbC108IndMsgT;
+
+ /* IOP_AIW_MODEM_ALIVE_MSG */
+typedef PACKED_PREFIX struct {
+ kal_bool IsAlive; /* KAL_TRUE == modem task is ready to accept AT cmds */
+} PACKED_POSTFIX IopValModemAliveMsgT;
+
+ /* IOP_SET_DATA_THR */
+typedef PACKED_PREFIX struct {
+ kal_uint16 HighThr; /* high threshold for data cache */
+} PACKED_POSTFIX IopSetDataThrMsgT;
+
+#ifdef MTK_DEV_LOG_FILTER_NVRAM
+typedef PACKED_PREFIX struct {
+ kal_bool NvramStartupLogFlag;
+ kal_bool NvramFilterUpdateFlag;
+} PACKED_POSTFIX IopNvramCtlMsgT;
+#endif
+
+typedef struct
+{
+ kal_uint8 mode;
+ kal_uint8 frameType;
+ kal_uint8 portSpeed;
+ kal_uint16 N1;
+ kal_uint8 T1;
+ kal_uint8 N2;
+ kal_uint8 T2;
+ kal_uint8 T3;
+ kal_uint8 K;
+}IopMuxSysParaT;
+
+/*------------------------------------------------------------------------
+ * Message IDs for _DATA mailbox
+ *-----------------------------------------------------------------------*/
+
+/*#ifdef BLUETOOTH_BC4*/
+typedef struct
+{
+ kal_uint8 *Data;
+ kal_uint16 DataLen;
+}IopBTRxMsgT;
+
+/*#endif*/
+
+//don't modify following Enum, brew has referred to it
+typedef enum {
+ IOP_FWD_TX_REQ_MSG, /* This command is used to send data to IOP */
+ IOP_DATA_TX_ACK_MSG, /* This command is used to acknowledge the receipt of data from IOP */
+ IOP_BT_RX_REQ_MSG, /*BT Protocol stack send data to BC4*/
+ IOP_BT_TX_ACK_MSG /*BT Protocol stack send ACK to CBP when it receive data*/
+} IopDataMsgIdT;
+
+
+/* Iop channels are now fixed regardless of build options for better maintainance.
+ 0-15 is reserved for CBP7 internal usage only and should not be used by third party */
+typedef enum {
+ IopControlChannel = 0,
+ IopEtsChannel = 1,
+ IopDataChannelPPP = 2,
+ IopDataChannelLBS = 3,
+ IopDataChannelVoice = 4,
+ IopDataChannelATCmds_1 = 5,
+ IopDataChannelATCmds_2 = 6,
+ IopEtsChannel_1 = 7,
+#ifdef SYS_OPTION_ATCMD_CH_3
+ IopDataChannelATCmds_3 = 8,
+#ifdef SYS_OPTION_ATCMD_CH_4
+ IopDataChannelATCmds_4 = 11,
+#ifdef SYS_OPTION_MORE_AT_CHANNEL
+ IopDataChannelATCmds_5 = 12,
+ IopDataChannelATCmds_6 = 13,
+ IopDataChannelATCmds_7 = 14,
+ IopDataChannelATCmds_8 = 15,
+#endif /* SYS_OPTION_MORE_AT_CHANNEL */
+#endif /* SYS_OPTION_ATCMD_CH_4 */
+#endif /* SYS_OPTION_ATCMD_CH_3 */
+#ifdef IOP_DEBUG_OPTION_DATA_LOOPBACK
+ IopDataChannelLoopBack = 15,
+#endif
+
+ /* user extended channel should start from 16 */
+ IopUserExtChannel = 16,
+#ifdef SYS_FLASH_LESS_SUPPORT
+ IopDataChannelRfs = 17,
+#endif
+
+ IopSysChannelNum,
+ IopAllChanNum=IopSysChannelNum
+} IopDataChannel;
+
+//don't modify following Struct, brew has referred to it
+typedef PACKED_PREFIX struct {
+ ExeRspMsgT RspInfo;
+ kal_uint8 *Data;
+ kal_uint16 DataLen;
+ kal_uint8 chan;
+} PACKED_POSTFIX IopValFwdTxMsgT;
+
+typedef PACKED_PREFIX struct {
+ ExeRspMsgT RevDestInfo;
+ IopDataChannel Channel;
+} PACKED_POSTFIX IopSetRevDataPathMsgT;
+
+/*------------------------------------------------------------------------
+ * Message IDs for _GPS mailbox
+ *-----------------------------------------------------------------------*/
+typedef enum {
+ IOP_GPS7560_TX_DATA_MSG /* Data from external GPS */
+} IopGpsMsgIdT;
+
+typedef struct
+{
+ kal_uint16 DataLen;
+ kal_uint8 Data[2]; /* This is just place holder. We make it 2 bytes for alignment */
+} IopGps7560TxDataMsgT;
+
+/*------------------------------------------------------------------------
+ * Definitions and exported functions for handling data with CpBuffers
+ *-----------------------------------------------------------------------*/
+#define PPP_CHANNEL_FWD_QDEPTH 450
+#define PPP_CHANNEL_REV_QDEPTH 300
+
+typedef enum {
+ IopDataChRetOK,
+ IopDataChRetNA, /*Channel not available */
+ IopDataChRetFull, /* Buffer Q full */
+ IopDataChRetOK_Empty, /* Buffer Q empty after read successfully */
+ IopDataChRetErr /* Error occurred. */
+} IopDataChRetStatus;
+
+typedef struct {
+ CpBufferT *bufPtr;
+ kal_uint16 offset;
+ kal_uint16 dataLen;
+ kal_uint8 nRLPFlow;
+ kal_uint8 streamType;
+
+ kal_uint16 tcpTag;
+ kal_uint32 tcpPort;
+ kal_uint32 srcIpAddr;
+ kal_uint32 dstIpAddr;
+
+#ifdef CBP7_EHRPD
+ kal_uint16 FrameType; /* distinguish Ipv4/Ipv6 and PDN-ID */
+#endif
+
+ kal_uint8 BearerId;
+} IopDataCpBuffDescT;
+
+#define IOP_DEBUG_RX_INFO_IDX (30)
+#define IOP_DEBUG_TX_INFO_IDX (60)
+
+/* store the 4-line information */
+typedef struct
+{
+ kal_uint32 header;
+
+ /*Rx device type and the Rxstatus of this device*/
+ kal_uint8 RxDevStatus;
+ kal_uint8 RxLastDevStatus;
+
+ /*Tx device type and the Txstatus of this device*/
+ kal_uint8 TxDevStatus;
+ kal_uint8 TxLastDevStatus;
+
+ /* the GPIO value for 4-line */
+ kal_uint8 CpWkApGpio;
+ kal_uint8 CpRdyGpio;
+ kal_uint8 ApWkCpGpio;
+ kal_uint8 ApRdyGpio;
+
+ /* store the log information */
+ kal_uint16 TxLogBuffIdx;
+ kal_uint16 RxLogBuffIdx;
+ kal_uint16 TxLogBuff[IOP_DEBUG_TX_INFO_IDX];
+ kal_uint16 RxLogBuff[IOP_DEBUG_RX_INFO_IDX];
+
+ kal_uint32 footer;
+}IopStatusInfoT;
+
+
+/* Frame type in IopDataCpBuffDescT structure, the lower 8 bit is PDN-ID */
+#define IOP_DATA_EIPV4_TYPE 0xA000 /* EHRPD IPv4 with PDN-ID (0xA0xx) */
+#define IOP_DATA_EIPV6_TYPE 0xA100 /* EHRPD IPv6 with PDN-ID (0xA1xx) */
+#define IOP_DATA_IPV4_TYPE IOP_DATA_EIPV4_TYPE /* IPv4 for 1x/DO is fixed to 0xA000 */
+#define IOP_DATA_IPV6_TYPE IOP_DATA_EIPV6_TYPE /* IPv6 for 1x/DO is fixed to 0xA100 */
+#define IOP_DATA_NULL_TYPE 0 /* No info in IPC Data frame */
+#ifdef SYS_OPTION_IOP_CCIF
+#define IOP_DATA_PDNID_MASK 0x007F /* mask for PDN ID */
+#define CCMNI_CHANNEL_HEADER_FALG (1U << 7)
+#define CCMNI_CHANNEL_NUM 8
+#else
+#define IOP_DATA_PDNID_MASK 0x00FF /* mask for PDN ID */
+#endif
+/* Flags for IopWrite/IopRead functions
+ */
+#define IOP_WRITE_FLAG_SND_ACK (1<<0)
+#ifdef IOP_DEV_CH_LOOP_TEST
+typedef enum {
+ OPT_LOOPBACK_NON = 0,
+ OPT_LOOPBACK_OPEN = 1,
+ OPT_LOOPBACK_CLOSE = 2,
+ OPT_LOOPBACK_QUERY = 3,
+ OPT_LOOPBACK_NUM
+}IOP_OPT_LOOPBACK;
+
+typedef enum {
+ RSLT_LOOPBACK_SUCCESS = 0,
+ RSLT_LOOPBACK_WORK = 1,
+ RSLT_LOOPBACK_CLOSED = 2,
+ RSLT_LOOPBACK_INVALID = 3,
+ RSLT_LOOPBACK_FAIL = 4,
+ RSLT_LOOPBACK_NUM
+}IOP_RSLT_LOOPBACK;
+
+typedef struct {
+ IopDeviceInfoT Dev;
+ IOP_OPT_LOOPBACK Operation;
+ kal_uint8 Lchan;
+ kal_uint8 Reserv;
+}IopCtrlLoopbackMsg;
+
+typedef struct {
+ IopDeviceInfoT Dev;
+ IOP_OPT_LOOPBACK Operation;
+ kal_uint8 Lchan;
+ IOP_RSLT_LOOPBACK Result;
+}IopAckLoopbackMsg;
+#endif
+
+/* CCIF dev */
+#ifdef SYS_OPTION_IOP_CCIF
+/* IOP channel */
+typedef enum
+{
+#ifndef SYS_OPTION_CCIF_LOOPTEST
+ IOP_CCIF_CTRL_CHANNEL,
+ IOP_CCIF_VOICE_CHANNEL, /* voice with high priority */
+ IOP_CCIF_PPP_CHANNEL,
+ IOP_CCIF_ETS_CTRL_CHANNEL,
+#if (SYS_OPTION_IPC_DEV == SYS_IPC_DEV_CCIF)
+ IOP_CCIF_RFS_CHANNEL,
+#endif
+ IOP_CCIF_AT_1_CHANNEL,
+ IOP_CCIF_LBS_CHANNEL,
+#ifdef SYS_OPTION_ATCMD_CH_2
+ IOP_CCIF_AT_2_CHANNEL,
+#endif
+#ifdef SYS_OPTION_ATCMD_CH_3
+ IOP_CCIF_AT_3_CHANNEL,
+#endif
+ IOP_CCIF_ETS_CHANNEL,
+#ifdef SYS_OPTION_ATCMD_CH_4
+ IOP_CCIF_AT_4_CHANNEL,
+#endif
+ IOP_CCIF_CCMNI_0_CHANNEL = 12,
+ IOP_CCIF_CCMNI_1_CHANNEL = 13,
+ IOP_CCIF_CCMNI_2_CHANNEL = 14,
+ IOP_CCIF_CCMNI_3_CHANNEL = 15,
+ IOP_CCIF_CCMNI_4_CHANNEL = 16,
+ IOP_CCIF_CCMNI_5_CHANNEL = 17,
+ IOP_CCIF_CCMNI_6_CHANNEL = 18,
+ IOP_CCIF_CCMNI_7_CHANNEL = 19,
+#ifdef SYS_OPTION_MORE_AT_CHANNEL
+ IOP_CCIF_AT_5_CHANNEL = 20,
+ IOP_CCIF_AT_6_CHANNEL = 21,
+ IOP_CCIF_AT_7_CHANNEL = 22,
+ IOP_CCIF_AT_8_CHANNEL = 23,
+#endif /* SYS_OPTION_NEW_ADD_AT_CHANNEL */
+
+
+#else
+ IOP_CCIF_TEST0_CHANNEL,
+ IOP_CCIF_TEST1_CHANNEL,
+ IOP_CCIF_TEST2_CHANNEL,
+#endif
+ IOP_CCIF_NUM_CHANNELS
+
+}IopCcifChannelT;
+
+
+/* CCIF ringbuffer software header */
+typedef struct
+{
+ kal_uint32 Data[2];
+ kal_uint32 Channel;
+ kal_uint32 Reserved;
+} IopBuffT;
+
+
+typedef enum
+{
+ IOP_CCIF_PQ_0, /* priority queue 0 , the most high priority */
+ IOP_CCIF_PQ_1,
+ IOP_CCIF_PQ_2,
+ IOP_CCIF_PQ_3,
+ IOP_CCIF_PQ_4,
+ IOP_CCIF_PQ_5,
+ IOP_CCIF_PQ_6,
+ IOP_CCIF_PQ_7,
+ IOP_CCIF_PQ_MAX
+}IopCcifPriQueT;
+
+/*!
+ * @brief CONTROL_CHANNEL_MSG
+ * CCCI Message ID Passing Through CONTROL_CHANNEL and SYSTEM_CHANNEL
+ * NOTICE: Negotiations With AP Owner Before Modification
+ */
+typedef enum
+{
+ CCMSG_ID_START_BOOT = 0x00000000,
+ CCMSG_ID_NORMAL_BOOT_READY = 0x00000001,
+ CCMSG_ID_META_BOOT_READY = 0x00000002,
+ CCMSG_ID_RESET = 0x00000003,
+ CCMSG_ID_EXCEPTION_CHECK = 0x00000004,
+ CCMSG_ID_DRV_VERSION_ERR = 0x00000005,
+ CCMSG_ID_EXCEPTION_REC_OK = 0x00000006,
+ CCMSG_ID_EXCEPTION_PASS = 0x00000008,
+ /* System Channel */
+ CCMSG_ID_MD_L4_MOD = 0x0000000E,//add for RIL (AP task) and L4C (MD task) communication message
+ CCMSG_ID_MD_L4_MAX_TX_PWR_RED_REQ = 0x0000000F,
+
+ CCMSG_ID_MD_LEGACY_END = 0x000000FF,
+ CCMSG_ID_SYSMSGSVC_MASK = 0x00000100,
+ CCMSG_ID_SYSMSGSVC_START = 0x00000100,
+ CCMSG_ID_SYSMSGSVC_DUMMY = 0x000000FF,
+ //- section 0x100 ~ 0x1FF : reserved for system message service used
+
+ CCMSG_ID_SYSMSGSVC_END,
+
+ CCMSG_ID_MD_WDT_FLAG = 0x00001000, //- for MT6577/MT6589, AP cannot receive MD WDT interrupt issue. k2 md2 6589, for resolving wdt build error
+
+}CONTROL_CHANNEL_MSG;
+#endif
+
+#ifdef SYS_OPTION_CCISM_2SCP
+
+typedef struct
+{
+ kal_uint8* Buffp;
+ kal_uint32 Len;
+}IopCcismBufDescT;
+
+typedef enum
+{
+ IOP_CCISM_AUDIO_CHANNEL,
+ IOP_CCISM_GEOFENCE_CHANNEL,
+ IOP_CCISM_MAX_CHANNEL
+}IopCcismChT;
+
+typedef enum
+{
+ IOP_CCISM_PQ_0, /* priority queue 0 , the most high priority */
+ IOP_CCISM_PQ_1,
+ IOP_CCISM_PQ_MAX
+}IopCcismPriQueT;
+
+#endif
+/*------------------------------------------------------------------------
+ * The following IOP functions shared by USB, DPRAM. SDIO etc.
+ *-----------------------------------------------------------------------*/
+extern IopDataChRetStatus IopWrite(IopDataCpBuffDescT * Buff, IopDataChannel channel, kal_uint32 flags);
+extern IopDataChRetStatus IopRead(IopDataCpBuffDescT* Buff, IopDataChannel channel, kal_uint32 flags);
+extern kal_uint16 IopCheckRxReadyStatus(IopDataChannel channel);
+extern kal_uint16 IopCheckTxReadyStatus(IopDataChannel channel);
+extern void IopCleanUpRevQue (void);
+extern void IopDisableRevFlowCtl(void);
+extern void IopSetRevPathAtPPPChannel(IopSetRevDataPathMsgT*);
+extern void IopGetRevPathAtPPPChannel(IopSetRevDataPathMsgT*);
+extern kal_uint8 IopGetC108Status(void);
+
+/*------------------------------------------------------------------------
+ * Exported IOP functions
+ *-----------------------------------------------------------------------*/
+
+//extern void IopSetBaudRate(IopBaudT BaudRate, kal_uint8 UartNum);
+extern void IopUpdateDataUartSettings(void);
+extern kal_uint8 IopUartNumGet(UartTypeT UartType);
+#if (SYS_OPTION_USB != SYS_USB_NONE)
+extern void IopUsbSetDevice(void);
+#endif
+extern void IopSerSetDevice(void);
+#ifdef IOP_DEV_CH_LOOP_TEST
+extern IOP_RSLT_LOOPBACK RfsLoopTstCmdHandler(IopDeviceInfoT Dev, IOP_OPT_LOOPBACK Operation);
+extern IOP_RSLT_LOOPBACK IopEtsLoopTstCmdHandler(IopDeviceInfoT Dev, IOP_OPT_LOOPBACK Operation);
+#endif
+#endif /* IOPAPI_H */
+
+/*****************************************************************************
+ End of File
+******************************************************************************/
+
+/**Log information: \main\Trophy_0.3.X\1 2013-03-29 09:00:13 GMT fwu
+** HREF#008278, Support uart to be the AT communication channel between AP and CP.**/
+/**Log information: \main\Trophy\Trophy_fwu_href22082\1 2013-04-03 02:26:29 GMT fwu
+** HREF#22082, Modified to support UART1 to be the AT channel between AP and CP.**/
+/**Log information: \main\Trophy\1 2013-04-03 02:57:01 GMT hzhang
+** HREF#22082 to merge code.**/
+/**Log information: \main\Trophy\Trophy_xding_href22331\1 2013-12-10 07:17:49 GMT xding
+** HREF#22331, ºÏ²¢MMCÏà¹Ø¹¦Äܵ½Trophy baselineÉÏ**/
+/**Log information: \main\Trophy\2 2013-12-10 08:33:18 GMT jzwang
+** href#22331:Merge MMC latest implementation from Qilian branch.**/
+/**Log information: \main\Trophy\Trophy_fwu_href22333\1 2013-12-17 04:59:22 GMT fwu
+** HREF#22333. Trophy cbp82c_flashless_sdio_mmc version will crash when LTEDO_UART is enabled.**/
+/**Log information: \main\Trophy\3 2013-12-17 05:29:19 GMT hzhang
+** HREF#22333 to modify IOP_LTEDOUART_RX_SIGNAL definition **/
+/**Log information: \main\Trophy\Trophy_fwu_href22348\1 2014-01-08 06:17:22 GMT fwu
+** HREF#22348. Merge ESPI related source code.**/
+/**Log information: \main\Trophy\4 2014-01-09 06:34:40 GMT zlin
+** HREF#22348, merge code.**/
+
diff --git a/mcu/interface/protocol/l4_c2k/l4b_cval_enum.h b/mcu/interface/protocol/l4_c2k/l4b_cval_enum.h
new file mode 100644
index 0000000..2dc42f1
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/l4b_cval_enum.h
@@ -0,0 +1,99 @@
+/*****************************************************************************
+* 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:
+ * ---------
+ * l4b_cval_enum.h
+ *
+ * Description:
+ * ------------
+ *
+ * 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 _L4B_CVAL_ENUM_H
+#define _L4B_CVAL_ENUM_H
+
+typedef enum
+{
+ VAL_CS_REG_HOME_SERVICE = 1, /*mapping +vser:0 & 1x registered & roaming status:0*/
+ VAL_CS_REG_ROAM_SERVICE = 5, /*mapping +vser:0 & 1x registered & roaming status:1*/
+
+ VAL_CS_REG_NORMAL_SERVICE = 101, /*mapping +vser:0*/
+ VAL_CS_REG_NO_SERVICE = 102, /*mapping +vser:1*/
+ VAL_CS_REG_OUT_OF_SERVICE = 103, /*mapping +vser:2*/
+ VAL_CS_REG_LIMIT_SERVICE = 104, /*mapping +vser:3*/
+
+ VAL_CS_REG_MAX_STATUS
+}ValCsRegStatusT;
+
+typedef enum
+{
+ VAL_PS_REG_HOME_SERVICE = 1, /*mapping +ecgreg:1(PS registered) & roaming status:0*/
+ VAL_PS_REG_ROAM_SERVICE = 5, /*mapping +ecgreg:1(PS registered) & roaming status:1*/
+
+ VAL_PS_NOT_REG_NO_NWK_SERVICE = 101, /*mapping +ecgreg:0 & ^mode:0, No NW, need to find NW*/
+ VAL_PS_NOT_REG_1XRTT_SERVICE = 102, /*mapping ^mode:2, MT find 1x NW,but need wait result of registered*/
+ VAL_PS_NOT_REG_DO_SERVICE = 103, /*mapping ^mode:4, MT find Do NW,but need wait result of registered*/
+ VAL_PS_NOT_REG_1X_DO_SERVICE = 104, /*mapping ^mode:8, MT find 1x&Do NW,but need wait result of registered*/
+
+ VAL_PS_REG_CHECK_ROAM_STATUS, /*PS have been registered, need check whether it was Roaming*/
+ VAL_PS_REG_NO_CHANGE_STATUS, /*it need not that PS Regstration state changed*/
+
+ VAL_PS_REG_MAX_STATUS
+}ValPsRegStatusT;
+
+
+
+#endif /* _L4B_CVAL_ENUM_H */
+
diff --git a/mcu/interface/protocol/l4_c2k/l4b_cval_struct.h b/mcu/interface/protocol/l4_c2k/l4b_cval_struct.h
new file mode 100644
index 0000000..2295dd1
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/l4b_cval_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:
+ * ---------
+ * l4b_cval_struct.h
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+
+#ifndef _L4B_CVAL_STRUCT_H
+#define _L4B_CVAL_STRUCT_H
+
+//#include "kal_general_types.h"
+//#include "kal_public_defs.h"
+//#include "l4b_internal_defs.h"
+#include "atp_public_defs.h"
+//#include "sim_exported_enum.h"
+#include "ps_public_enum.h"
+
+#if defined(__MTK_TARGET__) && defined(__GEN93_L4_PRE_IT__)
+#define CVAL_MAX_AT_CMD_LEN 600
+#endif
+
+/* MSG_ID_L4B_CVAL_AT_CMD_REQ */
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 ch_id; //l4b_channel_enum
+#if defined(__MTK_TARGET__) && defined(__GEN93_L4_PRE_IT__)
+ kal_uint8 sim_id; //sim_interface_enum, this field is only used for pre-IT on Gen92, due to no source ID
+ kal_uint8 at_cmd[CVAL_MAX_AT_CMD_LEN]; //this field is only used for pre-IT on Gen92, due to no peer buffer
+#endif
+} l4b_cval_at_cmd_req_struct;
+
+/* MSG_ID_L4B_CVAL_AT_CMD_CNF */
+//typedef l4b_atci_at_cmd_cnf_struct l4b_cval_at_cmd_cnf_struct;
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 ch_id; //l4b_channel_enum
+ proxy_cmd_result_enum result;
+ kal_bool stuff;
+#if defined(__MTK_TARGET__) && defined(__GEN93_L4_PRE_IT__)
+ kal_uint8 at_rsp[CVAL_MAX_AT_CMD_LEN]; //this field is only used for pre-IT on Gen92, due to no peer buffer
+#endif
+} l4b_cval_at_cmd_cnf_struct;
+
+/* MSG_ID_L4B_CVAL_AT_URC_IND */
+//typedef l4b_atci_at_urc_ind_struct l4b_cval_at_urc_ind_struct;
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 ch_id;
+ kal_bool stuff;
+#if defined(__MTK_TARGET__) && defined(__GEN93_L4_PRE_IT__)
+ kal_uint8 at_urc[CVAL_MAX_AT_CMD_LEN]; //this field is only used for pre-IT on Gen92, due to no peer buffer
+#endif
+} l4b_cval_at_urc_ind_struct;
+
+/* MSG_ID_L4B_CVAL_ECSQ_CONFIG_IND */
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 ecsq_urc_mode; /*Mode 4 is for setting new criteria*/
+ kal_uint8 rsrp_threshold;
+ kal_uint8 mode; /*0 for reset criteria, 1 for set criteria*/
+ kal_uint8 num_of_thresholds;
+ kal_int32 threshold[10];
+ kal_uint32 HysterisisMS;
+} l4b_cval_ecsq_config_ind_struct;
+
+/* MSG_ID_L4B_CVAL_SIM_LOCK_IND */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 mode;
+}l4b_cval_sim_lock_ind_struct;
+
+// TODO: create new file l4bnw_cval_struct.h
+/* MSG_ID_L4BNW_CVAL_PS_TYPE_CONFIG_REQ */
+typedef struct {
+ LOCAL_PARA_HDR
+ l4_ps_type_config_enum ps_type;
+} l4bnw_cval_ps_type_config_req_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ l4_ps_config_result_enum result;
+} l4bnw_cval_ps_type_config_cnf_struct;
+
+#endif /* _L4B_CVAL_STRUCT_H */
+
+
diff --git a/mcu/interface/protocol/l4_c2k/l4bpdn_cval_struct.h b/mcu/interface/protocol/l4_c2k/l4bpdn_cval_struct.h
new file mode 100644
index 0000000..0eb684a
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/l4bpdn_cval_struct.h
@@ -0,0 +1,328 @@
+/*****************************************************************************
+* 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:
+ * ---------
+ * l4bpdn_cval_struct.h
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *============================================================================
+ ****************************************************************************/
+
+#ifndef _L4BPDN_CVAL_STRUCT_H
+#define _L4BPDN_CVAL_STRUCT_H
+
+//#include "kal_general_types.h"
+//#include "kal_public_defs.h"
+
+#include "atcmd_struct.h"
+#include "tcm_context_public.h"
+#include "ps_public_enum_public.h"
+
+/* A general purpose AT-CMD confirm message */
+typedef struct {
+ LOCAL_PARA_HDR
+
+ at_cmd_cnf_struct cmd;
+} l4bpdn_cval_cmd_cnf_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+
+ at_cgev_ind_struct cmd;
+} l4bpdn_cval_cgev_ind_struct;
+
+/* This primitive is sent from L4BPDN to CVAL, it is ILM of cgact command */
+typedef struct {
+ LOCAL_PARA_HDR
+
+ at_cgact_req_struct cmd;
+} l4bpdn_cval_cgact_req_struct;
+
+/* This primitive is sent from L4BPDN to CVAL, it is ILM of egact command */
+typedef struct {
+ LOCAL_PARA_HDR
+
+ at_egact_req_struct cmd;
+} l4bpdn_cval_egact_req_struct;
+
+typedef struct {
+ pdp_addr_type_enum type;
+ pdp_addr_len_enum len;
+ kal_uint8 val[IPV4V6_ADDR_LEN];
+} l4bpdn_cval_ip_addr_struct;
+
+typedef struct {
+ kal_uint8 apn_length;
+ kal_uint8 apn[MAX_APN_LEN];
+ kal_bool src_addr_sb_net_mask_present;
+ kal_uint8 src_addr_sb_net_mask[IPV4_ADDR_LEN * 2];
+ kal_bool ipv6_src_addr_sb_net_mask_present;
+ kal_uint8 ipv6_src_addr_sb_net_mask[IPV6_ADDR_LEN * 2];
+ kal_bool gw_addr_present;
+ kal_uint8 gw_addr[IPV4_ADDR_LEN];
+ kal_bool ipv6_gw_addr_present;
+ kal_uint8 ipv6_gw_addr[IPV6_ADDR_LEN];
+ kal_bool dns_present;
+ kal_uint8 dns[IPV4_ADDR_LEN];
+ kal_bool dns2_present;
+ kal_uint8 dns2[IPV4_ADDR_LEN];
+ kal_bool dns3_present;
+ kal_uint8 dns3[IPV4_ADDR_LEN];
+ kal_bool ipv6_dns_present;
+ kal_uint8 ipv6_dns[IPV6_ADDR_LEN];
+ kal_bool ipv6_dns2_present;
+ kal_uint8 ipv6_dns2[IPV6_ADDR_LEN];
+ kal_bool ipv6_dns3_present;
+ kal_uint8 ipv6_dns3[IPV6_ADDR_LEN];
+ kal_bool p_cscf_prim_addr_present;
+ kal_uint8 p_cscf_prim_addr[IPV4_ADDR_LEN];
+ kal_bool p_cscf_sec_addr_present;
+ kal_uint8 p_cscf_sec_addr[IPV4_ADDR_LEN];
+ kal_bool p_cscf_third_addr_present;
+ kal_uint8 p_cscf_third_addr[IPV4_ADDR_LEN];
+ kal_bool ipv6_p_cscf_prim_addr_present;
+ kal_uint8 ipv6_p_cscf_prim_addr[IPV6_ADDR_LEN];
+ kal_bool ipv6_p_cscf_sec_addr_present;
+ kal_uint8 ipv6_p_cscf_sec_addr[IPV6_ADDR_LEN];
+ kal_bool ipv6_p_cscf_third_addr_present;
+ kal_uint8 ipv6_p_cscf_third_addr[IPV6_ADDR_LEN];
+ kal_bool im_cn_signalling_flag_present;
+ kal_uint8 im_cn_signalling_flag;
+ kal_bool lipa_indication_present; // indicates that the PDP context provides connectivity using a LIPA PDN connection
+ kal_uint8 lipa_indication;
+ kal_bool v4_mtu_present; // shows the IPv4 MTU size in octets
+ kal_uint16 v4_mtu;
+ kal_bool wlan_offload_present; // indicates whether traffic can be offloaded using the specified PDN connection via a WLAN or not
+ kal_uint8 wlan_offload;
+ kal_bool local_addr_ind_present; // indicates whether or not the MS and the network support local IP address in TFTs
+ kal_uint8 local_addr_ind;
+} l4bpdn_cval_pdp_rdp_info_struct; // Refer: l4bpdn_tcm_pdp_rdp_info_struct
+
+typedef struct {
+ kal_uint8 mcc1;
+ kal_uint8 mcc2;
+ kal_uint8 mcc3;
+ kal_uint8 mnc1;
+ kal_uint8 mnc2;
+ kal_uint8 mnc3;
+} l4bpdn_cval_plmn_id_struct;
+
+typedef struct {
+ /* v4 dns -> Contained in l4bpdn_tcm_prim_pdp_rdp_info_struct */
+ /* v6 dns -> Contained in l4bpdn_tcm_prim_pdp_rdp_info_struct */
+ /* v4 mtu -> Contained in l4bpdn_tcm_prim_pdp_rdp_info_struct */
+
+ /* msisdn -> No need to update upper layers */
+ //kal_uint8 msisdn[MAX_MSISDN_LEN];
+ //kal_uint8 msisdn_len;
+
+ /****************************************
+ * Operator Specific PCOs in VZW: Start *
+ ****************************************/
+ /* 0xFF00 */
+ kal_bool pdn_application_access_control_present;
+ l4bpdn_cval_plmn_id_struct pdn_application_access_control_plmnid;
+ kal_uint8 pdn_application_access_control_action;
+
+ /* 0xFF01 */
+ kal_bool epdg_v6_plmnid_present;
+ l4bpdn_cval_plmn_id_struct epdg_v6_plmnid;
+ kal_bool epdg_v6_addr_present;
+ kal_uint8 epdg_v6_addr[IPV6_ADDR_LEN];
+ kal_bool epdg_v6_addr2_present;
+ kal_uint8 epdg_v6_addr2[IPV6_ADDR_LEN];
+
+ /* 0xFF02 */
+ kal_bool epdg_v4_plmnid_present;
+ l4bpdn_cval_plmn_id_struct epdg_v4_plmnid;
+ kal_bool epdg_v4_addr_present;
+ kal_uint8 epdg_v4_addr[IPV4_ADDR_LEN];
+ kal_bool epdg_v4_addr2_present;
+ kal_uint8 epdg_v4_addr2[IPV4_ADDR_LEN];
+ /****************************************
+ * Operator Specific PCOs in VZW: End *
+ ****************************************/
+} l4bpdn_cval_pco_rdp_info_struct; // Refer: l4bpdn_tcm_pco_rdp_info_struct
+
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_uint8 context_id;
+ kal_uint8 bearer_id; // EBI
+
+ /* If the PDP is secondary, indicate UPCM which primary PDP context the bearer is linked with.
+ * If the PDP is primary, indicate the linked_nspai = nsapi */
+ kal_uint8 linked_bearer_id; // <-- bearer_id
+
+ /* Address acquired by PDP context activation (nw applied ip addr) */
+ l4bpdn_cval_ip_addr_struct ip_addr;
+
+ l4bpdn_cval_pdp_rdp_info_struct pdp_rdp;
+} l4bpdn_cval_bearer_act_ind_struct;
+
+/* This primitive is sent from CVAL to L4BPDN to indicate that the PDN address of a PDN was modified by network */
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_uint8 context_id;
+ kal_uint8 bearer_id; // EBI
+
+ l4bpdn_cval_ip_addr_struct ip_addr;
+} l4bpdn_cval_bearer_modify_ind_struct;
+
+typedef struct {
+ kal_uint8 context_id; /* CID */
+ kal_uint8 bearer_id; /* EBI or NSAPI */
+} l4bpdn_cval_deact_id_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_uint8 bearer_num; /* indicate number of nsapi/EBI entries carried in deact_nsapi_list.*/
+ l4bpdn_cval_deact_id_struct deact_id_list[11]; /* CID/NSAPI/EBI list of the deactivated PDP contexts*/
+} l4bpdn_cval_bearer_deact_ind_struct;
+
+/* Use this ILM to update PCO RDP info
+ * when it is changed by activate/modify/deactivate procedures */
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_uint8 context_id;
+ kal_uint8 bearer_id; // EBI
+
+ l4bpdn_cval_pco_rdp_info_struct pco_rdp;
+} l4bpdn_cval_pco_rdp_update_ind_struct;
+
+/*******************
+ * NEED TO DISCUSS *
+ *******************/
+
+typedef enum {
+ L4BPDN_CVAL_REQUEST_TYPE_INITIAL_REQUEST = 1,
+ L4BPDN_CVAL_REQUEST_TYPE_HANDOVER = 3,
+} l4bpdn_cval_request_type_enum;
+
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_uint8 cid;
+ l4bpdn_cval_request_type_enum request_type; /* No need to store in user-define */
+ l4bpdn_cval_ip_addr_struct ip_addr;
+} l4bpdn_cval_pdn_revive_req_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_uint8 cid;
+ kal_bool is_success;
+ kal_uint16 err_cause; /* What enum should we use? Define a new one in this file? */
+} l4bpdn_cval_pdn_revive_cnf_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_uint8 cid;
+} l4bpdn_cval_pdn_revive_abort_req_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+} l4bpdn_cval_disable_ehrpd_req_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_uint8 cid;
+ kal_bool is_success;
+ kal_uint16 err_cause; /* What enum should we use? Define a new one in this file? */
+} l4bpdn_cval_pdn_revive_abort_cnf_struct;
+
+/**************
+ * Phase 2 AT *
+ **************/
+
+/* This primitive is sent from L4BPDN to CVAL, it is ILM of egactdelayt command */
+typedef struct {
+ /** ILM specific header */
+ LOCAL_PARA_HDR
+
+ kal_uint8 cid;
+} l4bpdn_cval_eactdelayt_req_struct;
+
+/* This primitive is sent from CVAL to L4BPDN to confirm an egactdelayt req */
+typedef struct {
+ /** ILM specific header */
+ LOCAL_PARA_HDR
+
+ kal_uint8 cid;
+ kal_uint8 suggest_action; /* 0: do not have suggestion
+ 1: have suggestion by previous PDN activate reject. */
+ kal_uint32 delay_time; /* suggested dealy time for next retry */
+} l4bpdn_cval_eactdelayt_cnf_struct;
+
+#endif /* _L4BPDN_CVAL_STRUCT_H */
diff --git a/mcu/interface/protocol/l4_c2k/l4c_common_enum_public.h b/mcu/interface/protocol/l4_c2k/l4c_common_enum_public.h
new file mode 100644
index 0000000..8ae6218
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/l4c_common_enum_public.h
@@ -0,0 +1,64 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 _L4C_COMMON_PUBLIC_ENUM_H
+#define _L4C_COMMON_PUBLIC_ENUM_H
+
+#define NUM_TX_POWER_LEVELS (5) // refer to Android RIL_NUM_TX_POWER_LEVELS
+
+// for IPv6 and IPv4v6
+typedef enum
+{
+ TCM_ACTIVATE_PDP_WITH_IPV6_DNS_REQUEST = 0,
+ TCM_ACTIVATE_PDP_WITHOUT_IPV6_DNS_REQUEST = 1
+}l4c_tcm_activate_pdp_request_ipv6_dns_enum;
+
+// for IPv4 DNS address request
+typedef enum
+{
+ TCM_ACTIVATE_PDP_WITHOUT_IPV4_DNS_REQUEST = 0,
+ TCM_ACTIVATE_PDP_WITH_IPV4_DNS_REQUEST = 1
+}l4c_tcm_activate_pdp_request_ipv4_dns_enum ;
+
+
+// PCO: for IPv4 MTU request
+typedef enum
+{
+ LTE_C2K_ACTIVATE_PDP_WITHOUT_IPV4_MTU_REQUEST = 0,
+ LTE_C2K_ACTIVATE_PDP_WITH_IPV4_MTU_REQUEST = 1
+}lte_c2k_activate_pdp_request_ipv4_mtu_enum;
+
+
+
+#endif // _L4C_COMMON_PUBLIC_ENUM_H
diff --git a/mcu/interface/protocol/l4_c2k/l4c_cval_struct.h b/mcu/interface/protocol/l4_c2k/l4c_cval_struct.h
new file mode 100644
index 0000000..cfa5e8c
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/l4c_cval_struct.h
@@ -0,0 +1,481 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*****************************************************************************
+*
+* FILE NAME :l4c_cval_struct.h
+*
+* DESCRIPTION :
+*
+*
+* HISTORY :
+* See Log at end of file
+*
+*****************************************************************************/
+/*----------------------------------------------------------------------------
+ Include Files
+----------------------------------------------------------------------------*/
+#ifndef _L4C_CVAL_STRUCT_H
+#define _L4C_CVAL_STRUCT_H
+
+#include "kal_public_api.h"
+#include "kal_public_defs.h"
+#include "l4c_common_enum_public.h" // for NUM_TX_POWER_LEVELS
+#include "l4c_as_inter_core_struct.h"
+#ifdef __ATERFTX_ERROR_HANDLE_ENHANCE__
+
+#include "ps_public_enum.h"
+#endif
+
+/*****************************************************************************
+* STRUCT
+* l4c_c2k_efun_state_ind_struct
+*
+* DESCRIPTIONS
+* This message is sent efun_state to MD3.
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* efun_state - current efun_state
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 efun_state;
+}l4c_c2k_efun_state_ind_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_val_mdstatus_flow_version_ind_struct
+*
+* DESCRIPTIONS
+* This message is sent emdstatus flow version to MD3.
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* flow_version - new emdstatus flow version
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 flow_version;
+}l4c_val_mdstatus_flow_version_ind_struct;
+
+typedef enum
+{
+ MD_IS_TK = 0,
+ MD_IS_BSP = 1
+} tk_bsp_ind_enum;
+
+typedef enum
+{
+ C2K_1X_LOOP_BACK_CALL_STOP,
+ C2K_1X_LOOP_BACK_CALL_START
+} c2k_1x_loop_back_call_mode_enum;
+
+/*****************************************************************************
+* STRUCT
+* l4c_val_mdstatus_tk_bsp_ind_struct
+*
+* DESCRIPTIONS
+* This message is sent now MD is TK or BSP info to MD3.
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* tk_bsp - tk_bsp_ind_enum, TK or BSP
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ tk_bsp_ind_enum tk_bsp;
+}l4c_val_mdstatus_tk_bsp_ind_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_c2k_ims_reg_status_update_ind_struct
+*
+* DESCRIPTIONS
+* This message is to update the IMS registration state to MD3
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* is_ims_registred: KAL_TRUE(Registered), KAL_FALSE(Not registered)
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_bool is_ims_registred;
+}l4c_c2k_ims_reg_status_update_ind_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_c2k_roaming_setting_sync_req_struct
+*
+* DESCRIPTIONS
+* This message is to update the roaming setting to MD1
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* RoamingSettingBitMap
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ /** Roaming setting bitmap */
+ /* 0x01 Allow Voice Domestic Roaming*/
+ /* 0x02 Allow Data Domestic Roaming*/
+ /* 0x04 Allow Voice International Roaming*/
+ /* 0x08 Allow Date International Roaming*/
+ /* 0x10 Allow LTE Data Roaming*/
+ kal_uint8 RoamingSettingBitMap;
+}l4c_c2k_roaming_setting_sync_req_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_c2k_1x_loop_back_call_req_struct
+*
+* DESCRIPTIONS
+* This message is to request 1x loop back call operation
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* operation_mode: 1(dial), 0(end)
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 src_id;
+ c2k_1x_loop_back_call_mode_enum operation_mode;
+}l4c_c2k_1x_loop_back_call_req_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_c2k_1x_loop_back_call_cnf_struct
+*
+* DESCRIPTIONS
+* This message is to send 1x loop back call operaton result to MD1 from MD3
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* result
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 src_id;
+ kal_bool result;
+}l4c_c2k_1x_loop_back_call_cnf_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 rat; /*0 for 1x,1 for do, 2 for both*/
+ kal_bool monitoring_req;
+}l4c_c2k_get_ant_info_req_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 rat;/*0 for 1x,1 for do, 2 for both*/
+ kal_uint8 antenna_index;
+}l4c_c2k_get_ant_info_cnf_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 rat;/*0 for 1x,1 for do, 2 for both*/
+ kal_uint8 antenna_index;
+}l4c_c2k_get_ant_info_ind_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_c2k_txrx_active_time_req_struct
+*
+* DESCRIPTIONS
+* This message is to send C2K Tx Rx active time request to MD3 from MD1
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* result
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 src_id;
+}l4c_c2k_txrx_active_time_req_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_c2k_txrx_active_time_cnf_struct
+*
+* DESCRIPTIONS
+* This message is to send C2K Tx Rx active time result to MD1 from MD3
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* result
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 src_id;
+ kal_uint32 tx_mode_time_ms[NUM_TX_POWER_LEVELS];
+ kal_uint32 rx_mode_time_ms;
+}l4c_c2k_txrx_active_time_cnf_struct;
+
+
+#ifdef __EM_MAX_TX_POWER_SUPPORT__
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 src_id;
+ kal_uint8 rat; /*0 for 1x, 1 for DO, 2 for both*/
+ kal_uint8 band;
+ kal_int16 max_tx_power_offset;
+}l4c_c2k_cl1_set_max_tx_power_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 src_id;
+ kal_int8 result;
+}l4c_c2k_cl1_set_max_tx_power_cnf_struct;
+
+#endif
+
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 signal_type; /* (6 - 1X_RSSI, 7 - 1X_ECIO, 8 - EVDO_RSSI, 9 - EVDO_ECIO) */
+ kal_uint8 mode; /* 0 - Disable, 1 - Enabled */
+ kal_int32 upper_threshold;
+ kal_int32 lower_threshold;
+ kal_uint8 timer;
+} l4c_val_set_pwl_thrhd_req_struct;
+
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_bool result;
+} l4c_val_set_pwl_thrhd_cnf_struct;
+
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 signal_type;
+ kal_uint8 signal_status; /* 0 - bad signal, 1 - good signal, 2 - fair signal (signal level between upper threshold & lower threshold), 3 - Invalid signal */
+ kal_int32 signal_value;
+} val_l4c_pwr_level_ind_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_val_c2k_rf_test_req_struct
+*
+* DESCRIPTIONS
+* This message is to send C2K RF test request to MD3 from MD1
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* result
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 src_id;
+ kal_uint8 mode;
+ kal_uint8 band;
+ kal_uint8 txPower;
+ kal_uint16 channel;
+ kal_uint8 reductionLevel_Ant0;
+ kal_uint8 reductionLevel_Ant1;
+}l4c_val_c2k_rf_test_req_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_val_c2k_rf_test_cnf_struct
+*
+* DESCRIPTIONS
+* This message is to send C2K RF test cnf to MD1 from MD3
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* result
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 src_id;
+ kal_bool result;
+#ifdef __ATERFTX_ERROR_HANDLE_ENHANCE__
+ ps_cause_enum cause;
+#endif
+ kal_uint8 mode;
+ kal_int16 main_rssi;
+ kal_int16 div_rssi;
+}l4c_val_c2k_rf_test_cnf_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_val_cs_service_ind_struct
+*
+* DESCRIPTIONS
+* This message is sent to inform MD1 if the C2K CS service available to use or not
+*
+* PARAMETERS
+* LOCAL_PARA_HDR
+* tk_bsp - tk_bsp_ind_enum, TK or BSP
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_bool is_cs_service_available;
+}l4c_val_cs_service_ind_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_c2k_cell_info_ind_struct
+*
+* DESCRIPTIONS
+* This message is sent to inform MD1 C2K Cell Info
+*
+* PARAMETERS
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 num_of_cell;
+ kal_uint16 nid;
+ kal_uint16 sid;
+ kal_uint16 bs_id;
+ kal_int32 bs_long;
+ kal_int32 bs_lat;
+ kal_int16 rssi_1xRTT;
+ kal_int16 ecio_1xRTT;
+ kal_uint8 rssi_EVDO;
+ kal_int16 ecio_EVDO;
+ kal_uint16 sinr_EVDO;
+}l4c_c2k_cell_info_ind_struct;
+
+/*****************************************************************************
+* STRUCT
+* l4c_val_sml_status_ind_struct
+*
+* DESCRIPTIONS
+* This message is sent to inform is card locked by SIM ME Lock mechanism
+*
+* PARAMETERS
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_bool is_simme_locked;
+}l4c_val_sml_status_ind_struct;
+
+#ifdef __CARRIER_RESTRICTION__
+/* General lock structure*/
+typedef struct
+{
+ kal_uint8 num;
+}smu_cval_carrier_match_category_meta_struct;
+
+typedef struct
+{
+ smu_cval_carrier_match_category_meta_struct cat[5];
+ kal_uint8 code_cat_n[5*3];
+ kal_uint8 code_cat_spn[5*23];
+ kal_uint8 code_cat_imsi_prefix[5*4];
+ kal_uint8 code_cat_gid1[5*4];
+ kal_uint8 code_cat_gid2[5*4];
+}smu_cval_carrier_restriction_list_struct;
+
+/*****************************************************************************
+* STRUCT
+* smu_cval_carrier_restriction_sync_ind_struct
+*
+* DESCRIPTIONS
+* This message is sent to inform CVAL the carrier data
+*
+* PARAMETERS
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 slot_id;
+ smu_cval_carrier_restriction_list_struct black_list;
+ smu_cval_carrier_restriction_list_struct white_list;
+ kal_uint8 allow_all; /* 0 - if white list is empty, 1 - if white list is not empty */
+ kal_uint8 carrier_rest_state; /* 0 - Enabled 1 - Disabled */
+ kal_uint8 multi_sim_policy;
+ kal_uint8 allowed_carriers_prioritized;
+}smu_cval_carrier_restriction_sync_ind_struct;
+
+/*****************************************************************************
+* STRUCT
+* smu_cval_carrier_restriction_status_ind_struct
+*
+* DESCRIPTIONS
+* This message is sent to inform CVAL the carrier status, SMU->CVAL
+*
+* PARAMETERS
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 slot_id;
+ kal_uint8 carrier_rest_status; /* 0 - READY 1 - CARD RESTRICTED 2 -CARD REBOOT */
+}smu_cval_carrier_restriction_status_ind_struct;
+
+/*****************************************************************************
+* STRUCT
+* cval_smu_carrier_restriction_status_ind_struct
+*
+* DESCRIPTIONS
+* This message is sent to inform SMU the carrier status, CVAL->SMU
+*
+* PARAMETERS
+*****************************************************************************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 slot_id;
+ kal_uint8 carrier_rest_status; /* 0 - READY 1 - CARD RESTRICTED 2 -CARD REBOOT */
+}cval_smu_carrier_restriction_status_ind_struct;
+#endif
+#endif
+
+
diff --git a/mcu/interface/protocol/l4_c2k/mmi_sm_enums_public.h b/mcu/interface/protocol/l4_c2k/mmi_sm_enums_public.h
new file mode 100644
index 0000000..494979b
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/mmi_sm_enums_public.h
@@ -0,0 +1,65 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 _MMI_SM_ENUMS_PUBLIC_H
+#define _MMI_SM_ENUMS_PUBLIC_H
+
+#include "ps_public_enum_public.h"
+
+/* Define the length of user_name, password and APN for internal PDP context */
+/* Poying: MAUI_02735345 */
+#define INT_MAX_GPRS_USER_NAME_LEN MAX_GPRS_USER_NAME_LEN
+#define INT_MAX_GPRS_PASSWORD_LEN MAX_GPRS_PASSWORD_LEN
+#define INT_MAX_GPRS_APN_LEN MAX_GPRS_APN_LEN
+#define TCM_MAX_OP_PCO_ID_LEM MAX_OPERATOR_SPECIFIC_PCO_ID_LEN
+#define TCM_MAX_OP_PCO_CONTENT_LEM MAX_OPERATOR_SPECIFIC_PCO_CONTENT_LEN
+
+/* Poying: MSBB: Move to ps_public_enum.h. */
+//#define MAX_NUM_CONFIG_OPTION_PACKETS 5
+
+/* Poying: MAUI_02735345 */
+#define TCM_MAX_GPRS_USER_NAME_LEN INT_MAX_GPRS_USER_NAME_LEN // old
+#define TCM_MAX_GPRS_USERNAME_LEN INT_MAX_GPRS_USER_NAME_LEN
+#define TCM_MAX_GPRS_PASSWORD_LEN INT_MAX_GPRS_PASSWORD_LEN
+#define TCM_MAX_GPRS_APN_LEN INT_MAX_GPRS_APN_LEN
+
+
+typedef enum
+{
+ PRIMARY_CONTEXT,
+ SECONDARY_CONTEXT,
+ UNKNOWN_CONTEXT
+}pdp_context_type_enum;
+
+#endif // _MMI_SM_ENUMS_PUBLIC_H
diff --git a/mcu/interface/protocol/l4_c2k/mmiapi.h b/mcu/interface/protocol/l4_c2k/mmiapi.h
new file mode 100644
index 0000000..14066c3
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/mmiapi.h
@@ -0,0 +1,589 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2006-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef _UI_API_H_
+#define _UI_API_H_
+/*****************************************************************************
+*
+* FILE NAME: uiapi.h
+*
+* DESCRIPTION:
+* This file contains definitions and types for the UI software unit.
+*
+* HISTORY :
+* See Log at end of file
+*
+*
+*****************************************************************************/
+
+#include "monapi.h"
+//#include "valfsiapi.h"
+//#include "valdispapi.h"
+//#include "valsndapi.h"
+#include "valsmsapi.h"
+
+#define NUM_UI_LOCK_CODE_DIGITS 7
+#define LOCK_CODE_LENGTH_AFTER_MDN_UPDATE 4
+#define LOCK_CODE_LENGTH_AFTER_ESN_UPDATE 4
+
+#define UI_MAIN_MAILBOX_ID EXE_MAILBOX_1_ID
+#define UI_MAIN_MAIL_TYPE EXE_MAILBOX_1
+#define VTUI_MESSAGE_TYPE UI_MAIN_MAIL_TYPE
+#define UI_ONE_SEC_TIMER_ID (kal_uint32)2
+#define UI_AUTO_ANSWER_TIMER_ID (kal_uint32)6
+
+#define UI_TIMER_RESET 0
+#define UI_TIMER_RESTART 1
+#define UI_ONE_SEC_TIMEOUT_VALUE 1000 /* msecs */
+
+#define UI_ONE_SEC_TIMEOUT_SIGNAL EXE_SIGNAL_11
+#define UI_DEEP_SLEEP_TIME_SLICE_DEFAULT 0 /* 0 msecs (off) */
+#define UI_TASK_STOP_SIG EXE_SIGNAL_20
+
+#define UI_TRACE( x ) MonTrace( MON_CP_UI_GENERIC_TRACE_ID, 1, x )
+
+enum EventCatT {
+ CALL_PROCESSING_CATE = 1,
+ SMS_CATE = 2,
+ DATA_CATE = 3,
+ KEY_CATE = 4,
+ ACCESSORY_CATE = 5,
+ WINDOW_CATE = 6,
+ SOFTICON_CATE = 7,
+ APPLICATION_CATE = 8,
+ GENERAL_UI_CATE
+};
+
+enum EventBitT {
+ CALL_PROCESSING_BIT = 1 << (CALL_PROCESSING_CATE - 1),
+ SMS_BIT = 1 << (SMS_CATE - 1),
+ DATA_BIT = 1 << (DATA_CATE - 1),
+ KEY_BIT = 1 << (KEY_CATE - 1),
+ ACCESSORY_BIT = 1 << (ACCESSORY_CATE - 1),
+ WINDOW_BIT = 1 << (WINDOW_CATE - 1),
+ SOFTICON_BIT = 1 << (SOFTICON_CATE - 1),
+ APPLICATION_BIT = 1 << (APPLICATION_CATE - 1),
+ GENERAL_UI_BIT = 1 << (GENERAL_UI_CATE - 1),
+ ALL_BIT = 0x7FFFFFFF
+};
+#define GROUP_BIT_LOCATION 12
+#define APPCAT(group,id) (0x01000000 | \
+ (group << GROUP_BIT_LOCATION) | \
+ ((id) & 0x0FFF))
+#define GROUP_MASK 0x000FF000
+#define GET_MAIL_GROUP(MsgId) (((MsgId) & GROUP_MASK) >> GROUP_BIT_LOCATION)
+
+#define MSGID_OF_GROUP_MASK 0x00000FFF
+#define GET_MSGID_OF_GROUP(MsgId) ((MsgId) & MSGID_OF_GROUP_MASK)
+
+#define CHVAPP 1
+#define VALTESTAPP 2
+
+#define MAX_NUM_OF_APP 35 //add new app before this definition and increase this value
+
+#define CHVAPP_LAUNCH APPCAT(CHVAPP, 1)
+#define CHVAPP_CHV_CHECK APPCAT(CHVAPP, 2)
+#define CHVAPP_UIM_CHECK APPCAT(CHVAPP, 3)
+#define CHVAPP_SP_CHECK APPCAT(CHVAPP, 4)
+#define CHVAPP_AREA_CHECK APPCAT(CHVAPP, 5)
+#define CHVAPP_ALL_PASSED APPCAT(CHVAPP, 6)
+#define CHVAPP_ENTER_PIN APPCAT(CHVAPP, 7)
+#define CHVAPP_CLEAR_PIN APPCAT(CHVAPP, 8)
+#define CHVAPP_ENABLE_PIN_MENU APPCAT(CHVAPP, 9) //TEMP USE
+#define CHVAPP_DISABLE_PIN_MENU APPCAT(CHVAPP, 10)
+#define CHVAPP_ENTER_PUK APPCAT(CHVAPP, 11)
+#define CHVAPP_PUK_CHECK APPCAT(CHVAPP, 12)
+#define CHVAPP_CHANGE_PIN_MENU APPCAT(CHVAPP, 13)
+#define CHVAPP_CHANGE_PIN_OK APPCAT(CHVAPP, 14)
+#define CHVAPP_CANCEL_DLG APPCAT(CHVAPP, 15)
+#define CHVAPP_GET_NAM APPCAT(CHVAPP, 16)
+#define CHVAPP_GET_IMSI APPCAT(CHVAPP, 17)
+#define CHVAPP_OPEN_MAIN_MENU APPCAT(CHVAPP, 18)
+
+
+#define UI_SET_DEEP_SLEEP_TIME_SLICE_MSG APPCAT( VALTESTAPP, 1 )
+
+#define UI_SET_RINGER_FILE APPCAT( VALTESTAPP, 10 )
+#define UI_PLAY_MUSIC_FILE APPCAT( VALTESTAPP, 11 )
+#define UI_AUDIO_VIDEO_FILE APPCAT( VALTESTAPP, 12 )
+#define UI_SET_BACKGROUND APPCAT( VALTESTAPP, 13 )
+#define UI_DRAW_BACKGROUND APPCAT( VALTESTAPP, 14 )
+#define UI_DRAW_ANIMATION APPCAT( VALTESTAPP, 15 )
+#define UI_DRAW_NEXT_ANIMATION APPCAT( VALTESTAPP, 16 )
+#define UI_STOP_ANIMATION APPCAT( VALTESTAPP, 17 )
+#define UI_SET_AUTO_ANSWER_MSG APPCAT( VALTESTAPP, 18 )
+#define UI_SET_PRIVACY_MODE_MSG APPCAT( VALTESTAPP, 19 )
+#define UI_SET_AUTO_ANSWER_DELAY_MSG APPCAT( VALTESTAPP, 20 )
+#define UI_SET_DTMF_TYPE_MSG APPCAT( VALTESTAPP, 21 )
+#define UI_DBM_READ_NAM_MSG APPCAT( VALTESTAPP, 22 )
+#define UI_PERMDATA_READ_MSG APPCAT( VALTESTAPP, 23 )
+#define UI_START_REFUBISH_AGING_TEST_MSG APPCAT( VALTESTAPP, 24 )
+#define UI_STOP_REFUBISH_AGING_TEST_MSG APPCAT( VALTESTAPP, 25 )
+#define UI_REFUBISH_AGING_INC_PWR_MSG APPCAT( VALTESTAPP, 26 )
+#define UI_REFUBISH_AGING_DEC_PWR_MSG APPCAT( VALTESTAPP, 27 )
+#define UI_GET_AUTO_ANSWER_STATUS_MSG APPCAT( VALTESTAPP, 28 )
+#define UI_GET_MUSIC_PLAY_TIME_MSG APPCAT( VALTESTAPP, 29 )
+
+#define UI_VAL_NET_INITIALIZE APPCAT( VALTESTAPP, 30 )
+#define UI_VAL_NET_PPP_OPEN APPCAT( VALTESTAPP, 31 )
+#define UI_VAL_NET_PPP_CLOSE APPCAT( VALTESTAPP, 32 )
+#define UI_VAL_NET_PPP_DORMANT_REQ APPCAT( VALTESTAPP, 33 )
+#define UI_VAL_NET_GET_PPP_STATUS APPCAT( VALTESTAPP, 34 )
+#define UI_VAL_NET_EVENT_SELECT APPCAT( VALTESTAPP, 35 )
+#define UI_VAL_NET_SOCKET APPCAT( VALTESTAPP, 36 )
+#define UI_VAL_NET_CONNECT APPCAT( VALTESTAPP, 37 )
+#define UI_VAL_NET_CLOSE APPCAT( VALTESTAPP, 38 )
+#define UI_VAL_NET_GET_SOCK_STATUS APPCAT( VALTESTAPP, 39 )
+#define UI_VAL_NET_RECV APPCAT( VALTESTAPP, 40 )
+#define UI_VAL_NET_SEND APPCAT( VALTESTAPP, 41 )
+#define UI_VAL_NET_BIND APPCAT( VALTESTAPP, 42 )
+#define UI_VAL_NET_LISTEN APPCAT( VALTESTAPP, 43 )
+#define UI_VAL_NET_ACCEPT APPCAT( VALTESTAPP, 44 )
+#define UI_VAL_NET_SEND_TO APPCAT( VALTESTAPP, 45 )
+#define UI_VAL_NET_RECV_FROM APPCAT( VALTESTAPP, 46 )
+#define UI_VAL_NET_GET_HOST_BY_NAME APPCAT( VALTESTAPP, 47 )
+#define UI_VAL_NET_INET_ADDR APPCAT( VALTESTAPP, 48 )
+#define UI_VAL_NET_GET_PPP_AUTH_PARMS APPCAT( VALTESTAPP, 49 )
+#define UI_VAL_NET_SET_PPP_AUTH_PARMS APPCAT( VALTESTAPP, 50 )
+#define UI_VAL_NET_GET_DIAL_STR_PARMS APPCAT( VALTESTAPP, 51 )
+#define UI_VAL_NET_SET_DIAL_STR_PARMS APPCAT( VALTESTAPP, 52 )
+#define UI_VAL_NET_SET_RLP_INACT_TMO_REQ APPCAT( VALTESTAPP, 53 )
+#define UI_VAL_NET_GET_RLP_SETTING APPCAT( VALTESTAPP, 54 )
+#define UI_VAL_NET_SET_RLP_SETTING APPCAT( VALTESTAPP, 55 )
+#define UI_VAL_NET_GET_IP_ADDRESS APPCAT( VALTESTAPP, 56 )
+#define UI_VAL_NET_GET_DNS_SERVER_IP_ADDR APPCAT( VALTESTAPP, 57 )
+#define UI_VAL_NET_GET_PEER_NAME APPCAT( VALTESTAPP, 58 )
+#define UI_VAL_NET_SET_DNS_SERVER_IP_ADDR APPCAT( VALTESTAPP, 59 )
+#ifdef MTK_CBP
+#define UI_VAL_NET_SEND_PING APPCAT( VALTESTAPP, 60 )
+#define UI_VAL_NET_STOP_PING APPCAT( VALTESTAPP, 61 )
+#endif /*MTK_CBP*/
+
+#define UI_VAL_PSW_INITIATE_CALL APPCAT( VALTESTAPP, 101 )
+#define UI_VAL_PSW_ANSWER_CALL APPCAT( VALTESTAPP, 102 )
+#define UI_VAL_PSW_HANGUP_CALL APPCAT( VALTESTAPP, 103 )
+#define UI_VAL_CHANGE_AKEY APPCAT( VALTESTAPP, 104 )
+#define UI_VAL_SET_PRL_ENABLE APPCAT( VALTESTAPP, 105 )
+#define UI_VAL_GET_ACTIVE_NAM APPCAT( VALTESTAPP, 106 )
+#define UI_VAL_SET_ACTIVE_NAM APPCAT( VALTESTAPP, 107 )
+#define UI_VAL_GET_AKEY_CHECKSUM APPCAT( VALTESTAPP, 108 )
+#define UI_VAL_E911_DISABLE APPCAT( VALTESTAPP, 109 )
+#define UI_VAL_AUTO_RETRY_ENABLE APPCAT( VALTESTAPP, 110 )
+#define UI_VAL_AUTO_RETRY_DISABLE APPCAT( VALTESTAPP, 111 )
+#define UI_VAL_SMS_START_REG_SRV APPCAT( VALTESTAPP, 112 )
+#define UI_VAL_SMS_STOP_REG_SRV APPCAT( VALTESTAPP, 113 )
+#define UI_VAL_SMS_SET_PREF_SVC_OPT APPCAT( VALTESTAPP, 114 )
+#define UI_VAL_SMS_SET_BROADCAST_PARMS APPCAT( VALTESTAPP, 115 )
+#define UI_VAL_SMS_SET_STORAGE APPCAT( VALTESTAPP, 116 )
+#define UI_VAL_SMS_SEND_TEXT_MESSAGE APPCAT( VALTESTAPP, 117 )
+#define UI_VAL_SMS_SEND_PDU_MESSAGE APPCAT( VALTESTAPP, 118 )
+
+#define UI_VAL_GET_PHB_REC_PARAMS APPCAT( VALTESTAPP, 131 )
+#define UI_VAL_GET_PHB_RECORD APPCAT( VALTESTAPP, 132 )
+#define UI_VAL_UPDATE_PHB_RECORD APPCAT( VALTESTAPP, 133 )
+#define UI_VAL_ERASE_PHB_RECORD APPCAT( VALTESTAPP, 134 )
+#define UI_VAL_GET_SMS_REC_PARAMS APPCAT( VALTESTAPP, 135 )
+#define UI_VAL_GET_SMS_RECORD APPCAT( VALTESTAPP, 136 )
+#define UI_VAL_UPDATE_SMS_RECORD APPCAT( VALTESTAPP, 137 )
+#define UI_VAL_ERASE_SMS_RECORD APPCAT( VALTESTAPP, 138 )
+#define UI_VAL_CHV_GET_STATUS APPCAT( VALTESTAPP, 139 )
+#define UI_VAL_CHV_VERIFY APPCAT( VALTESTAPP, 140 )
+#define UI_VAL_CHV_CHANGE APPCAT( VALTESTAPP, 141 )
+#define UI_VAL_CHV_DISABLE APPCAT( VALTESTAPP, 142 )
+#define UI_VAL_CHV_ENABLE APPCAT( VALTESTAPP, 143 )
+#define UI_VAL_CHV_UNBLOCK APPCAT( VALTESTAPP, 144 )
+#define UI_VAL_GET_MAX_MDN_REC_NUM APPCAT( VALTESTAPP, 145 )
+#define UI_VAL_GET_MDN_REC APPCAT( VALTESTAPP, 146 )
+#define UI_VAL_UPDATE_MDN_REC APPCAT( VALTESTAPP, 147 )
+#define UI_VAL_DEL_MDN_REC APPCAT( VALTESTAPP, 148 )
+#define UI_VAL_UTK_PROFILE_INIT APPCAT( VALTESTAPP, 149 )
+#define UI_VAL_UTK_EXIT APPCAT( VALTESTAPP, 150 )
+#define UI_VAL_UTK_SMS_DOWNLOAD APPCAT( VALTESTAPP, 151 )
+#define UI_VAL_UTK_SELECT_MENU APPCAT( VALTESTAPP, 152 )
+#define UI_VAL_UTK_COMM_CMD_RESULT APPCAT( VALTESTAPP, 153 )
+#define UI_VAL_UTK_GET_INPUT_DONE APPCAT( VALTESTAPP, 154 )
+#define UI_VAL_FIRMWARE_VER_RSP_MSG APPCAT( VALTESTAPP, 155 )
+
+#define UI_PCM_PROCESS_ENABLE_MSG APPCAT( VALTESTAPP, 156 )
+#define UI_PCM_FRAME_INPUT_MSG APPCAT( VALTESTAPP, 157 )
+#define UI_DISPLAY_ENABLE_MSG APPCAT( VALTESTAPP, 158 )
+#define UI_MUSIC_RECORD_MSG APPCAT( VALTESTAPP, 159 )
+
+#define UI_SET_PARM_MSG APPCAT( VALTESTAPP, 192 )
+#define UI_GET_PARM_MSG APPCAT( VALTESTAPP, 193 )
+
+
+#define UI_TEST_MAX_FILE_NAME_LEN 256
+#define UI_TEST_MAX_ANIMATION_IMAGES 10
+
+
+/**********************
+ * MESSAGE STRUCTURES
+ **********************/
+/* UI_SET_DEEP_SLEEP_TIME_SLICE_MSG */
+typedef PACKED_PREFIX struct
+{
+ kal_uint32 TimeSlice;
+} PACKED_POSTFIX UiSetDeepSleepTimeSliceMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ char FileName[UI_TEST_MAX_FILE_NAME_LEN + 1];
+} PACKED_POSTFIX UiSetRingerFileMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ char FileName[UI_TEST_MAX_FILE_NAME_LEN + 1];
+ kal_uint32 BaseOffset;
+ kal_uint32 DataOffset;
+} PACKED_POSTFIX UiPlayRingerFileMsgT;
+
+typedef enum
+{
+ UI_AUDIO_VIDEO_PLAY_CMD,
+ UI_AUDIO_VIDEO_FAST_FWD_CMD,
+ UI_AUDIO_VIDEO_REWIND_CMD,
+ UI_AUDIO_VIDEO_PAUSE_CMD,
+ UI_AUDIO_VIDEO_RESUME_CMD,
+ UI_AUDIO_VIDEO_GET_POS_CMD,
+ UI_AUDIO_VIDEO_SET_POS_CMD,
+ UI_AUDIO_VIDEO_GET_PLAYTIME_CMD,
+ UI_AUDIO_VIDEO_STOP_CMD
+} UiAudioVideoCmdT;
+
+typedef PACKED_PREFIX struct
+{
+ ExeRspMsgT RspInfo;
+ UiAudioVideoCmdT Cmd;
+ char FileName[UI_TEST_MAX_FILE_NAME_LEN + 1];
+ kal_uint32 BaseOffset;
+ kal_uint32 PositionSet;
+} PACKED_POSTFIX UiAudioVideoFileMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ UiAudioVideoCmdT Cmd;
+ kal_uint16 Mp4Result; /* Use ValMp4StatusT enum */
+ kal_uint16 AppResult; /* Use ValAppStatusT enum */
+ kal_uint32 ElapsedTime;
+} PACKED_POSTFIX UiAudioVideoFileRspMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint8 Format;
+ kal_uint8 SamplingRate;
+ kal_uint8 NumChan;
+ char FileName [UI_TEST_MAX_FILE_NAME_LEN + 1];
+} PACKED_POSTFIX UiMusicRecordMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ ValAppStatusT Result;
+} PACKED_POSTFIX UiMusicRecordRspMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ ExeRspMsgT RspInfo;
+ char FileName [UI_TEST_MAX_FILE_NAME_LEN + 1];
+ kal_uint8 *DataP;
+ kal_uint32 DataBytes;
+ kal_uint8 MusicType;
+} PACKED_POSTFIX UiGetMusicPlayTimeMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_uint32 TotalTimeSecs;
+} PACKED_POSTFIX UiGetMusicPlayTimeRspMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ char FileName[UI_TEST_MAX_FILE_NAME_LEN + 1];
+ kal_uint16 TextColor;
+} PACKED_POSTFIX UiDrawBackgroundMsgT;
+
+typedef enum
+{
+ UI_TEST_ANIMATION_ONE_CYCLE,
+ UI_TEST_ANIMATION_FOREVER
+} UiAnimationCyclesT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_uint8 OutImageFormat;
+ UiAnimationCyclesT NumCycles;
+ kal_uint16 MSecsBetweenImages;
+ kal_uint16 MSecsAfterLastImage;
+ char ImageFileName [UI_TEST_MAX_ANIMATION_IMAGES] [UI_TEST_MAX_FILE_NAME_LEN + 1];
+ char MusicFileName [UI_TEST_MAX_FILE_NAME_LEN + 1];
+} PACKED_POSTFIX UiDrawAnimationMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_bool Enabled;
+} PACKED_POSTFIX UiSetAutoAnswerMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_uint16 AutoAnswerDelay; /* msec */
+} PACKED_POSTFIX UiSetAutoAnswerDelayMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ ExeRspMsgT RspInfo;
+} PACKED_POSTFIX UiGetAutoAnswerReqMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_bool Enabled;
+ kal_uint16 AutoAnswerDelay; /* msec */
+} PACKED_POSTFIX UiGetAutoAnswerRspMsgT;
+
+typedef enum
+{
+ MAX_DELAY_20MSEC,
+ MAX_DELAY_40MSEC
+} PcmProcessDelayT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_bool Enable;
+ PcmProcessDelayT Delay;
+} PACKED_POSTFIX UiPcmProcessEnableMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_bool Enable;
+} PACKED_POSTFIX UiDisplayEnableMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_uint8 DtmfType; /* VAL_SOUND_BURST or VAL_SOUND_CONTINUES */
+} PACKED_POSTFIX UiSetDtmfTypeMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_bool Mode;
+} PACKED_POSTFIX UiSetPrivacyModeMsgT;
+
+/* UI_VAL_FIRMWARE_VER_RSP_MSG */
+typedef PACKED_PREFIX struct
+{
+ kal_uint8 VerInfo[3];
+ kal_uint8 TimeInfo[5];
+} PACKED_POSTFIX VersionT;
+
+typedef PACKED_PREFIX struct
+{
+ VersionT CpVersion;
+ VersionT DspmVersion;
+ VersionT DspvVersion;
+} PACKED_POSTFIX FirmwareVersionT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_uint8 Band;
+ kal_uint16 Channel;
+} PACKED_POSTFIX UiRefurbishAgingTestT;
+
+typedef enum
+{
+ DTMF_MODE_BURST_MASK =0x0001, /*Bit0 represents DTMF_MODE, 1 = BURST, 0 = CONTINUOUS*/
+ VOICE_PRIVACY_ENABLED_MASK =0x0002,
+ AUTO_ANSWER_ENABLED_MASK =0x0004,
+ AUTO_REDIAL_ENABLED_MASK =0x0008,
+ VOICE_PRIVACY_ALERT_MASK =0x0010,
+ AUTO_POWER_ENABLE_MASK =0x0020
+
+} UiParameterMaskT;
+
+
+typedef enum
+{
+ UI_PARM_SET_DTMF_MODE,
+ UI_PARM_GET_DTMF_MODE,
+ UI_PARM_SET_VOICE_PRIVACY,
+ UI_PARM_GET_VOICE_PRIVACY,
+ UI_PARM_SET_LOCK_CODE,
+ UI_PARM_GET_LOCK_CODE,
+ UI_PARM_SET_AUTO_ANSWER_MODE,
+ UI_PARM_GET_AUTO_ANSWER_MODE,
+ UI_PARM_INIT_MISC_DATABASE,
+ UI_PARM_SET_AUTO_REDIAL_MODE,
+ UI_PARM_GET_AUTO_REDIAL_MODE,
+ UI_PARM_SET_VOICE_PRIVACY_ALERT_MODE,
+ UI_PARM_GET_VOICE_PRIVACY_ALERT_MODE,
+ UI_PARM_SET_SMS_CHANNEL,
+ UI_PARM_GET_SMS_CHANNEL,
+ UI_PARM_SET_SMS_PREF_SO,
+ UI_PARM_GET_SMS_PREF_SO,
+ UI_PARM_SET_AUTO_POWER_UP,
+ UI_PARM_GET_AUTO_POWER_UP
+
+} UiParmOperationId;
+
+typedef enum
+{
+ UI_PARM_MIN_VALUE,
+ UI_PARM_MAX_VALUE,
+ UI_PARM_DEFAULT_VALUE,
+ UI_PARM_CUSTOM_VALUE,
+ UI_PARM_OP_TYPE_LIST_END
+} UiParmOperationType;
+
+typedef enum
+{
+ UI_PARM_OPERATION_SUCCESS,
+ UI_PARM_OPERATION_FAIL_READ_NOT_ALLOWED,
+ UI_PARM_OPERATION_FAIL_WRITE_NOT_ALLOWED,
+ UI_PARM_OPERATION_PARAMETER_NOT_SUPPORTED,
+ UI_PARM_OPERATION_INTERFACE_NOT_SUPPORTED,
+ UI_PARM_OPERATION_FAIL_VALUE_OUT_OF_RANGE
+
+} UiParmAccessResultCode;
+
+typedef PACKED_PREFIX struct
+{
+ ExeRspMsgT RspInfo; /*Response routing information */
+ UiParmOperationId ParmId;
+ UiParmOperationType opType;
+} PACKED_POSTFIX UiGetParmMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ UiParmOperationId ParmId;
+ UiParmAccessResultCode result;
+ kal_uint8 data;
+} PACKED_POSTFIX UiGetParmRspMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+ UiParmOperationId ParmId;
+ UiParmOperationType opType;
+ kal_uint8 data;
+} PACKED_POSTFIX UiSetParmMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ UiParmOperationId ParmId;
+ UiParmAccessResultCode result;
+} PACKED_POSTFIX UiSetParmRspMsgT;
+
+typedef enum
+{
+ UI_DTMF_CONTINUOUS=0,
+ UI_DTMF_BURST
+} UiDTMFMode;
+typedef PACKED_PREFIX struct
+{
+ UiDTMFMode DTMFType;
+} PACKED_POSTFIX UiDTMFMode_APIStruct;
+
+typedef enum
+{
+ UI_VOICE_PRIVACY_DISABLED=0,
+ UI_VOICE_PRIVACY_ENABLED
+} UiVoicePrivacyMode;
+
+typedef PACKED_PREFIX struct
+{
+ UiVoicePrivacyMode PrivacyMode;
+} PACKED_POSTFIX UiVoicePrivacyMode_APIStruct;
+
+typedef PACKED_PREFIX struct
+{
+ char LockCode[NUM_UI_LOCK_CODE_DIGITS];
+} PACKED_POSTFIX UiLockCode_APIStruct;
+
+
+
+typedef PACKED_PREFIX struct
+{
+ kal_bool AutoAnswerMode;
+ kal_uint8 Rings;
+} PACKED_POSTFIX UiAutoAnswerMode_APIStruct;
+
+typedef enum
+{
+ SECONDS_10,
+ SECONDS_30,
+ SECONDS_60
+} AutoRedialIntervalType;
+
+typedef PACKED_PREFIX struct
+{
+ kal_bool AutoRedialMode;
+ AutoRedialIntervalType Interval;
+} PACKED_POSTFIX UiAutoRedialMode_APIStruct;
+
+typedef PACKED_PREFIX struct
+{
+ kal_bool VoicePrivacyAlertMode;
+} PACKED_POSTFIX UiVoicePrivacyAlertMode_APIStruct;
+
+typedef PACKED_PREFIX struct
+{
+/*
+ ValSmsChannelT Channel;
+*/
+/* obsolete api*/
+ kal_uint8 Channel;
+} PACKED_POSTFIX UiSmsChannel_APIStruct;
+
+typedef PACKED_PREFIX struct
+{
+ kal_uint16 SO;
+} PACKED_POSTFIX UiSmsPrefSO_APIStruct;
+
+
+typedef PACKED_PREFIX struct
+{
+ kal_bool AutoPowerEnabled;
+} PACKED_POSTFIX UiAutoPower_APIStruct;
+
+
+#endif
+
+
+
diff --git a/mcu/interface/protocol/l4_c2k/mmss_def.h b/mcu/interface/protocol/l4_c2k/mmss_def.h
new file mode 100644
index 0000000..6048aab
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/mmss_def.h
@@ -0,0 +1,197 @@
+/*****************************************************************************
+* 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).
+*
+*****************************************************************************/
+
+/** \file
+ *
+ * Filename:
+ * ---------
+ * mmss_def.h
+ *
+ * Project:
+ * --------
+ * UMOLY
+ *
+ * Description:
+ * ------------
+ * This file defines the public structures between MD1 and MD3.
+ *
+ * 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 _GMSS_MD1_MD3_COMMON_H
+#define _GMSS_MD1_MD3_COMMON_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "l3_inc_enums_public.h"
+
+typedef struct
+{
+ kal_uint8 mcc1;
+ kal_uint8 mcc2;
+ kal_uint8 mcc3;
+ kal_uint8 mnc1;
+ kal_uint8 mnc2;
+ kal_uint8 mnc3;
+} gmss_plmn_id_struct;
+
+typedef struct {
+ gmss_plmn_id_struct plmn_id;
+ kal_uint8 rat; /* nwsel_rat_enum */
+} gmss_plmn_id_rat_struct;
+
+typedef struct
+{
+ irat_system_type_enum rat;
+ kal_uint8 band;
+ kal_uint16 channel; /* used for 3GPP2 only */
+ kal_uint8 ef_imsi[9]; // the IMSI of UIM which adds the record
+} mmss_cdma_rec_type;
+
+typedef struct
+{
+ irat_system_type_enum rat;
+ kal_uint16 band;
+ /**< band
+ ** for GSM band ID (binary):
+ ** 0: GSM450; 1: GSM 480; 10: GSM 750; 11: GSM 850; 100: P-GMS900; 101: E-GSM900; 110: R-GSM900; 111: DCS 1800; 1000: PCS 1900
+ ** for UMTS band ID (binary):
+ ** 0: IMT-2000; 1: PCS-1900; 2: WCDMA_III_1700; 3: WCDMA_IV_1700; 4: WCDMA_V_850; 5: WCDMA_VI_800; 6: WCDMA_VII_2600; 7: WCDMA_VIII_900
+ ** for LTE band ID (binary):
+ ** 0: band 1; 1: band 2; 11: band 3; 100: band 4; 101: band 5; 110: band 6; 111: band 7; 1000: band 8;
+ ** 1001: band 9; 1010: band 10; 1011: band 11; 1100: band 12; 1101: band 13; 1110: band 14; 10001: band 17
+ */
+ gmss_plmn_id_struct plmn_id; /* used for 3GPP only */
+ kal_uint8 ef_imsi[9]; // the IMSI of SIM which adds the record
+} mmss_3gpp_rec_type;
+
+typedef union {
+
+ irat_system_type_enum rat;
+ mmss_cdma_rec_type mmss_cdma;
+ mmss_3gpp_rec_type mmss_3gpp;
+
+} mmss_sys_rec_union;
+
+typedef struct
+{
+ /* Number of system record stored in list.
+ */
+ kal_uint8 num;
+
+ /* List type of this list.
+ */
+ mmss_list_type_enum list_type;
+
+ /* Array for holding the system record references.
+ */
+ mmss_sys_rec_union sys_recs[SYS_MAX_MMSS_REC_NUM];
+
+} mmss_nv_list_struct;
+
+typedef struct
+{
+ /* Number of system record stored in list.
+ */
+ kal_uint8 num;
+
+ /* List type of this list.
+ */
+ mmss_list_type_enum list_type;
+
+ /* Array for holding the system record references.
+ */
+ mmss_3gpp_rec_type sys_recs[SYS_MAX_MMSS_REC_NUM];
+
+} mmss_3gpp_list_struct;
+
+typedef struct
+{
+ /* Number of system record stored in list.
+ */
+ kal_uint8 num;
+
+ /* List type of this list.
+ */
+ mmss_list_type_enum list_type;
+
+ /* Array for holding the system record references.
+ */
+ mmss_cdma_rec_type sys_recs[SYS_MAX_MMSS_REC_NUM];
+
+} mmss_3gpp2_list_struct;
+
+typedef union
+{
+ mmss_nv_list_struct mmss_nv_list;
+ mmss_3gpp_list_struct mmss_3gpp_list;
+ mmss_3gpp2_list_struct mmss_3gpp2_list;
+} mmss_list_union;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GMSS_MD1_MD3_COMMON_H */
diff --git a/mcu/interface/protocol/l4_c2k/monapi.h b/mcu/interface/protocol/l4_c2k/monapi.h
new file mode 100644
index 0000000..670750f
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/monapi.h
@@ -0,0 +1,227 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2002-2011 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+/*****************************************************************************
+
+ FILE NAME: monapi.h
+
+ DESCRIPTION:
+
+ This file contains all the constants, mail message definition and
+ function prototypes exported by the MON unit.
+
+*****************************************************************************/
+#ifndef MONAPI_H
+#define MONAPI_H
+
+#include "kal_public_defs.h"
+#include "sysapi.h"
+
+/*----------------------------------------------------------------------------
+ Defines Macros used in this file
+----------------------------------------------------------------------------*/
+
+/* NOTE: Empty all MonTrace */
+#define MonTrace(TraceId, ...)
+#define MonTraceInquire(TraceId) (KAL_TRUE)
+#define MonSpy(SpyId, ...)
+#define MonFault(Unit, Code1, Code2, Type)
+#define MON_DEEP_SLEEP_SW_LATENCY (17203) /* 350us + 1400us(for MML1_RF_POWER_ON), 17203=1750*8*1.2288*/
+
+
+
+/*----------------------------------------------------------------------------
+ Defines global variabls
+----------------------------------------------------------------------------*/
+extern const SysSFrameTimeT MonDeepSleepForeverTime;
+extern const SysSFrameTimeT MonDeepSleepFlightModeTime;
+
+#define SLEEP_FOREVER_TIME MonDeepSleepForeverTime
+#define FLIGHT_MODE_TIME MonDeepSleepFlightModeTime
+
+
+/*------------------------------------------------------------------------
+* Define typedefs used in MON API
+*------------------------------------------------------------------------*/
+
+/* Define fault halt/continue flag */
+typedef enum
+{
+ MON_CONTINUE = 0x00,
+ MON_HALT = 0x01
+} MonFaultTypeT;
+
+/* Define all unit fault code numbers */
+typedef enum
+{
+ MON_CP_FAULT_UNIT = 0x00,
+ MON_DBM_FAULT_UNIT = 0x01,
+ MON_EXE_FAULT_UNIT = 0x02,
+ MON_IPC_FAULT_UNIT = 0x03,
+ MON_IOP_FAULT_UNIT = 0x04,
+ MON_L1D_FAULT_UNIT = 0x05,
+ MON_LMD_FAULT_UNIT = 0x06,
+ MON_MON_FAULT_UNIT = 0x07,
+ MON_PSW_FAULT_UNIT = 0x08,
+ MON_HWD_FAULT_UNIT = 0x09,
+ MON_TST_FAULT_UNIT = 0x0A,
+ MON_VAL_FAULT_UNIT = 0x0B,
+ MON_SYS_FAULT_UNIT = 0x0C,
+ MON_RLP_FAULT_UNIT = 0x0D,
+ MON_HLP_FAULT_UNIT = 0x0E,
+ MON_MEDIA_FAULT_UNIT= 0x0F,
+ MON_UIM_FAULT_UNIT = 0x10,
+ MON_UI_FAULT_UNIT = 0x11,
+ MON_FSM_FAULT_UNIT = 0x12,
+ MON_CLC_FAULT_UNIT = 0x13,
+ MON_FCP_FAULT_UNIT = 0x14,
+ MON_HSC_FAULT_UNIT = 0x15,
+ MON_RMC_FAULT_UNIT = 0x16,
+ MON_RCP_FAULT_UNIT = 0x17,
+ MON_SLC_FAULT_UNIT = 0x18,
+ MON_CSS_FAULT_UNIT = 0x19,
+ MON_LEC_FAULT_UNIT = 0x1A,
+ MON_SEC_FAULT_UNIT = 0x1B,
+ MON_A2DP_FAULT_UNIT = 0x1C,
+ MON_AV_FAULT_UNIT = 0x1D,
+ MON_ETS_FAULT_UNIT = 0x1E,
+ MON_TLS_FAULT_UNIT = 0x1F,
+ MON_DM_FAULT_UNIT = 0x20,
+ MON_UNUSED_FAULT_UNIT = 0x21,
+ MON_MMC_FAULT_UNIT = 0x22,
+
+#if (defined(MTK_CBP) && (!defined(MTK_PLT_ON_PC)))
+ MON_FHC_FAULT_UNIT = 0x23,
+ MON_LOGIQ_FAULT_UNIT= 0x24,
+#endif
+
+#if (defined(MTK_PLT_AUDIO))
+ MON_VALSPH_FAULT_UNIT = 0x25,
+ MON_HWDSPH_FAULT_UNIT = 0x26,
+#endif // (defined(MTK_PLT_AUDIO))
+ MON_SBP_FAULT_UNIT = 0x27,
+ MON_NUM_FAULT_UNIT,
+
+ MON_CP_BOOT_FAULT_UNIT = 0x30, /* these 2 are only used by boot code and therefore */
+ MON_BOOT_FAULT_UNIT = 0x31 /* should not be accounted for in MON_NUM_FAULT_UNIT */
+
+} MonFaultUnitT;
+typedef enum
+{
+ MON_HWD_SLEEPOVER_FLAG = 0x00000001, /* HWD: for sleepover ISR */
+ MON_MD_DVFS_PEND = 0x00000002,
+ MON_RC_PEND_FLAG = 0x00000004, /*RC: for ongoing RC SQ*/
+ MON_META_MODE_FLAG = 0x00000008,
+ MON_CLR_EXTEND_SLOT = 0x00000010,
+ MON_CL1_TMG_CHG = 0x00000020,
+ MON_RAKE_SHDR_PROTECT = 0x00000040,
+ MON_CL1_RTBAW = 0x00000080,
+ MON_HSC_1X_MODEM_ACTIVE_FLAG = 0x00000100, /* HSC: for 1x modem activity */
+ MON_HSC_DO_MODEM_ACTIVE_FLAG = 0x00000200, /* HSC: for DO modem activity */
+ MON_GPS_SYNC_FLAG = 0x00000400, /* For GPS sync */
+ MON_FLAG_CAN_USE_6 = 0x00000800,
+ MON_1X_TIME_COPY_TO_DO_FLAG = 0x00001000,
+ MON_FLAG_CAN_USE_7 = 0x00002000,
+ MON_FLAG_CAN_USE_8 = 0x00004000,
+ MON_FLAG_CAN_USE_9 = 0x00008000,
+ MON_FLAG_CAN_USE_10 = 0x00010000,
+ MON_FLAG_CAN_USE_11 = 0x00020000,
+ MON_FLAG_CAN_USE_12 = 0x00040000,
+ MON_FLAG_CAN_USE_13 = 0x00080000,
+ MON_FLAG_CAN_USE_14 = 0x00100000,
+ MON_FLAG_CAN_USE_15 = 0x00200000,
+ MON_FLAG_CAN_USE_16 = 0x00400000,
+ MON_RMC_GM_GAP_FLAG = 0x00800000, /* RMCGM: For Idle/Conn Gap offered */
+ MON_FLAG_CAN_USE_17 = 0x01000000,
+ MON_FLAG_CAN_USE_18 = 0x02000000,
+ MON_FLAG_CAN_USE_19 = 0x04000000,
+ MON_SIB8_TIMING_RECOVER = 0x08000000,
+ MON_LEC_GPS_ACTIVITY_FLAG = 0x10000000, /* LEC: for GPS activity */
+ MON_WAKE_LOCK_TST = 0x20000000,
+ MON_HSC_EVSTANDBY_TIME_COPY = 0x40000000
+ /* don't use > 0x7FFF FFFF */
+} MonDeepSleepVetoT;
+
+typedef enum
+{
+ DEEP_SLEEP_NOT_ENABLE,
+ DEEP_SLEEP_NOT_REQ,
+ DEEP_SLEEP_SUSPENDED,
+ DEEP_SLEEP_DURATION_TOO_SMALL,
+ DEEP_SLEEP_MON_ALLOWED,
+ DEEP_SLEEP_NOT_ALL_QUE_EMPTY,
+ DEEP_SLEEP_NOT_EVT_QUE_EMPTY,
+ DEEP_SLEEP_NOT_MSG_QUE_EMPTY,
+ DEEP_SLEEP_CANCELLING,
+ DEEP_SLEEP_MARGIN_NOT_ENOUGH,
+ DEEP_SLEEP_ALLOWED,
+ DEEP_SLEEP_FH_IS_ONGOING
+}MonDeepSleepStatusT;
+
+extern kal_bool MonDeepSleepIsRequested(SysAirInterfaceT Interface);
+extern kal_bool MonDeepSleepForeverIsRequested(SysAirInterfaceT Interface);
+extern kal_bool MonDeepSleepFlightModeIsRequested(SysAirInterfaceT Interface);
+extern void MonDeepSleepCancel(SysAirInterfaceT Interface, kal_bool WakeCs);
+extern void MonShDeepSleepCancel( SysAirInterfaceT Interface);
+extern void MonDeepSleepRestoreRequest(SysAirInterfaceT Interface);
+extern void MonDeepSleepClearRequest(SysAirInterfaceT Interface);
+extern SysSFrameTimeT* MonDeepSleepGetWakeTime(SysAirInterfaceT Interface);
+extern kal_uint64 MonDeepSleepGetTillWakeTime(SysAirInterfaceT Interface);
+extern kal_bool MonDeepSleepIsPending(SysAirInterfaceT Interface);
+extern kal_uint32 MonDeepSleepGetVetoDeepSleep(SysAirInterfaceT Interface);
+extern void MonDeepSleepRequest(SysAirInterfaceT Interface, SysSFrameTimeT WakeTime);
+extern void MonShDeepSleepRequest(SysAirInterfaceT Interface, SysSFrameTimeT* WakeTime);
+extern void MonDeepSleepSuspend(SysAirInterfaceT Interface, MonDeepSleepVetoT BitMask);
+extern void MonShDeepSleepSuspend(SysAirInterfaceT Interface, MonDeepSleepVetoT BitMask);
+extern void MonDeepSleepResume(SysAirInterfaceT Interface, MonDeepSleepVetoT BitMask);
+extern void MonShDeepSleepResume(SysAirInterfaceT Interface, MonDeepSleepVetoT BitMask);
+extern kal_bool MonDeepSleepIsVetoed(SysAirInterfaceT Interface);
+extern kal_uint32 MonDeepSleepVetoMaskGet(SysAirInterfaceT Interface);
+extern MonDeepSleepStatusT MonDeepSleepEnter(SysAirInterfaceT Interface);
+extern void MonIdleSleepControl(kal_bool DeepEnable);
+extern void MonDeepSleepTakeSlpHandle(SysAirInterfaceT Interface);
+extern void MonDeepSleepGiveSlpHandle(SysAirInterfaceT Interface);
+extern void MonShDeepSleepSetStIntOffset(SysAirInterfaceT Interface);
+extern kal_uint32 MonShDeepSleepGetStIntOffset(SysAirInterfaceT Interface);
+extern kal_bool MonShDeepSleepStIntOffsetExist(SysAirInterfaceT Interface);
+#endif
diff --git a/mcu/interface/protocol/l4_c2k/ottsdefs.h b/mcu/interface/protocol/l4_c2k/ottsdefs.h
new file mode 100644
index 0000000..cc8b29e
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/ottsdefs.h
@@ -0,0 +1,234 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 1998-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef __INC_OTTSDEFS_H__
+#define __INC_OTTSDEFS_H__
+
+/*****************************************************************************
+ FILE NAME: ottsdefs.h
+
+ DESCRIPTION:
+ Defines macros and types that allow the code to be freely ported between
+ ARM and Visual C++ compiler environments. The Visual C++ compiler is used
+ for the Off Target Test System (OTTS) simulation (where the protocol stack
+ and some other CP code is compiled so it can be tested under simulation),
+ while the ARM compiler is used for the "real code" targeted toward the phone
+ hardware.
+
+*****************************************************************************/
+
+#if !defined (__MTK_TARGET__)
+ typedef kal_int8 int8;
+ typedef kal_int16 int16;
+ typedef kal_int32 int32;
+ typedef kal_int64 int64;
+
+ typedef kal_uint8 uint8;
+ typedef kal_uint16 uint16;
+ typedef kal_uint32 uint32;
+ typedef kal_uint64 uint64;
+
+ typedef kal_uint8 UINT8; /* Unsigned 8-bit quantity */
+ typedef kal_int8 INT8; /* Signed 8-bit quantity */
+ typedef kal_uint16 UINT16; /* Unsigned 16-bit quantity */
+ typedef kal_int16 INT16; /* Signed 16-bit quantity */
+ typedef kal_uint32 UINT32; /* Unsigned 32-bit quantity */
+ typedef kal_int32 INT32; /* Signed 32-bit quantity */
+
+ typedef kal_bool bool;
+ typedef kal_bool Bool;
+#endif
+
+#if (defined MTK_PLT_ON_PC)
+
+ /* Suppress some of the useless and annoying warnings.
+ Also suppress some of the warnings that the ARM compiler should be
+ bitching about, and which the stack programmers should pay attention to,
+ but are frequent enough that they muddy the compile result listing (the
+ purpose of the run through the Visual C++ compiler is *not* to catch
+ this kind of stuff, just to allow their code to run and be tested under
+ the simulator. These kinds of warnings should be caught and fixed at the
+ ARM compile stage.
+ ----------------------------------------------------------------------- */
+ #pragma warning(disable: 4761) /* integral size mismatch */
+ #pragma warning(disable: 4244) /* conversion loses precision */
+ #pragma warning(disable: 4013) /* function used without prototype, assuming extern returning int */
+ #pragma warning(disable: 4018) /* signed/unsigned mismatch */
+ #pragma warning(disable: 4091) /* extern ignored when variable not declared */
+ #pragma warning(disable: 4002) /* too many actual parameters for macro */
+ #pragma warning(disable: 4003) /* not enough actual parameters for macro */
+ #pragma warning(disable: 4554) /* check operator precedence for possible error */
+ #pragma warning(disable: 4103) /* used #pragma to change alignment */
+ #pragma warning(disable: 4142) /* bening redefinition of type */
+
+ #ifndef TRUE
+ #define TRUE (1)
+ #endif
+
+ #ifndef FALSE
+ #define FALSE (0)
+ #endif
+
+#endif /* MTK_PLT_ON_PC */
+
+#define OTTS_static
+
+ /* enable ARM compiler "__packed" and "__inline" directives */
+#if defined(GEN_FOR_PC) /* For Cgen generate NVRAM database */
+ #define PACKED
+ #define PACKED_PREFIX
+ #define PACKED_POSTFIX
+#elif defined(__ARMCC_VERSION)
+ #define PACKED __packed
+ #define PACKED_PREFIX PACKED
+ #define PACKED_POSTFIX
+
+ #define INLINE __inline
+#elif defined(__GNUC__)
+ #define PACKED
+ #define PACKED_PREFIX
+ #define PACKED_POSTFIX
+
+ #define INLINE inline
+#elif defined(_MSC_VER)
+ /* no "__packed" or "__inline" directives in Visual C++ */
+ #define PACKED
+ #define PACKED_PREFIX
+ #define PACKED_POSTFIX
+
+ /* INLINE has been defined in kal_public_defs.h */
+#endif
+
+/*After Jade (GCC build), Remove PACKED attribute for NVRAM Data structure*/
+#if defined (MTK_DEV_CCCI_FS) && defined (__GNUC__)
+ #define NV_PACKED_PREFIX
+ #define NV_PACKED_POSTFIX
+#else
+ #define NV_PACKED_PREFIX PACKED_PREFIX
+ #define NV_PACKED_POSTFIX PACKED_POSTFIX
+#endif
+
+#if defined(GEN_FOR_PC) /* For Cgen generate NVRAM database */
+ #define GET_RETURN_ADDRESS(a)
+ #define GET_STACK_POINTER(a)
+ #define PRAGMA_BEGIN_COMPILER_OPTIMIZE_DISABLE
+ #define PRAGMA_END_COMPILER_OPTIMIZE_DISABLE
+ #define PRAGMA_BEGIN_COMPILER_OPTIMIZE_TIME
+ #define PRAGMA_END_COMPILER_OPTIMIZE_TIME
+ #define PRAGMA_BEGIN_COMPILER_OPTIMIZE_SPACE
+ #define PRAGMA_END_COMPILER_OPTIMIZE_SPACE
+#endif
+
+#if defined(GEN_FOR_PC) /* For Cgen generate NVRAM database */
+ #define ATTRIB(x)
+ #define ATTRIB_SECTION(x)
+ #define ATTRIB_ALIGNED(x)
+#elif defined(__ARMCC_VERSION)
+ #define ATTRIB(x) __attribute__(x)
+ #if defined(USE_ATTRIB_SECTION)
+ #define ATTRIB_SECTION(x) ATTRIB((section(x)))
+ #else
+ #define ATTRIB_SECTION(x)
+ #endif
+ #define ATTRIB_ALIGNED(x) __align(x)
+#elif defined(__GNUC__)
+ #define ATTRIB(x) /*__attribute__(x)*/
+ #define ATTRIB_SECTION(x) /* ATTRIB((section(x))) */
+ #define ATTRIB_ALIGNED(x) ATTRIB((aligned(x)))
+#elif defined(_MSC_VER)
+ #define ATTRIB(x)
+ #define ATTRIB_SECTION(x)
+ #define ATTRIB_ALIGNED(x) __declspec(align(x))
+#endif
+
+/*****************************************************************************
+* $Log: ottsdefs.h $
+*
+* 09 05 2019 jari.manninen
+* [MOLY00437520] [System Service][MOLY Kernel Internal Request] Legacy RTOS reference removal from mandatory source code delivery files
+*
+* Legacy RTOS reference removal.
+*
+* 10 12 2017 sue.zhong
+* [MOLY00282761] [MT6763][SMO][C2K]Optimize inter-category interfaces
+*
+* .
+*
+* 07 06 2017 sue.zhong
+* [MOLY00259241] [6293][C2K]Replace with KAL data type
+* ::interface
+*
+* 06 23 2017 sue.zhong
+* [MOLY00259241] [6293][C2K]Replace with KAL data type
+* ::Delete legacy header files
+* Revision 1.2 2004/03/25 11:46:02 fpeng
+* Updated from 6.0 CP 2.5.0
+* Revision 1.2 2004/02/10 15:17:02 bcolford
+* Merged CBP4.0 Release 8.05.0 changes.
+* Revision 1.5 2003/10/31 15:23:51 mclee
+* define kal_uint16
+* Revision 1.4 2002/10/21 09:39:23 mshaver
+* Changes to support OTTS incorportated into the baseline.
+* These changes enabled only by #ifdef OTTS.
+* Normal CP operation is unaffected.
+* Revision 1.3 2002/06/04 08:07:21 mshaver
+* Added VIA Technologies copyright notice.
+* Revision 1.2 2002/02/01 11:58:03 ameya
+* Created this file and moved all OTTS related definitions existing in all other files to this header file.
+* Revision 1.1 2002/02/01 11:06:55 ameya
+* Initial revision
+* Revision 1.00 2001/12/14 14:29:00 jackt
+* Original version.
+*****************************************************************************/
+
+/*****************************************************************************
+* End of File
+*****************************************************************************/
+#endif
+/**Log information: \main\TROPHY_Trophy_0.4.21_QILIAN_ALPHA\1 2013-08-26 07:41:52 GMT xding
+** href#0000, merge MMC from CBP8**/
+/**Log information: \main\Trophy\Trophy_xding_href22331\1 2013-12-10 07:18:02 GMT xding
+** HREF#22331, ºÏ²¢MMCÏà¹Ø¹¦Äܵ½Trophy baselineÉÏ**/
+/**Log information: \main\Trophy\1 2013-12-10 08:33:37 GMT jzwang
+** href#22331:Merge MMC latest implementation from Qilian branch.**/
+
diff --git a/mcu/interface/protocol/l4_c2k/sidbdefs.h b/mcu/interface/protocol/l4_c2k/sidbdefs.h
new file mode 100644
index 0000000..8ce8be9
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/sidbdefs.h
@@ -0,0 +1,1575 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2002-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef SIDBDEFS_H
+#define SIDBDEFS_H
+/******************************************************************************
+*
+* FILE NAME : sidbdefs.h
+*
+* DESCRIPTION :
+*
+* This is the definitions of ITEM and KEY for SIDB.
+* In FileSystemManager(FsmDataItem), ITEM is type and KEY is id.
+*
+* HISTORY :
+*
+* See Log at end of file
+*
+******************************************************************************/
+
+/*for UI */
+/*Temp add 1000 for distinguish UI sidb ITEM*/
+#define ITEM_SOUNDS 1001
+#define ITEM_DISPLAY 1002
+#define ITEM_SYSTEM 1003
+#define ITEM_SECURITY 1004
+#define ITEM_CALLSETUP 1005
+#define ITEM_1XDATA 1006
+#define ITEM_VOICESERVICE 1007
+#define ITEM_PHONEINFO 1008
+#define ITEM_OTHERS 1009
+#define ITEM_MESSAGE 1010
+#define ITEM_MESSAGE_QUICKTEXT 1011
+#define ITEM_ALARMCLOCK 1012
+#define ITEM_SCHEDULER 1013
+#define ITEM_MANAGEMENT 1014 /* */
+#define ITEM_RECENTCALL 1015
+#define ITEM_CALLPROCESS 1016
+#define ITEM_EDIT_INPUT 1017
+#define ITEM_MODULE_PHONEINFO 1018
+#define ITEM_CHVAPP 1019
+#define ITEM_VOICE_MEMO 1020
+
+#define ITEM_NO_UIM 1021
+#define ITEM_CONTACT_GROUP_NAME 1022
+#define ITEM_WORLDTIME 1023
+
+#define ITEM_PROFILE_DEFAULT 1024
+#define ITEM_PROFILE_OFFICE 1025
+#define ITEM_PROFILE_MEETING 1026
+#define ITEM_PROFILE_CAR 1027
+#define ITEM_PROFILE_SILENCE 1028
+#define ITEM_PROFILE_OUTDOOR 1029
+#define ITEM_PROFILE_CUSTOMIZED 1030 /* Now it is for vibrator*/
+#define ITEM_SMART_MESSAGE 1031
+#define ITEM_TDL_ITEMS 1032
+#define ITEM_KEYPADSERV 1033 // ADDED for keypad service provioning
+#define ITEM_NETWORK_SERVICES 1034
+
+/*-----------------------------------------------// */
+#define ITEM_HAIER_CONTACT_LIST 1035
+#define ITEM_WAP 1050
+#define ITEM_CONTENT_MANAGER 1051
+#define ITEM_MYMEDIA 1052
+#define ITEM_IP_KEY 1053
+
+#define ITEM_CLIPBOARD 1054
+#define ITEM_PHONEBOOK 1055
+
+/*for CTA extension*/
+#define ITEM_CTA_EXT 1056
+
+
+/*for BREW*/
+#define ITEM_BREW 1100
+
+/*for Extended AT commands*/
+#define ITEM_ATCONFIG 1120
+
+#ifdef SYS_OPTION_DM
+#define ITEM_DMAT 1160
+#define ITEM_HFA 1161
+#define ITEM_TREE 1162
+#define ITEM_PROXY 1163
+#endif
+
+/*for UIM module*/
+#define ITEM_UIM 2000
+
+/*for DBM */
+#define ITEM_DBM_CP_TYPE 256
+#define ITEM_DBM_RF_TYPE 257
+
+/*###KEY####################*/
+
+/*ITEM_ATCONFIG */
+/*******************************************
+value type: ITEM_ATCONFIG
+value range:
+value meanings:
+********************************************/
+#define KEY_ATCONFIG_SMSMEM1 1
+#define KEY_ATCONFIG_SMSMEM2 2
+#define KEY_ATCONFIG_SMSMEM3 3
+
+/*WAP */
+/*******************************************
+value type: WapClipboardDataT
+value range:
+value meanings: buffer 256 + 1 + 1 bytes
+********************************************/
+#define KEY_WAP_CLIPBOARD 1
+
+/*******************************************
+value type: SidbStringT
+value range:
+value meanings:
+********************************************/
+#define KEY_WAP_USER_NAME 2
+#define KEY_WAP_PASS_WORD 3
+#define KEY_WAP_DIAL_NUMBER 4
+
+#ifdef SYS_OPTION_DM
+/* ITEM_DMAT */
+#define ITEM_DMAT_OMADM 1
+
+/* ITEM_HFA */
+#define ITEM_DMAT_HFA 1
+#define ITEM_DM_HFA_FUMO 2
+
+/* ITEM_TREE */
+#define ITEM_DM_TREE 1
+
+/* ITEM_PROXY*/
+#define ITEM_PROXY_ENABLE 1
+#define ITEM_PROXY_ADD 2
+#endif
+
+/*ITEM_CONTENT_MANAGER */
+/*******************************************
+value type: kal_uint32
+value range:
+value meanings: Num of predefined CID
+********************************************/
+#define KEY_CONTENT_CID_NUM 1
+
+/*******************************************
+value type: kal_uint32
+value range:
+value meanings: Total memory capacity of media
+ files (including Java), in Bytes
+********************************************/
+#define KEY_CONTENT_MEMORY_CAPACITY 2
+
+/*ITEM_MYMEDIA */
+/*******************************************
+value type: kal_uint32
+value range:
+value meanings:
+********************************************/
+#define KEY_MYMEDIA_SORT_BY 1
+#define KEY_MYMEDIA_SORT_ASCEND 2
+
+/*ITEM_IP_KEY*/
+/*******************************************
+value type: kal_int16
+value range:
+value meanings:
+********************************************/
+#define KEY_IP_KEY_DEFAULT 1
+#define KEY_IP_KEY_POND_ON 2
+#define KEY_IP_KEY_PAUSE_TIME 3
+/*******************************************
+value type: SidbStringT
+value range:
+value meanings: IP Service NUmber
+********************************************/
+#define KEY_IP_KEY_NUMBER_START 4
+/*TDL (To do list) */
+/*******************************************
+value type: TodoItemC
+value range: N/A
+value meanings: Items in todo-list app
+********************************************/
+#define KEY_TDL_ITEM01 1
+#define KEY_TDL_ITEM02 2
+#define KEY_TDL_ITEM03 3
+#define KEY_TDL_ITEM04 4
+#define KEY_TDL_ITEM05 5
+#define KEY_TDL_ITEM06 6
+#define KEY_TDL_ITEM07 7
+#define KEY_TDL_ITEM08 8
+#define KEY_TDL_ITEM09 9
+#define KEY_TDL_ITEM10 10
+
+
+
+
+/*###KEY####################*/
+
+/*BEGIN FOR PROFILE */
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5,10,11
+value meanings: 0:off 1:low 2:med low
+ 3:med 4:high med 5:high
+note:
+********************************************/
+#define KEY_PROFILE_VOLUME_RINGER 1
+
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3,4,5
+value meanings: 1:low 2:med low 3:med 4:high med 5:high
+********************************************/
+#define KEY_PROFILE_VOLUME_EARPIECE 2
+#define KEY_PROFILE_VOLUME_HANDFREE_SPEAKER 3
+#define KEY_PROFILE_VOLUME_SPEAKER 4
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5
+value meanings: 0:off 1:low 2:med low 3:med 4:high med 5:high
+********************************************/
+#define KEY_PROFILE_VOLUME_KEYBEEP 5
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5,....
+value meanings:
+********************************************/
+#define KEY_PROFILE_CALL_RINGER 6
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3,4,5
+value meanings:
+1:ringer 2:vibrate 3: first vibrate then ringer 4: ringer and vibrate 5:silent
+********************************************/
+#define KEY_PROFILE_INCOMINGCALL_WAY 7
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5,....
+value meanings:
+********************************************/
+#define KEY_PROFILE_SMS_RINGER 8
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3,4,5
+value meanings:
+1:ringer 2:vibrate 3: first vibrate then ringer 4: ringer and vibrate 5:silent
+********************************************/
+#define KEY_PROFILE_INCOMINGSMS_WAY 9
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:off 1:on
+********************************************/
+#define KEY_PROFILE_ALERTS_SERVICECHANGE 10
+#define KEY_PROFILE_ALERTS_MINUTEBEEP 11
+#define KEY_PROFILE_ALERTS_CALLCONNECT 12
+#define KEY_PROFILE_ALERTS_BACKTOTOP 13
+#define KEY_PROFILE_TONE_POWERONOFF 14
+
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3
+value meanings: 1:flip open 2:any key 3:send only
+********************************************/
+#define KEY_PROFILE_ANSWER_CALL 15
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5,10,11
+value meanings: 0:off 1:low 2:med low
+ 3:med 4:high med 5:high
+note:
+********************************************/
+#define KEY_PROFILE_VOLUME_RINGER_SMS 16
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3,4,5,....
+value meanings:
+********************************************/
+#define KEY_PROFILE_COLORLIGHT 17
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:off 1:on
+********************************************/
+#define KEY_PROFILE_ALERTS_DROPPEDCALL 18
+#define KEY_PROFILE_ALERTS_ORIGINATIONFAIL 19
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2
+value meanings: 1:normal 2:long
+********************************************/
+#define KEY_PROFILE_KEYTONE 20
+#define KEY_PROFILE_BATTERY_WARNING 21
+#define KEY_PROFILE_VOLUME_ALERTS 22
+
+#define KEY_PROFILE_TONE_POWERON 23
+#define KEY_PROFILE_TONE_POWEROFF 24
+#define KEY_PROFILE_ROAM_INDICATOR 25
+#define KEY_PROFILE_VOICEMAIL_TONE 26
+#define KEY_PROFILE_VOICEMAIL_VIBRATE 27
+
+/*END FOR PROFILE */
+
+
+/*******************************************
+value type: kal_uint32
+value range:
+value meanings: The index of the current world time
+********************************************/
+#define KEY_WORLDTIME 1
+
+
+/*BEGIN FOR NO UIM */
+/*******************************************
+value type: ukal_uint3232
+value range:
+value meanings:
+********************************************/
+
+#define KEY_NOUIM_SLOTCYCLE_INDEX 2 /*kal_uint8 SLOT_CYCLE_INDEXp; slot cycle index */
+
+
+/*******************************************
+value type: SidbStringT
+value range:
+value meanings:
+********************************************/
+#define KEY_NOUIM_ESN 1 /*kal_uint32 ESN; Electronic Serial Number */
+
+#define KEY_NOUIM_COUNTRY_CODE 3 /*kal_uint16 mcc; Mobile Country Code */
+
+#define KEY_NOUIM_NETWORK_CODE 4 /*kal_uint8 imsi_11_12; 7 bit IMSI_11_12 */
+
+#define KEY_NOUIM_A_KEY 5 /*kal_uint32 A_Key[2]; Binary Authentication Key for CAVE */
+#define KEY_NOUIM_DIR_NUMBER 6 /*kal_uint8 Mdn[16]; MDN - Mobile directory number */
+
+/*******************************************************************************
+ kal_uint16 imsi_s2; 10 bit IMSI_S2 value
+ kal_uint32 imsi_s1; 24 bit IMSI_S1 value
+*******************************************************************************/
+#define KEY_NOUIM_PHONE_NUMBER 7
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3
+value meanings:
+ #define ENG_PREF_SYS_A 0
+ #define ENG_PREF_SYS_B 1
+ #define ENG_PREF_SYS_A_ONLY 2
+ #define ENG_PREF_SYS_B_ONLY 3
+********************************************/
+#define KEY_NOUIM_CHANNEL 8
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: system prefence
+ 0: home only =false
+ 1: home only = true
+********************************************/
+#define KEY_NOUIM_HOMEONLY 9
+
+/*******************************************
+value type: SidbStringT
+value range:
+value meanings: SID NID PAIR
+ SID + '*' + NID
+********************************************/
+#define KEY_NOUIM_SIDNID1 10
+#define KEY_NOUIM_SIDNID2 11
+#define KEY_NOUIM_SIDNID3 12
+#define KEY_NOUIM_SIDNID4 13
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3
+value meanings:
+ THE value of CDMA Channel primary A(B) and CDMA Channel secondary A(B)
+********************************************/
+#define KEY_NOUIM_CHANNEL_PA 14
+#define KEY_NOUIM_CHANNEL_PB 15
+#define KEY_NOUIM_CHANNEL_SA 16
+#define KEY_NOUIM_CHANNEL_SB 17
+/*END FOR NO UIM */
+
+
+/*PIN */
+/*******************************************
+value type: SidbStringT
+value range: ----
+value meanings: PIN code
+********************************************/
+#define KEY_PIN1 1
+/*******************************************
+value type: char[16]
+value range: ----
+value meanings: code generated from IMSI
+********************************************/
+#define KEY_UIM_ID 2
+/*PHONE INFO */
+/*******************************************
+value type: SidbStringT*
+value range: the number
+value meanings: the number
+********************************************/
+#define KEY_PHONEINFO_NUMBER 1
+#define KEY_PHONEINFO_SWVERSION 2
+#define KEY_PHONEINFO_HWDVERSION 3
+#define KEY_PHONEINFO_PRLVERSION 4
+#define KEY_PHONEINFO_PRIVERSION 5
+#define KEY_PHONEINFO_SID 6
+#define KEY_PHONEINFO_NID 7
+#define KEY_PHONEINFO_KAL_TRUE_SWVERSION 8
+
+#define KEY_PHONEINFO_PRL1_VERSION 9
+#define KEY_PHONEINFO_PRL2_VERSION 10
+#define KEY_PHONEINFO_CFG_VERSION 11
+/*::: 21 IS USED FOR SCRIPT VERSION*/
+
+/* MODULE PHONEINFO*/
+/* for manufacture test mode */
+/*******************************************
+value type: char*
+value range: char[16]
+value meanings:
+********************************************/
+#define KEY_BARCODE 1
+/*******************************************
+value type: kal_uint8
+value range: 0 or 1
+value meanings: if have checked barcode,value is 1
+********************************************/
+#define KEY_BARCODE_WRITE_CHECKED 2
+/*******************************************
+value type: kal_uint8
+value range: 0 or 1
+value meanings: if have calibrated,value is 1
+********************************************/
+#define KEY_CALIBRATION_CHECKED 3
+/*******************************************
+value type: kal_uint8
+value range: 0 or 1
+value meanings: if have rf checked,value is 1
+********************************************/
+#define KEY_RF_PERFORMANCE_CHECKED 4
+/*******************************************
+value type: kal_uint8
+value range: 0 or 1
+value meanings: if esn checked,value is 1
+********************************************/
+#define KEY_ESN_IMSI_CHECKED 5
+
+
+#define KEY_CUST_DEFINE_1 6
+#define KEY_CUST_DEFINE_2 7
+#define KEY_CUST_DEFINE_3 8
+
+
+/********
+The following is a list of SIDB commands:
+1. "ETS, Id=CP FFS SIDB WRITE, type=18, id=1,length=8" -write barcode number;
+2. "ETS, Id=CP FFS SIDB WRITE, type=18, id=2,length=1" -barcode written flag;
+3. "ETS, Id=CP FFS SIDB WRITE, type=18, id=3,length=1," -calibration pass flag;
+4. "ETS, Id=CP FFS SIDB WRITE, type=18, id=4,length=1" -RF testing pass flag;
+5. "ETS, Id=CP FFS SIDB WRITE, type=18, id=5, length=1" -ESN written flag;
+
+5. "ETS, Id=CP FFS SIDB WRITE, type=18, id=6, length=30" -write AMTS version info (if the length of version info is less than 30, insert '0'. Same rule for all string info.);
+6. "ETS, Id=CP FFS SIDB WRITE, type=18, id=7,length=30" -write default.ini file version;
+7. "ETS, Id=CP FFS SIDB WRITE, type=18, id=8,length=1" -write MMI Test flag;
+8. "ETS, Id=CP FFS SIDB WRITE, type=18, id=9,length=30" -write VPSTGo version info;
+9. "ETS, Id=CP FFS SIDB WRITE, type=18, id=10,length=30" -write VPSTGo configuration file version;
+***********/
+
+#define KEY_KDS_OR_kyocera 12 /* 0x31: KDS 0x32 Kyocera */
+
+/*sounds */
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5,....
+value meanings:
+********************************************/
+#define KEY_RINGER_CALLER 1
+#define KEY_RINGER_NOCALLER 2
+#define KEY_RINGER_RESTRICT 3
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5,10,11
+value meanings: 0:off 1:low 2:med low
+ 3:med 4:high med 5:high 10:vibrate 11 :vibrate and high
+note:
+********************************************/
+#define KEY_VOLUME_RINGER 4
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3,4,5
+value meanings: 1:low 2:med low 3:med 4:high med 5:high
+********************************************/
+#define KEY_VOLUME_EARPIECE 5
+#define KEY_VOLUME_HANDFREE_SPEAKER 6
+#define KEY_VOLUME_SPEAKER 7
+
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5
+value meanings: 0:off 1:low 2:med low 3:med 4:high med 5:high
+********************************************/
+#define KEY_VOLUME_KEYBEEP 8
+
+/*by raynm */
+/************************************************************************
+value type: kal_bool
+value range: KAL_TRUE, KAL_FALSE
+value meanings : KAL_TRUE: vibrate on, KAL_FALSE: vibrate off
+************************************************************************/
+#define KEY_SOUND_VIBRATE 9
+
+/************************************************************************
+value type: kal_uint32
+value range:
+value meanings :
+************************************************************************/
+
+#define KEY_SOUND_PATH 10
+
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:off 1:on
+********************************************/
+#define KEY_ALERTS_SERVICECHANGE 13
+#define KEY_ALERTS_MINUTEBEEP 14
+#define KEY_ALERTS_CALLCONNECT 15
+#define KEY_ALERTS_BACKTOTOP 16
+#define KEY_TONE_POWERONOFF 17
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2
+value meanings: 1:normal 2:long
+********************************************/
+#define KEY_KEYTONE 18
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5,....
+value meanings:
+********************************************/
+#define KEY_GROUP_NO_RINGER 19
+#define KEY_GROUP_FAMILY_RINGER 20
+#define KEY_GROUP_FRIENDS_RINGER 21
+#define KEY_GROUP_COLLEAGUES_RINGER 22
+#define KEY_GROUP_VIP_RINGER 23
+#define KEY_GROUP_RESERVED1_RINGER 24
+#define KEY_GROUP_RESERVED2_RINGER 25
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,....
+value meanings: AlarmClock Ringer
+********************************************/
+#define ALARM_VOICE 26
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:Burst 1:Continue
+********************************************/
+#define KEY_DTMF_MODE 27
+
+/*******************************************
+value type: kal_uint32
+value range: 24,25,26,27,28,28,30
+value meanings: the profiles item
+********************************************/
+#define KEY_PROFILES_ITEM 50
+#define KEY_PROFILES_ITEM_OLD 51 /*FOR vibrate*/
+
+/*******************************************
+value type: kal_uint32
+value range: 0, 1
+value meanings:0: off, 1: on
+********************************************/
+#define KEY_ALERTS_CALLDISCONNECT 52
+
+/*DISPLAY */
+/*******************************************
+value type: SidbStringT
+value range: none
+value meanings: banner text
+********************************************/
+#define KEY_BANNER_PERSONAL 1
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,7000,15000,30000
+value meanings: 7000:7 seconds 15000:15 seconds 30000:30 seconds
+ 0:always off 1: on flip open
+********************************************/
+#define KEY_MAINLCD_TIMER 2
+
+/****to do:front lcd:timer ,patterns****/
+
+/*******************************************
+value type: kal_uint32
+value range: 0,25,50,75,100
+value meanings: 0:0% 25:25% 50:50% 75:75% 100:100%
+********************************************/
+#define KEY_MAINLCD_BRIGHTNESS 3
+
+/*******************************************
+value type: kal_uint32
+value range: none
+value meanings: the picture or animation index
+********************************************/
+#define KEY_SCREEN_WALLPAPER 4
+#define KEY_SCREEN_POWERON 5
+#define KEY_SCREEN_POWEROFF 6
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4
+value meanings: 0:default 1:green 2:violet 3:orange 4:black
+********************************************/
+#define KEY_THEME_COLOR 7
+
+/*************fonts*************************/
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:english 1:spanish
+********************************************/
+#define KEY_LANGUAGE 8
+
+/*******************************************
+value type: ukal_uint3232
+value range: 1,2,3,4
+value meanings: 1:2 minutes 2:10 minutes 3:30 minutes 4:always on
+********************************************/
+#define KEY_POWERSAVER 9
+
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:off 1:on
+********************************************/
+#define KEY_STATUS_LIGHT 10
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3,4,5
+value meanings:
+********************************************/
+#define KEY_MAINLCD_CONTRAST 11
+
+/*******************************************
+value type: Ukal_int32
+value range: 0,1,2
+value meanings:
+ 0: menu list only text
+ 1: large icon list
+ 2: large icon style1
+********************************************/
+#define KEY_MAINMENU_STYLE 12
+/*1 Venezuela 0 others latam country*/
+#define KEY_LATAM_VENEZUELA 13
+
+/*******************************************
+value type: Ukal_int32
+value range: 0,1,2,3,4,....
+value meanings:
+different type LCD
+********************************************/
+#define KEY_LCD_TYPE 14
+
+/*******************************************
+value type: Ukal_int32
+value range: 0,1,
+value meanings: 0: Use PWM to turn off back light
+ 1: Use GPIO28 to turn off back light
+different type LCD
+********************************************/
+#define KEY_LCD_BL_USE_GPIO 15
+
+/*******************************************
+value type: Ukal_int32
+value range: 0,1,
+value meanings: 0: ERI Banner off.
+ 1: ERI Banner on.
+********************************************/
+#define KEY_BANNER_ERI 16
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,7000,15000,30000
+value meanings: 7000:7 seconds 15000:15 seconds 30000:30 seconds
+ 0:always off 1: on flip open
+********************************************/
+#define KEY_KEYPAD_TIMER 17
+
+/*******************************************
+value type: Ukal_int32
+value range: 0,1,
+value meanings: 0: Number on start off.
+ 1: Number on start on.
+********************************************/
+#define KEY_NUMBER_ON_START 18
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3,4,5
+value meanings:
+********************************************/
+#define KEY_SUBLCD_CONTRAST 19
+
+/*******************************************
+value type: kal_uint32
+value range: 0, 1
+value meanings: 0: Normal(default), 1:Large
+********************************************/
+#define KEY_DIAL_FONTS 20
+
+
+
+/*SYSTEM */
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3
+value meanings: 1:home only 2:automatic a 3:automatic b
+********************************************/
+#define KEY_SYSTEM 1
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2
+value meanings: 1:nam1 2:nam2
+********************************************/
+#define KEY_NAM 2
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:OFF 1:ON
+********************************************/
+#define KEY_NAM_AUTO 3
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5,6
+value meanings: 0:My Ringtones
+ 1:My Sounds
+ 2:Inbox
+ 3:Settings & Tools
+ 4:Alarm Clock
+ 5:Calculator
+ 6:Calendar
+********************************************/
+#define KEY_LEFT_SHORTCUT 4
+#define KEY_UP_SHORTCUT 5
+#define KEY_RIGHT_SHORTCUT 6
+#define KEY_DOWN_SHORTCUT 7
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:KAL_FALSE
+ 1:KAL_TRUE
+********************************************/
+#define KEY_STANDALONE 8
+
+
+
+/***********serving system********************/
+
+/*security */
+/*******************************************
+value type: SidbStringT
+value range: none
+value meanings: the lock code
+********************************************/
+#define KEY_LOCKCODE 1
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3
+value meanings: 1:unlock 2:lock 3:on power up
+********************************************/
+#define KEY_LOCKPHONE 2
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:off 1:on
+********************************************/
+#define KEY_RESTRICT 3
+
+/*******************************************
+value type: SidbStringT
+value range: none
+value meanings: the emergency #s
+********************************************/
+#define KEY_EMERGENCY_S1 4
+#define KEY_EMERGENCY_S2 5
+#define KEY_EMERGENCY_S3 6
+
+#define KEY_CALLRESTRICT_MO 7
+#define KEY_CALLRESTRICT_MT 8
+#define KEY_CALLRESTRICT_LOCAL 9
+#define KEY_CALLRESTRICT_LONG 10
+#define KEY_CALLRESTRICT_PB 11
+#define KEY_CALLRESTRICT_PWD 12
+/*SPC code*/
+/*ITEM_SYSTEM*/
+#define KEY_SPC_1 13
+#define KEY_SPC_2 14
+#define KEY_SPC_3 15
+
+#define KEY_MIN_LOCK_TABLE 16 /*25*12 kal_uint8*/
+
+#define KEY_SPC_TIMES 17
+#define KEY_CTIA 18
+/*MANAGEMENT */
+
+
+/*******************************************
+value type: char
+value range:
+value meanings: UIM card's IMSI number
+********************************************/
+/* Security Management */
+#define KEY_MANAGEMENT_UIM_ID 1
+/*******************************************
+value type: char
+value range: 4--8 lenghth
+value meanings: PIN code for the UIM card
+********************************************/
+#define KEY_MANAGEMENT_RANDOM_PIN 2
+/*******************************************
+value type: kal_uint16
+value range:
+value meanings: SID
+********************************************/
+#define KEY_MANAGEMENT_SID 3
+/*******************************************
+value type: kal_uint16
+value range:
+value meanings: NID
+********************************************/
+#define KEY_MANAGEMENT_NID 4
+
+/*add here for call stats */
+#define KEY_MANAGEMENT_CALL_STATS 5
+
+/*******************************************
+value type: kal_uint8
+value range:
+value meanings: DND indicator
+********************************************/
+#define KEY_MANAGEMENT_DND 6
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:disable 1:enable
+********************************************/
+#define KEY_MANAGEMENT_CNIR 7
+
+/*******************************************
+value type: SidbStringT
+value range:
+value meanings: CNIR number
+********************************************/
+#define KEY_MANAGEMENT_CNIR_NUMBER 8/*added by wangxia*/
+
+
+/*call setup */
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4
+value meanings: 0:off(default) 1: 3secs 2: 5secs 3: 7secs 4:10secs
+********************************************/
+#define KEY_AUTO_RETRY 1
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2
+value meanings: 0:send only 1:flip open 2:any key 3:Auto answer
+********************************************/
+#define KEY_ANSWER_CALL 2
+
+/*******************************************
+value type: kal_uint32
+value range: 0,3,10
+value meanings: 0:off 3: after 3 seconds 10:answering machine
+********************************************/
+#define KEY_AUTO_ANSWER 3
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:disable 1:enable
+********************************************/
+#define KEY_ONETOUCH_DIAL 4
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2
+value meanings: 1:standard 2:enhanced
+********************************************/
+#define KEY_VOICE_PRIVACY 5
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:off 1:on
+********************************************/
+#define KEY_AUTO_VOLUME 6
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:TTY OFF 1:TTY+FULL 2:TTY+TALK 3:TTY+HEAR
+********************************************/
+#define KEY_TTYMODE 7
+
+#define CSPSETTING_DATA 8
+/*******************************************
+value type: kal_uint32
+value range: 0 1
+value meanings: 0:OFF 1:ON
+********************************************/
+#define KEY_CALL_GUARD 9
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2
+value meanings: 0: repeat 1 times, 1: repeat 3 times, 2: repeat 5 times
+********************************************/
+#define KEY_CALL_REPEAT 9
+
+/*******************************************
+value type: kal_uint32
+value range:
+value meanings: Save the old mode before set tty.
+********************************************/
+#define KEY_TTYMODE_BACKUP 10
+
+
+/*1XDATA */
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4
+value meanings: 0:off 1:fax in once 2:fax in always
+ 3:data in once 4:data in always
+********************************************/
+#define KEY_DATA_FAX 1
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2
+value meanings: 0:closed 1:usb 2:RS-232C(Com Port)
+********************************************/
+#define KEY_PORT 2
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3
+value meanings: 1:19200 2:115200 3:230400
+********************************************/
+#define KEY_PORT_SPEED 3
+
+/*VOICR SERVICES */
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2
+value meanings: 0:disabled 1:flip open 2:key press
+********************************************/
+#define KEY_VOICEDIAL_PROMPT 1
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:speaker off 1:speaker off
+********************************************/
+#define KEY_ANSWERING_MACHINE 2
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:un-trained 1:train
+********************************************/
+#define KEY_TRAINWORDS_YES 3
+#define KEY_TRAINWORDS_NO 4
+
+/*others */
+/*******************************************
+value type: kal_uint32
+value range: 1,2
+value meanings: 1:location on 2:e911 only
+********************************************/
+#define KEY_LOCATION 1
+
+/**********PHONE INFO*************************/
+
+/*message */
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3
+value meanings: 1:auto save 2:prompt 3:do not save
+********************************************/
+#define KEY_MSG_AUTO_SAVE 1
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:OFF 1:ON
+********************************************/
+#define KEY_MSG_AUTO_DELETE 2
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:OFF 1:ON
+********************************************/
+#define KEY_MSG_CALLBACK 3
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:NONE 1:CUSTOMER
+********************************************/
+#define KEY_MSG_SIGNATURE 4
+
+#define KEY_MSG_SIGNATURE_TEXT 25
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:OFF 1:ON
+********************************************/
+#define KEY_MSG_DIRECT_VIEW 5
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3,4,5
+value meanings: 1:VIBRATE ONCE 2:vibrate and sound 3:customer ringer tone
+ 4:low beep once 5:low beeps
+********************************************/
+#define KEY_MSG_VOICEMAIL_ALERT 6
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5,6,7
+value meanings: 0:IMMEDIATE 1:3DAYS 2:2DAYS 3:1DAY
+ 4:12HOURS 5:2HOURS 6:1HOUR 7:30MINUTES
+********************************************/
+#define KEY_MSG_DEFERRED 7
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,3,4,5,6,7
+value meanings: 0:DEFAULT 1:30MINUTES 2:1HOUR 3:12HOURS
+ 4:1DAY 5:2HOURS 6:2DAYS 7:3DAYS
+********************************************/
+#define KEY_MSG_VALIDITY 8
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2
+value meanings: 1:NORMAL 2:URGENT.
+********************************************/
+#define KEY_MSG_PRIORITY 9
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:OFF 1:ON
+********************************************/
+#define KEY_MSG_2MIN_ALERT 10
+
+/*******************************************
+value type: kal_uint32
+value range: 1,2,3
+value meanings: 1:T9 WORD 2: ABC 3: 123
+********************************************/
+#define KEY_MSG_ENTRY_MODE 11
+
+/*******************************************
+value type: SidbStringT
+value range: none
+value meanings: the number of mail box of voice
+********************************************/
+#define KEY_MSG_VOICE_MAILBOX 12
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: 0:OFF 1:ON
+********************************************/
+#define KEY_MSG_DELIVERY_REPORTS 13
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: the mask of broadcast service category
+********************************************/
+#define KEY_MSG_BC_SRVCAT 14
+
+/*******************************************
+value type: SidbStringT
+value range: none
+value meanings: the address of voice mail
+********************************************/
+#define KEY_MSG_VOICE_ADDRESS 15
+
+/*******************************************
+value type: SidbStringT
+value range: none
+value meanings: Call back number
+********************************************/
+#define KEY_MSG_CALLBACK_NUMBER 16
+
+/*******************************************
+value type: int
+value range: 0,1
+value meanings: the ID of message
+********************************************/
+#define KEY_MSG_ID 17
+
+/*******************************************
+value type: int
+value range: 0-160
+value meanings: the Length of message
+********************************************/
+#define KEY_MSG_LENGTH 18
+
+/*******************************************
+value type: int
+value range: 0=7bit,1=latin
+value meanings: the encode of sending message
+********************************************/
+#define KEY_MSG_ENCODE 19
+
+/*******************************************
+value type: int
+value range: 0=default,1=traffic
+value meanings: the channel of sending message
+********************************************/
+#define KEY_MSG_TRAFFIC 20
+
+/*******************************************
+value type: SidbStringT
+value range: none
+value meanings: message storage device,0:UIM 1:FLASH,2,UIM&FLASH
+********************************************/
+#define KEY_MSG_STOAGE_DEVICE 21
+
+/*QUICK TEXT */
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,...
+value meanings: the count of dynamic quick text
+********************************************/
+#define KEY_MSG_QUICKTEXT_DYNAMIC_COUNT 0
+
+/*alarm clock; */
+
+#define ALARM_CLOCK_SET 1
+#define ALARM_CLOCK_ON 2
+
+#define ALARM_FIRST_CLOCK 3
+#define ALARM_SECOND_CLOCK 4
+#define ALARM_THIRD_CLOCK 5
+#define ALARM_FOURTH_CLOCK 6
+/*scheduler flags; */
+#define SCHEDULER_NUM_COUNT 1
+#define SCHEDULER_CLOCK_FIRST_POS 2
+
+/*recent call flags */
+#define RECENTCALL_DATA 1
+#define CALLTIMERS_DATA 2
+#define LOCKFLAG_DATA 3
+/*ITEM_CONTACT==22*/
+#define CONTACT_GROUP_NAME 1
+#define KEY_CONTACT_NUMBER_MATCH_LENGTH 2
+
+#define CONTACT_LIST 3
+/*ITEM_PHONEBOOK=55*/
+#define PHONEBOOK_GROUP 1
+#define PHONEBOOK_SPEEDDIAL 2
+#define EMERGENCY_CONTACT_NUMBER 3
+
+/*Call Process */
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,...
+value meanings: Current call time
+********************************************/
+#define KEY_CALLPROCESS_CURRENT_CALL_TIME 1
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,...
+value meanings: Total call time
+********************************************/
+#define KEY_CALLPROCESS_TOTAL_CALL_TIME 2
+
+/*******************************************
+value type: SidbStringT
+value range: will contain PHB_NUMBER_LEN digits(1-9, *, #, T, P)
+value meanings: Resend number
+********************************************/
+#define KEY_CALLPROCESS_RESEND_NUMBER 3
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1,2,...
+value meanings: remain input means;
+********************************************/
+#define EDIT_INPUT_NOW 1
+
+/*******************************************
+value type: kal_uint32
+value range: 0,1
+value meanings: KAL_FALSE,KAL_TRUE,whether save received vcard directly on phb
+********************************************/
+#define KEY_VCARD_RECEIVE 1
+
+#define KEY_KEYPADSERV_ESN_NO 0
+#define KEY_KEYPADSERV_SLOTCYCLE_INDEX 1
+#define KEY_KEYPADSERV_PHONE_MODEL 2
+/*NAM 1*/
+#define KEY_KEYPADSERV_NAM1_MIN_NUMBER 3
+#define KEY_KEYPADSERV_NAM1_HOME_SID 4
+#define KEY_KEYPADSERV_NAM1_NAME 5
+#define KEY_KEYPADSERV_NAM1_SERVICE_SEC_CODE 6
+#define KEY_KEYPADSERV_NAM1_COUNTRY_CODE 7
+#define KEY_KEYPADSERV_NAM1_NMSID 8
+#define KEY_KEYPADSERV_NAM1_KAL_TRUE_IMSI_MCC 9
+#define KEY_KEYPADSERV_NAM1_KAL_TRUE_IMSI_NMSID 10
+#define KEY_KEYPADSERV_NAM1_PRL_ENABLE 11
+#define KEY_KEYPADSERV_NAM1_DIR_NUMBER 12
+#define KEY_KEYPADSERV_NAM1_PRIMARY_CH_A 13
+#define KEY_KEYPADSERV_NAM1_SECONDARY_CH_A 14
+#define KEY_KEYPADSERV_NAM1_PRIMARY_CH_B 15
+#define KEY_KEYPADSERV_NAM1_SECONDARY_CH_B 16
+#define KEY_KEYPADSERV_NAM1_HOME_SYS_REQ 17
+#define KEY_KEYPADSERV_NAM1_FORN_SID_REQ 18
+#define KEY_KEYPADSERV_NAM1_FORN_NID_REQ 19
+#define KEY_KEYPADSERV_NAM1_ACC_OL_CLASS 20
+
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID1 21
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID2 22
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID3 23
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID4 24
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID5 25
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID6 26
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID7 27
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID8 28
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID9 29
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID10 30
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID11 31
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID12 32
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID13 33
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID14 34
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID15 35
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID16 36
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID17 37
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID18 38
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID19 39
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID20 40
+
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID1 51
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID2 52
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID3 53
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID4 54
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID5 55
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID6 56
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID7 57
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID8 58
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID9 59
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID10 60
+#define KEY_KEYPADSERV_NAM1_PHONE_NUMBER 61
+#define KEY_KEYPADSERV_NAM1_PREFERRED 62
+#define KEY_KEYPADSERV_NAM1_MINLOCK_ENABLE 63
+#define KEY_KEYPADSERV_NAM1_A_KEY 64
+#define KEY_KEYPADSERV_NAM1_HOME_SIDNID_NUM 65
+#define KEY_KEYPADSERV_NAM1_LOCKOUT_SIDNID_NUM 66
+#define KEY_KEYPADSERV_NAM1_CDMA_HOME_SID 67 /* for Peru: in Abbrev NAM : PSid[0] */
+#define KEY_KEYPADSERV_NAM1_CDMA_HOME_NID 68 /* for Peru: in Abbrev NAM : PNid[0] */
+
+/*NAM 2*/
+#define KEY_KEYPADSERV_NAM2_MIN_NUMBER 73
+#define KEY_KEYPADSERV_NAM2_HOME_SID 74
+#define KEY_KEYPADSERV_NAM2_NAME 75
+#define KEY_KEYPADSERV_NAM2_SERVICE_SEC_CODE 76
+#define KEY_KEYPADSERV_NAM2_COUNTRY_CODE 77
+#define KEY_KEYPADSERV_NAM2_NMSID 78
+#define KEY_KEYPADSERV_NAM2_KAL_TRUE_IMSI_MCC 79
+#define KEY_KEYPADSERV_NAM2_KAL_TRUE_IMSI_NMSID 80
+#define KEY_KEYPADSERV_NAM2_PRL_ENABLE 81
+#define KEY_KEYPADSERV_NAM2_DIR_NUMBER 82
+#define KEY_KEYPADSERV_NAM2_PRIMARY_CH_A 83
+#define KEY_KEYPADSERV_NAM2_SECONDARY_CH_A 84
+#define KEY_KEYPADSERV_NAM2_PRIMARY_CH_B 85
+#define KEY_KEYPADSERV_NAM2_SECONDARY_CH_B 86
+#define KEY_KEYPADSERV_NAM2_HOME_SYS_REQ 87
+#define KEY_KEYPADSERV_NAM2_FORN_SID_REQ 88
+#define KEY_KEYPADSERV_NAM2_FORN_NID_REQ 89
+#define KEY_KEYPADSERV_NAM2_ACC_OL_CLASS 90
+
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID1 91
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID2 92
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID3 93
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID4 94
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID5 95
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID6 96
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID7 97
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID8 98
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID9 99
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID10 100
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID11 101
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID12 102
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID13 103
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID14 104
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID15 105
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID16 106
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID17 107
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID18 108
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID19 109
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID20 110
+
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID1 111
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID2 112
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID3 113
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID4 114
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID5 115
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID6 116
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID7 117
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID8 118
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID9 119
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID10 120
+#define KEY_KEYPADSERV_NAM2_PHONE_NUMBER 121
+#define KEY_KEYPADSERV_NAM2_PREFERRED 122
+#define KEY_KEYPADSERV_NAM2_MINLOCK_ENABLE 123
+#define KEY_KEYPADSERV_NAM2_A_KEY 124
+#define KEY_KEYPADSERV_SPC1_ERR_MAX_TIMES 125
+#define KEY_KEYPADSERV_SPC2_ERR_MAX_TIMES 126
+#define KEY_KEYPADSERV_SPC1_ERR_TIMES 127
+#define KEY_KEYPADSERV_SPC2_ERR_TIMES 128
+#define KEY_KEYPADSERV_NAM2_HOME_SIDNID_NUM 129
+#define KEY_KEYPADSERV_NAM2_LOCKOUT_SIDNID_NUM 130
+#define KEY_KEYPADSERV_SPC3_ERR_MAX_TIMES 131 /*zhengyi*/
+#define KEY_KEYPADSERV_SPC3_ERR_TIMES 132 /*zhengyi*/
+
+#define KEY_KEYPADSERV_NAM2_CDMA_HOME_SID 133 /* for Peru: in Abbrev NAM : PSid[0] */
+#define KEY_KEYPADSERV_NAM2_CDMA_HOME_NID 134 /* for Peru: in Abbrev NAM : PNid[0] */
+
+#define KEY_KEYPADSERV_SERVICE_OPTION 140
+#define KEY_KEYPADSERV_HOME_ORIG_SERVICE_OPTION 141
+#define KEY_KEYPADSERV_ROAM_ORIG_SERVICE_OPTION 142
+#define KEY_KEYPADSERV_HOME_PAGE_SERVICE_OPTION 143
+/*end ITEM_KEYPADSERV*/
+#ifdef SYS_OPTION_VOICE_MEMO
+/*VOICE MEMO */
+/*how many files have been stored */
+#define VOICE_MEMO_ONLINE_FILES 1
+#define VOICE_MEMO_OFFLINE_FILES 2
+#define VOICE_MEMO_ANSWER_MACHINE 3
+#endif
+/*******************************************
+value type: SidbStringT
+value range:
+value meanings: call waiting and call forwording codes.
+********************************************/
+#define KEY_CALL_WAITING_ENABLE 0
+#define KEY_CALL_WAITING_DISABLE 1
+
+#define KEY_CALL_FORWARD_UNCONDITIONAL_ENABLE 2
+#define KEY_CALL_FORWARD_UNCONDITIONAL_DISABLE 3
+
+#define KEY_CALL_FORWARD_NOANWER_ENABLE 4
+#define KEY_CALL_FORWARD_NOANWER_DISABLE 5
+
+#define KEY_CALL_FORWARD_BUSY_ENABLE 6
+#define KEY_CALL_FORWARD_BUSY_DISABLE 7
+
+#define KEY_CALL_FORWARD_END 8
+
+#define KEY_CALL_FORWARD_UNREACHABLE_ENABLE 9
+#define KEY_CALL_FORWARD_UNREACHABLE_DISABLE 10
+#define KEY_TEST_CALL_PHONE_NUMBER 11
+
+
+/*BREW*/
+#define KEY_BREW_CFGI_DNS_IP1 0
+#define KEY_BREW_CFGI_DNS_IP2 1
+#define KEY_BREW_CFGI_DOWNLOAD 2
+#define KEY_BREW_CFGI_SUBSCRIBERID 3
+#define KEY_BREW_CFGI_MOBILEINFO 4
+#define KEY_BREW_CFGI_AUTOSTART 5
+#define KEY_BREW_CFGI_BUSY_CURSOR_OFFSET 6
+#define KEY_BREW_CFGI_DOWNLOAD_BUFFER 7
+#define KEY_BREW_CFGI_HTTP_BUFFER 8
+#define KEY_BREW_CFGI_NET_CONNTIMEOUT 9
+#define KEY_BREW_CFGI_SUBSCRIBERID_LEN 10
+#define KEY_BREW_CFGI_MAX_DISPATCH_TIME 11
+#define KEY_BREW_CFGI_MIN_IDLE_TIME 12
+#define KEY_BREW_CFGI_SLEEP_TIMER_RESOLUTION 13
+#define KEY_BREW_CFGI_SYSMEM_SIZE 14
+#define KEY_BREW_CFGI_DOWNLOAD_FS_INFO 15
+#define KEY_BREW_CFGI_SCREEN_SAVER 16
+#define KEY_BREW_CFGI_DISALLOW_DORMANCY 17
+#define KEY_BREW_CFGI_DORMANCY_NO_SOCKETS 18
+#define KEY_BREW_CFGI_CLOSE_KEYS 19
+#define KEY_BREW_CFGI_FILE_CACHE_INFO 20
+#define KEY_BREW_CFGI_GPSONE_TRANSPORT 21
+#define KEY_BREW_CFGI_GPSONE_SVRIP 22
+#define KEY_BREW_CFGI_GPSONE_SVRPORT 23
+#define KEY_BREW_CFGI_GPSONE_LOCK 24
+#define KEY_BREW_CFGI_MODULE_FSLIMIT 25
+#define KEY_BREW_CFGI_DATA_NETWORK 26
+#define KEY_BREW_CFGI_CARDID_LEN 27
+#define KEY_BREW_CFGI_CARDID 28
+#define KEY_BREW_CFGI_DEBUG_KEY 29
+#define KEY_BREW_CFGI_OFFLINE_PPP_TIMEOUT 30
+#define KEY_BREW_CFGI_APPX5_ON 31
+#define KEY_BREW_CFGI_APPX5_MPC_ADDR 32
+#define KEY_BREW_CFGI_APPX5_MPC_PORT 33
+#define KEY_BREW_CFGI_LANGUAGE_ID 34
+#define KEY_BREW_CFGI_PPP_USER 35
+#define KEY_BREW_CFGI_PPP_PASkal_int16 36
+#define KEY_BREW_CFGI_PPP_DIAL_NUMBER 37
+#define KEY_BREW_CFGI_LCD_WIDTH 38
+#define KEY_BREW_CFGI_LCD_HEIGHT 39
+#define KEY_BREW_CFGI_MENU_TEXT_SCROLL_TIME 40
+
+/*for clipboard */
+/******************************************
+value type: char*
+value range: char[1024]
+value meanings: content of the clipboard
+******************************************/
+#define KEY_CLIPBOARD_CONTENT 1
+
+/*****************************************
+value type: kal_uint32
+value range: NULL
+value meaning: parameter of clipboard string
+*****************************************/
+#define KEY_CLIPBOARD_PARAM 2
+
+/*for UIM module*/
+#define KEY_UIM_HOTPLUG_DETECTION_EN 1
+
+/*****************************************************************************
+* $Log: sidbdefs.h $
+* Revision 1.20 2006/07/06 09:11:36 yli
+* modified value
+* Revision 1.19 2006/06/17 10:32:52 binye
+* Merge0616
+* Revision 1.4 2006/06/14 17:47:37 yli
+* add a item for ctia logo.
+* Revision 1.3 2006/06/13 18:50:13 yli
+* add a item for spc retry times.
+* Revision 1.2 2006/06/06 19:11:19 hongzhang
+* merged from hangzhou
+* Revision 1.18 2006/06/06 13:16:04 wjzhang
+* modified a spelling mistake.
+* Revision 1.1 2006/06/04 13:13:30 hongzhang
+* Initial revision
+* Revision 1.17 2006/05/26 13:25:44 wjzhang
+* changed the note of KEY_ANSWER_CALL
+* Revision 1.16 2006/05/19 16:12:02 yli
+* Support##20022002TestMode
+* Revision 1.15 2006/05/12 13:54:33 dli
+* Add TTY mode backup.
+* Revision 1.14 2006/05/10 16:19:17 zfu
+* add emergency contact
+* Revision 1.13 2006/04/29 21:46:32 zfu
+* Fixed CR#174,#175,#180
+* Revision 1.12 2006/04/22 13:21:38 dli
+* Modify some calls setting.
+* Revision 1.11 2006/04/14 17:19:06 yli
+* add some keyid
+* Revision 1.10 2006/04/13 13:47:51 dli
+* Modify the value of KEY_CALL_REPEAT.
+* Revision 1.9 2006/04/04 19:40:36 yli
+* add some keyid
+* Revision 1.8 2006/03/29 17:01:53 dli
+* Add phone setting.
+* Revision 1.7 2006/03/27 19:56:42 dli
+* Add calls setting.
+* Revision 1.6 2006/03/24 17:41:22 dli
+* Add Themes, nuber on startup, contrast,in-call sounds.
+* Revision 1.5 2006/03/23 20:02:49 dli
+* Add Wallpaper and Themes.
+* Revision 1.4 2006/03/23 13:44:22 zfu
+* add ITEM_PHONEBOOK ,
+* PHONEBOOK_GROUP ,
+* PHONEBOOK_SPEEDDIAL
+* Revision 1.3 2006/03/18 04:58:22 dli
+* Add ERI Banner and personal banner.
+* Revision 1.2 2006/03/12 17:58:01 dli
+* Add entry lock.
+* Revision 1.1 2006/03/02 11:29:29 hongzhang
+* Initial revision
+*****************************************************************************/
+
+/*****************************************************************************
+* End of File
+*****************************************************************************/
+#endif
+
+/**Log information: \main\CBP7FeaturePhone\CBP7FeaturePhone_hxwang_href14861\1 2010-09-28 09:31:24 GMT hxwang
+** HREF#14861**/
+/**Log information: \main\CBP7FeaturePhone\4 2010-09-28 09:42:25 GMT zlin
+** Merge href 14861.**/
+
diff --git a/mcu/interface/protocol/l4_c2k/sim_cuim_utility.h b/mcu/interface/protocol/l4_c2k/sim_cuim_utility.h
new file mode 100644
index 0000000..8ba154d
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/sim_cuim_utility.h
@@ -0,0 +1,211 @@
+/*****************************************************************************
+* 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:
+ * ---------
+ * sim_cuim_utility.h
+ *
+ * Project:
+ * --------
+ * MT6208
+ *
+ * Description:
+ * ------------
+ * This file is intended for all sim utilities for cuim.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *============================================================================
+ ****************************************************************************/
+/* KAL - RTOS Abstraction Layer */
+
+#ifndef SIM_CUIM_UTILITY_H
+#define SIM_CUIM_UTILITY_H
+
+
+#ifdef __CDMA2000_RAT__
+
+#include "kal_general_types.h"
+#include "kal_public_defs.h"
+#include "sim_ps_struct_public.h"
+#include "sim_exported_enum.h"
+
+
+#ifndef MTK_PLT_ON_PC_UT
+/*****************************************************************************
+ * FUNCTION
+ * sim_cuim_apdu_access
+ * DESCRIPTION
+ * This function is called by MOD_UIM to replace message communication.
+ * PARAMETERS
+ *
+ * RETURNS
+ * void
+ * GLOBALS AFFECTED
+ * void
+ *****************************************************************************/
+void sim_cuim_apdu_access(kal_uint8 sim_index,
+ uim_sim_apdu_access_req_struct *apdu_req,
+ uim_sim_apdu_access_cnf_struct *apdu_cnf);
+
+/*****************************************************************************
+ * FUNCTION
+ * sim_cuim_extended_apdu_access
+ * DESCRIPTION
+ * This function is called by MOD_UIM to replace message communication.
+ * PARAMETERS
+ *
+ * RETURNS
+ * void
+ * GLOBALS AFFECTED
+ * void
+ *****************************************************************************/
+void sim_cuim_extended_apdu_access(kal_uint8 sim_index,
+ uim_sim_extended_apdu_access_req_struct *extended_apdu_req_p,
+ uim_sim_extended_apdu_access_cnf_struct *extended_apdu_cnf_p);
+#endif
+
+#ifdef __RILD_SIM_CACHE__
+/*****************************************************************************
+
+FUNCTION NAME: cuim_read_spn_and_imsi_for_sim
+
+DESCRIPTION: sim call this function to get IMSI_M and SPN from UIM for AP
+
+PARAMETERS: input kal_uint8 sim_index
+ output kal_bool *is_spn_valid_p,
+ kal_uint8 *spn_data,
+ kal_bool *is_imsi_valid_p,
+ kal_uint8 *imsi_data
+
+RETURNS: CMD result
+
+*****************************************************************************/
+void cuim_read_spn_and_imsi_for_sim(kal_uint8 sim_index,
+ kal_bool *is_spn_valid_p,
+ kal_uint8 *spn_data,
+ kal_bool *is_imsi_valid_p,
+ kal_uint8 *imsi_data);
+#endif
+
+/*****************************************************************************
+
+FUNCTION NAME: cuim_read_imsi_for_sim
+
+DESCRIPTION: sim call this function to get IMSI_M through CSIM channel
+
+PARAMETERS: input uint8 sim_index
+ output uint8 *imsi_data
+
+RETURNS: CMD result
+
+*****************************************************************************/
+sim_cmd_result_enum cuim_read_imsi_for_sim(kal_uint8 sim_index, kal_uint8 *imsi_data);
+
+/*****************************************************************************
+ * FUNCTION
+ * sim_cuim_skip_uim_recovery
+ * DESCRIPTION
+ * This function returns whether UIM recovery should be skipped
+ * PARAMETERS
+ * kal_uint8 sim_index
+ * RETURNS
+ * kal_bool
+ * GLOBALS AFFECTED
+ * void
+ *****************************************************************************/
+kal_bool sim_cuim_skip_uim_recovery(kal_uint8 sim_index);
+
+/*****************************************************************************
+ * FUNCTION
+ * usim_select_for_cuim
+ * DESCRIPTION
+ * This function is called by MOD_UIM when it needs to select file for uicc card
+ * PARAMETERS
+ * kal_uint8 sim_index
+ * RETURNS
+ * void
+ * GLOBALS AFFECTED
+ * void
+ *****************************************************************************/
+void sim_cuim_select(kal_uint8 sim_index, uim_sim_select_req_struct *select_req, uim_sim_select_cnf_struct *select_cnf);
+
+/*****************************************************************************
+ * FUNCTION
+ * sim_uim_send_app_ready_ind
+ * DESCRIPTION
+ * This function is called by MOD_UIM when it is enter sim ready state
+ * It will directly send the SIM_APP_READY_IND to the SMU and SIMMNGR
+ * PARAMETERS
+ * kal_uint8 sim_index
+ * kal_uint8 channel_id
+ * kal_uint8 app_type
+ * kal_uint8 *mcc (mcc[4])
+ * kal_uint8 *mnc (mnc[4])
+ * RETURNS
+ * void
+ * GLOBALS AFFECTED
+ * void
+ *****************************************************************************/
+void sim_uim_send_app_ready_ind(kal_uint8 sim_index, kal_uint8 channel_id, kal_uint8 app_type, uim_sim_app_ready_data_struct* uim_ready_data);
+
+
+/* Used by DSBP_RECONFIG's users. Use 1~255 in order for each SIM task. */
+extern void sim_incr_dsbp_trans_id(protocol_id_enum ps_id);
+extern kal_uint8 sim_get_dsbp_trans_id(protocol_id_enum ps_id);
+
+
+/*****************************************************************************
+ * FUNCTION
+ * uim_module_clean
+ * DESCRIPTION
+ * This function cleans UIM module's GV when minidump happens.
+ * PARAMETERS
+ * void
+ * RETURNS
+ * void
+ * GLOBALS AFFECTED
+ * void
+ *****************************************************************************/
+void uim_module_clean(void);
+
+#endif /* __CDMA2000_RAT__ */
+
+#endif /* SIM_CUIM_UTILITY_H */
+
diff --git a/mcu/interface/protocol/l4_c2k/sim_ps_struct_public.h b/mcu/interface/protocol/l4_c2k/sim_ps_struct_public.h
new file mode 100644
index 0000000..82f8a82
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/sim_ps_struct_public.h
@@ -0,0 +1,620 @@
+/*****************************************************************************
+* 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:
+ * ---------
+ * sim_ps_struct_public.h
+ *
+ * Project:
+ * --------
+ * MAUI
+ *
+ * Description:
+ * ------------
+ * Structure provided by SIM task and inside-PS task uses only
+ *
+ * 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!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef SIM_PS_STRUCT_PUBLIC_H
+#define SIM_PS_STRUCT_PUBLIC_H
+
+#include "sim_public_enum_public.h"
+
+typedef struct {
+ kal_uint8 chv1_count;
+ kal_uint8 chv2_count;
+ kal_uint8 ubchv1_count;
+ kal_uint8 ubchv2_count;
+ kal_uint8 is_chv1_enabled;
+ kal_uint8 is_chv1_verified;
+ kal_uint8 is_chv2_enabled;
+ kal_uint8 is_chv2_verified;
+ kal_uint8 chv_key_ref[2];
+} uim_sim_chv_info_struct;
+
+/* MSG_ID_UIM_SIM_ERROR_IND */
+typedef struct {
+ LOCAL_PARA_HDR
+ sim_error_cause_enum cause;
+ kal_uint8 utk_enabled; /* ALPS02323554: KAL_TRUE when refresh command is issued to MD3 */
+ kal_uint8 refresh_qualifier;
+ kal_uint8 sim_slot_id;
+ kal_bool is_dual_mode_sim;
+ kal_bool is_dss_no_reset;
+ sim_additional_error_cause_enum additional_error_cause;
+} uim_sim_error_ind_struct;
+
+/* MSG_ID_UIM_SIM_APDU_ACCESS_REQ */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint16 src_id;
+ kal_uint8 channel_id;
+ kal_uint16 req_len;
+ kal_uint8 req[APDU_REQ_MAX_LEN];
+ kal_uint8 cmd_type; //0: CGLA, 1: CSIM
+} uim_sim_apdu_access_req_struct;
+
+/* MSG_ID_UIM_SIM_APDU_ACCESS_CNF */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint16 src_id;
+ kal_uint16 result;
+ kal_uint16 rsp_len;
+ kal_uint8 rsp[APDU_RSP_MAX_LEN];
+ kal_uint8 cmd_type; //0: CGLA, 1: CSIM
+} uim_sim_apdu_access_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 channel_id;
+ kal_uint16 req_len;
+ kal_uint8 *req_p;
+ /* For error handling, MOD_SIM appends Le to C-APDU, Allocate 1 more byte for it*/
+} uim_sim_extended_apdu_access_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint16 result;
+ kal_uint16 rsp_len;
+ kal_uint8 rsp[APDU_EXTENDED_RSP_MAX_LEN];
+} uim_sim_extended_apdu_access_cnf_struct;
+
+/* MSG_ID_UIM_SIM_AUTHENTICATE_REQ */
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 rand[16];
+ kal_bool is_auth_present;
+ kal_uint8 auth[16];
+ kal_uint16 src_id;
+ uicc_auth_mode_enum mode;
+ kal_uint8 channel_id;
+ kal_uint8 command_len;
+ kal_uint8 command_data[256];
+} uim_sim_authenticate_req_struct;
+
+/* MSG_ID_UIM_SIM_AUTHENTICATE_CNF*/
+typedef struct {
+ LOCAL_PARA_HDR
+ sim_cmd_result_enum result;
+ kal_uint16 status_word;
+ kal_uint8 kc[8];
+ kal_uint8 sres[4];
+ kal_uint8 ck[16];
+ kal_uint8 ik[16];
+ kal_uint8 res[16];
+ kal_uint8 res_len;
+ kal_uint8 auts[16];
+ kal_uint8 auts_len;
+ kal_uint8 auth_res[256];
+ kal_uint16 auth_res_len;
+ kal_uint16 src_id;
+} uim_sim_authenticate_cnf_struct;
+
+/* MSG_ID_UIM_SIM_STATUS_IND */
+typedef struct{
+ LOCAL_PARA_HDR
+ kal_uint16 card_type;
+ usim_logic_channel_enum USIMchan;
+ usim_logic_channel_enum ISIMchan;
+ kal_uint8 atr_length;
+ kal_uint8 atr[ATR_MAX_LEN];
+ kal_uint8 remote_sim_protocol_task;
+ kal_uint8 sim_slot_id;
+ kal_bool is_imsi_valid;
+ kal_uint8 imsi[9];
+ kal_bool sim_start_req;
+ kal_bool is_ad_valid;
+ kal_uint8 ad[4];
+ kal_bool is_iccid_valid;
+ kal_uint8 iccid[10];
+ kal_uint8 iccid_fcp_len;
+ kal_uint8 iccid_fcp[50];
+ kal_bool is_pl_valid;
+ kal_uint8 pl_len;
+ kal_uint8 pl[10];
+ kal_uint8 pl_fcp_len;
+ kal_uint8 pl_fcp[50];
+ kal_uint8 dir_record_size; // size of 1 record
+ kal_uint8 dir_record_num;
+ kal_uint8 dir_content[255];
+ uim_sim_chv_info_struct chv_info;
+ kal_uint8 imsi_m_fcp_len;
+ kal_uint8 imsi_m_fcp[50];
+ kal_bool is_usim_valid_pin_do;
+ // To info the task UIM if the STARTUP_READ_FINISH_IND and APP INIT have to be sent in the task UIM or not
+ // KAL_TRUE: UIM DOESN'T NEED to send STARTUP_READ_FINISH_IND
+ // KAL_FALE: Default value. the task UIM keep the original logic
+ kal_bool is_start_finish_ind_noneeded;
+}uim_sim_status_ind_struct;
+
+/* MSG_ID_UIM_SAT_PROACTIVE_CMD_IND */
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint16 cmd_id;
+ kal_uint16 proactive_cmd_len;
+ kal_uint8 proactive_cmd[260];
+} uim_sat_proactive_cmd_ind_struct;
+
+/* MSG_ID_UIM_SAT_TERMINAL_RSP_REQ */
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint16 src_id;
+ kal_uint16 cmd_id;
+ kal_uint16 length;
+ kal_uint8 terminal_rsp[261];
+} uim_sat_terminal_rsp_req_struct;
+
+/* MSG_ID_UIM_SAT_TERMINAL_RSP_CNF */
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint16 src_id;
+ kal_uint16 status_word;
+} uim_sat_terminal_rsp_cnf_struct;
+
+/* MSG_ID_UIM_SAT_ENVELOPE_REQ */
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint16 src_id;
+ kal_uint16 length;
+ kal_uint8 envelope[261];
+} uim_sat_envelope_req_struct;
+
+/* MSG_ID_UIM_SAT_ENVELOPE_CNF */
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint16 src_id;
+ kal_uint16 status_word;
+ sim_cmd_result_enum result;
+ kal_uint16 length;
+ kal_uint8 envelope_rsp[256];
+} uim_sat_envelope_cnf_struct;
+
+/* MSG_ID_UIM_SAT_FILE_CHANGE_RES */
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint16 src_id;
+ kal_uint16 cmd_id;
+ kal_uint8 sim_slot_id;
+ kal_uint8 is_successful;
+} uim_sat_file_change_res_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint16 file_idx;
+ kal_uint16 para;
+ kal_uint16 length;
+ kal_uint8 access_id;
+ kal_uint8 path[6];
+ kal_uint16 src_id;
+ kal_uint8 channel_id;
+ kal_uint8 sfi;
+} uim_sim_read_req_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint16 file_idx;
+ kal_uint16 para;
+ kal_uint16 length;
+ kal_uint8 data[258]; // 256 + 2 for driver usage in T=1
+ kal_uint16 result;
+ kal_uint16 status_word;
+ kal_uint8 access_id;
+ kal_uint16 src_id;
+} uim_sim_read_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 transport_protocol_type;
+ kal_uint16 src_id;
+} bt_uim_sim_reset_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint16 result;
+ kal_uint8 current_transport_protocol_type;
+ kal_uint16 atr_len;
+ kal_uint8 atr[40];
+ kal_uint16 src_id;
+ kal_uint8 supported_transport_protocol_type_capability;
+} bt_uim_sim_reset_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint16 src_id;
+} bt_uim_sim_power_off_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint16 result;
+ kal_uint16 src_id;
+} bt_uim_sim_power_off_cnf_struct;
+
+typedef bt_uim_sim_reset_req_struct bt_uim_sim_power_on_req_struct;
+typedef bt_uim_sim_reset_cnf_struct bt_uim_sim_power_on_cnf_struct;
+
+
+/* <modem_status>:
+ 0: only MD1 active
+ 1: MD1's RF is closed, but MD1's SIM task is still working only for MD3 SIM remote access and MD3 active
+ 2: both MD1 and MD3 active, but there is at least USIM application existed on the MD1's card
+ <remote_sim_protocol_task>:
+ 0: MD3 access local card
+ 1: MD3 access MD1's SIM task1
+ 2: MD3 access MD1's SIM task2 */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 modem_status;
+ kal_uint8 remote_sim_protocol_task;
+}uim_sim_mdstatus_update_ind_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 csim_channel_id;
+ kal_uint8 num_of_file_index;
+ c2k_file_index file_index[MAX_C2K_EF_IDX];
+}uim_sim_c2k_batch_file_read_req_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 csim_channel_id;
+ kal_uint8 num_of_file_index;
+ c2k_file_index file_index[MAX_C2K_EF_IDX];
+ kal_uint16 status_word[MAX_C2K_EF_IDX];
+ kal_uint8 ef_ad_data[3];
+ kal_uint8 ef_uim_id_data[8];
+ kal_uint8 ef_count_data[2];
+ kal_uint8 ef_imsi_m_data[10];
+ kal_uint8 ef_imsi_t_data[10];
+ kal_uint8 len_of_ef_cdma_home;
+ kal_uint8 ef_cdma_home[20*5];
+ kal_uint8 ef_accloc_data;
+ kal_uint8 ef_term_data;
+ kal_uint8 ef_ssci_data;
+ kal_uint8 ef_otapaspc_data;
+ kal_uint8 ef_namlock_data;
+ kal_uint8 ef_mdn_data[11];
+ kal_uint16 len_of_ef_cst;
+ kal_uint8 ef_cst_data[255];
+ kal_uint8 ef_usgind_data;
+ kal_uint8 ef_sfuimid_data[7];
+ kal_uint8 ef_spcs_data;
+ kal_uint8 ef_est_data;
+}uim_sim_c2k_batch_file_read_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 slot_id;
+ kal_uint8 iccid[10];
+ kal_uint8 is_pin1_valid;
+ kal_uint8 pin1[8];
+ kal_uint8 chv1_count;
+ kal_uint8 chv2_count;
+ kal_uint8 ubchv1_count;
+ kal_uint8 ubchv2_count;
+ kal_uint8 is_chv1_enabled;
+ kal_uint8 is_chv1_verified;
+ kal_uint8 is_chv2_enabled;
+ kal_uint8 is_chv2_verified;
+ kal_uint8 chv_key_ref[2];
+}uim_sim_pin_sync_ind_struct;
+
+typedef uim_sim_pin_sync_ind_struct sim_uim_pin_sync_ind_struct;
+
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 app_type;
+ kal_bool iccid_valid;
+ kal_uint8 iccid[10];
+} uim_sim_startup_read_finish_ind_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 app_type;
+ kal_uint8 channel_id;
+ kal_uint8 mcc[4];
+ kal_uint8 mnc[4];
+} uim_sim_app_ready_ind_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 cause;
+ kal_uint8 app_type;
+ kal_uint8 channel;
+} uim_sim_app_error_ind_struct;
+
+/*MSG_ID_UIM_SIM_CARD_TYPE_CHANGE_IND*/
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 app_type;
+}uim_sim_card_type_change_ind_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ sim_file_index_enum file_idx;
+ kal_uint8 path[6];
+ usim_logic_channel_enum channel; /* if channel is 0xFF, it means CT 3G card */
+}uim_sim_select_req_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ sim_cmd_result_enum result;
+ kal_uint16 status_word;
+ kal_uint16 rsp_len;
+ kal_uint8 rsp[APDU_RSP_MAX_LEN];
+}uim_sim_select_cnf_struct;
+
+/* MSG_ID_UIM_SIM_CALL_STATUS_IND */
+typedef struct{
+ LOCAL_PARA_HDR
+ sim_call_status_enum call_status;
+}uim_sim_call_status_ind_struct;
+
+typedef struct {
+ kal_uint8 *mcc;
+ kal_uint8 *mnc;
+ kal_bool is_spn_valid; //3GPP2 SPN,
+ kal_uint8 spn[35];
+ kal_uint8 imsi[16];
+ kal_uint8 gid1_length;
+ kal_uint8 gid1[20];
+ kal_uint8 gid2_length;
+ kal_uint8 gid2[20];
+} uim_sim_app_ready_data_struct;
+
+/*MSG_ID_UIM_SIM_DSBP_RECONFIGURE_IND*/
+typedef struct {
+ LOCAL_PARA_HDR
+}uim_sim_dsbp_reconfigure_ind_struct;
+
+#endif
+
diff --git a/mcu/interface/protocol/l4_c2k/sim_public_enum_public.h b/mcu/interface/protocol/l4_c2k/sim_public_enum_public.h
new file mode 100644
index 0000000..d2a5285
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/sim_public_enum_public.h
@@ -0,0 +1,798 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 _SIM_PUBLIC_ENUM_PUBLIC_H_
+#define _SIM_PUBLIC_ENUM_PUBLIC_H_
+
+/** 256 bytes for data + 5 bytes header information: CLA,INS,P1,P2,P3 */
+#define APDU_REQ_MAX_LEN (261)
+
+/** 256 bytes for data + 2 bytes status word SW1 and SW2 */
+#define APDU_RSP_MAX_LEN (258)
+
+#define APDU_EXTENDED_MAX_LEN (2500)
+
+/** 2500 bytes for data + 9 bytes header information: CLA,INS,P1,P2,Lc (3 bytes),Le (2 bytes) */
+#define APDU_EXTENDED_REQ_MAX_LEN (APDU_EXTENDED_MAX_LEN + 9)
+
+/** 2500 bytes for data + 2 bytes status word SW1 and SW2 */
+#define APDU_EXTENDED_RSP_MAX_LEN (APDU_EXTENDED_MAX_LEN + 2)
+
+#define ATR_MAX_LEN 40
+
+/** sim error cause */
+typedef enum
+{
+ SIM_CARD_REMOVED, /**< card removed */
+ SIM_ACCESS_ERROR, /**< access error */
+ SIM_REFRESH, /**< sim refresh */
+ SIM_REFRESH_POWER_OFF, /**< sim refresh power off */
+ SIM_PUK1, /**< sim puk1 */
+ SIM_ACCESS_PROFILE_ON, /**< access profile on */
+ SIM_ACCESS_PROFILE_OFF, /**< access profile off */
+ DUALSIM_DISCONNECTED, /**< dual sim disconnected */
+ DUALSIM_CONNECTED, /**< dual sim connected */
+ SIM_VSIM_ON, /**< vsim on */
+ SIM_VSIM_OFF, /**< vsim off */
+ SIM_PLUG_OUT, /**< sim plug out */
+ SIM_PLUG_IN, /**< sim plug in */
+ SIM_RECOVERY_START, /**< sim recovery start */
+ SIM_RECOVERY_END, /**< sim recovery end */
+ SIM_IMEI_LOCK_FAIL, /**< sim IMEI lock failure */
+ SIM_OP09_LOCK_FAIL,
+ SIM_CARD_TECHNICAL_PROBLEM,
+ SIM_POWEROFF_BY_L4,
+ SIM_OP20_IMEI_LOCK,
+ SIM_PLUG_IN_REPLACED, /**< sim replaced after sim plug in */
+ SIM_OP01_LOCK,
+ SIM_OP01_UNLOCK,
+ SIM_FAST_RECOVERY_START,
+ SIM_FAST_RECOVERY_SUCCESS,
+ SIM_TRAY_PLUG_OUT,
+ SIM_PLUG_IN_NO_INIT, /**< sim plug in but no further actions */
+ SIM_PRESENCE_DETECTION_FAIL,
+ SIM_STATE_DISABLE,
+ SIM_STATE_ENABLE,
+ SIM_CARD_TYPE_MATCH_STATUS
+}sim_error_cause_enum;
+
+/** sim event */
+typedef enum
+{
+ SIM_EVENT_NULL, /**< null */
+ SIM_EVENT_APP_INIT, /**< sim application init done or no need */
+ SIM_EVENT_APP_LIST, /**< sim application list */
+ SIM_EVENT_DATA_ICON_READY, /**< spn/gid1/pnn indicator for data icon */
+ SIM_EVENT_FCP_CACHE_READY, /**< FCP Cache */
+ SIM_EVENT_DATA_CACHE_READY /**< Data Cache */
+} sim_event_enum;
+
+/** sim additional error cause */
+typedef enum
+{
+ SIM_ERROR_UNKNOWN,
+ SIM_ERROR_NO_ATR_AFTER_POWERON,
+ SIM_ERROR_NO_ATR_AFTER_RECOVERY,
+ SIM_ERROR_ATR_CORRUPT,
+ SIM_ERROR_PPS_TIMEOUT,
+ SIM_ERROR_PPS_PARITY,
+ SIM_ERROR_VOLTAGE_MISMATCH,
+ SIM_ERROR_CMD_TIMEOUT,
+ SIM_ERROR_CMD_TIMEOUT_NULL,
+ /* SIM_ERROR_CMD_TOUT_* should not be used for display purpose */
+ SIM_ERROR_CMD_TOUT_AFTER_SIM_INIT,
+ SIM_ERROR_CMD_TOUT_NULL_AFTER_SIM_INIT,
+ SIM_ERROR_MANDATORY_FILE_MISSING,
+ /* The SIM_ERROR_CMD_SW000_* should not be used for display purpose */
+ SIM_ERROR_CMD_SW000_CAUSE_UNKNOWN,
+ SIM_ERROR_CMD_SW000_CAUSE_MAX = SIM_ERROR_CMD_SW000_CAUSE_UNKNOWN + 20,
+ /* For indication the type of REFRESH */
+ SIM_ERROR_REFRESH_TYPES,
+ SIM_ERROR_REFRESH_TYPE_NAA_INIT_AND_FULL_FCN = SIM_ERROR_REFRESH_TYPES,
+ SIM_ERROR_REFRESH_TYPE_FCN,
+ SIM_ERROR_REFRESH_TYPE_NAA_INIT_AND_FCN,
+ SIM_ERROR_REFRESH_TYPE_NAA_INIT,
+ SIM_ERROR_REFRESH_TYPE_SIM_RESET,
+ SIM_ERROR_REFRESH_TYPE_NAA_APP_RESET,
+ SIM_ERROR_REFRESH_TYPE_NAA_SESSION_RESET,
+ SIM_ERROR_REFRESH_TYPE_STEERING_OF_ROAMING,
+ SIM_ERROR_REFRESH_TYPE_STEERING_OF_ROAMING_FOR_IWLAN,
+ SIM_ERROR_REFRESH_TYPE_EUICC_PROFILE_STATE_CHANGE,
+ SIM_ERROR_REFRESH_TYPE_APP_UPDATE,
+ SIM_ERROR_REFRESH_TYPES_MAX,
+ SIM_ERROR_REPORT_ONLY,
+ SIM_ERROR_NOT_REPORT,
+ SIM_ERROR_REFRESH_END,
+ SIM_ERROR_CARD_TYPE_INVALID,
+ SIM_ERROR_CARD_TYPE_VALID,
+ SIM_ERROR_CAUSE_MAX
+}sim_additional_error_cause_enum;
+
+/** sim command result */
+typedef enum
+{
+ SIM_CMD_SUCCESS = 2560, /**< sim command success */
+ SIM_CMD_FAIL = 2561, /**< sim command failure */
+ SIM_FATAL_ERROR = 2562, /**< sim fatal error */
+ SIM_NO_INSERTED = 2563, /**< sim no inserted */
+ SIM_CHV_NOT_INIT = 2564, /**< sim pin not initialisation */
+ SIM_CHV_RETRY_ALLOW = 2565, /**< sim pin retry allowed */
+ SIM_CHV_BLOCK = 2566, /**< sim pin block */
+ SIM_ACCESS_NOT_ALLOW = 2567, /**< sim access not allowed */
+ SIM_SAT_CMD_BUSY = 2568, /**< sim sat command busy */
+ SIM_DL_ERROR = 2569, /**< sim DL error */
+ SIM_MEMORY_PROBLEM = 2570, /**< sim memory problem */
+ SIM_TECHNICAL_PROBLEM = 2571, /**< sim technical problem */
+ SIM_PUK_UNLOCK = 2572, /**< sim puk unblock */
+ SIM_EF_RECORD_FULL = 2573, /**< sim EF record full */
+ SIM_SELECT_FILE_INVALID = 2574, /**< sim select file invalid */
+ SIM_SELECT_DF_TERMINATED = 2575,/**< sim select DF terminated */
+ SIM_NO_EF_SELECTED = 2576,/**< sim no EF selected */
+ SIM_FILE_NOT_FOUND = 2577,/**< sim file not found */
+ SIM_RECORD_NOT_FOUND = 2578,/**< sim record not found */
+ SIM_REF_DATA_NOT_FOUND = 2579,/**< sim REF data not found */
+ SIM_INCREASE_FAIL = 2580,/**< sim increase failure */
+ SIM_AUTH_ERROR_WRONG_MAC = 2581,/**< sim autn error wrong MAC */
+ SIM_AUTH_ERROR_GSM_NOT_SUPPORT = 2582,/**< sim auth error GSM not support */
+ SIM_WRONG_INSTRUCTION_CLASS = 2583, /**< sim wrong instruction class */
+ SIM_INCORRECT_PARAMETERS = 2584, /**< sim incorrect paramets */
+ SIM_INVALID_HANDLE = 2585, /**< sim invalid handle */
+ SIM_TIMEOUT_PROBLEM = 2586, /**< sim timeout problem */
+ SIM_INS_NOT_SUPPORT_OR_WRONG = 2587, /**< sim instruction not support or wrong */
+}sim_cmd_result_enum;
+
+/* VSIM error cause */
+typedef enum
+{
+ VSIM_ERROR_NO_ERROR = 0,
+ VSIM_ERROR_MODE_FAIL = 1,
+ VSIM_ERROR_INVALID_PROFILE_ID = 2,
+ VSIM_ERROR_INVALID_VSIM_TYPE = 3,
+ VSIM_ERROR_INVALID_AUTH_LEN = 4,
+ VSIM_ERROR_INVALID_AUTH_ALGO = 5,
+ VSIM_ERROR_FILE_NOT_FOUND = 6,
+ VSIM_ERROR_NO_SPECIFIC_ERROR = 0xFF
+}sim_vsim_fcs_enum;
+
+/** uicc channel number */
+typedef enum
+{
+ USIM_DEFAULT_CH = 0x00,
+ USIM_LOGIC_CH_1 = 0x01,
+ USIM_LOGIC_CH_2 = 0x02,
+ USIM_LOGIC_CH_3 = 0x03,
+ USIM_LOGIC_CH_4 = 0x04,
+ USIM_LOGIC_CH_5 = 0x05,
+ USIM_LOGIC_CH_6 = 0x06,
+ USIM_LOGIC_CH_7 = 0x07,
+ USIM_LOGIC_CH_8 = 0x08,
+ USIM_LOGIC_CH_9 = 0x09,
+ USIM_LOGIC_CH_10 = 0x0a,
+ USIM_LOGIC_CH_11 = 0x0b,
+ USIM_LOGIC_CH_12 = 0x0c,
+ USIM_LOGIC_CH_13 = 0x0d,
+ USIM_LOGIC_CH_14 = 0x0e,
+ USIM_LOGIC_CH_15 = 0x0f,
+ USIM_LOGIC_CH_16 = 0x10,
+ USIM_LOGIC_CH_17 = 0x11,
+ USIM_LOGIC_CH_18 = 0x12,
+ USIM_LOGIC_CH_19 = 0x13,
+ USIM_LOGIC_CH_SIZE,
+ USIM_LOGIC_CH_INVALID = 0xFF
+} usim_logic_channel_enum;
+
+typedef enum
+{
+ AKA_CONTEXT,
+ GBA_CONTEXT,
+ MAX_AUTH_CONTEXT
+} uicc_auth_mode_enum;
+
+/** sim recovery timer pattern */
+typedef enum
+{
+ SIM_RECOVERY_TIMER_CONSTANT, /** Constant timer (ex: 30s) */
+ SIM_RECOVERY_TIMER_LADDER, /** Ladder-type timer (ex: 2s, 4s, 8s, 16s, ...) */
+ SIM_RECOVERY_TIMER_CUSTOM, /** Customized timer (ex: 10s, 20s, 40s, ...) */
+} sim_recovery_timer_pattern_enum;
+
+/* Dual Mode SIM: UIM Call status */
+typedef enum
+{
+ SIM_CALL_DISCONNECT,
+ SIM_CALL_CONNECT
+}sim_call_status_enum;
+
+typedef enum
+{
+/*file index under DF(CDMA) 7F25*/
+ EF_C2K_AD_U_IDX,
+ EF_C2K_UIM_ID_U_IDX,
+ EF_C2K_COUNT_U_IDX,
+ EF_C2K_IMSI_M_U_IDX,
+ EF_C2K_IMSI_T_U_IDX,
+ EF_C2K_CDMA_HOME_U_IDX,
+ EF_C2K_ACCLOC_U_IDX,
+ EF_C2K_TERM_U_IDX,
+ EF_C2K_SSCI_U_IDX,
+ EF_C2K_OTAPASPC_U_IDX,
+ EF_C2K_NAMLOCK_U_IDX,
+ EF_C2K_MDN_U_IDX,
+ EF_C2K_CST_U_IDX,
+ EF_C2K_USGIND_U_IDX,
+ EF_C2K_SFUIMID_U_IDX,
+ EF_C2K_SPCS_U_IDX,
+ /*file index under ADF(CSIM) */
+ EF_C2K_AD_C_IDX,
+ EF_C2K_UIM_ID_C_IDX,
+ EF_C2K_COUNT_C_IDX,
+ EF_C2K_IMSI_M_C_IDX,
+ EF_C2K_IMSI_T_C_IDX,
+ EF_C2K_CDMA_HOME_C_IDX,
+ EF_C2K_ACCLOC_C_IDX,
+ EF_C2K_TERM_C_IDX,
+ EF_C2K_SSCI_C_IDX,
+ EF_C2K_OTAPASPC_C_IDX,
+ EF_C2K_NAMLOCK_C_IDX,
+ EF_C2K_MDN_C_IDX,
+ EF_C2K_CST_C_IDX,
+ EF_C2K_USGIND_C_IDX,
+ EF_C2K_SFUIMID_C_IDX,
+ EF_C2K_SPCS_C_IDX,
+ EF_C2K_EST_C_IDX,
+ MAX_C2K_EF_IDX
+} c2k_file_index;
+
+/** sim file index */
+typedef enum
+{
+ FILE_NONE,
+ FILE_MF_IDX,
+ FILE_GSM_IDX,
+ FILE_TELECOM_IDX,
+ FILE_IRIDIUM_IDX,
+ FILE_GLOBST_IDX,
+ FILE_ICO_IDX,
+ FILE_ACES_IDX,
+ FILE_EIA_IDX,
+ FILE_CTS_IDX,
+ FILE_SOLSA_IDX, /*10*/
+ FILE_MEXE_IDX,
+ FILE_GRAPHICS_IDX,
+ GLOBAL_FILES_START,
+ FILE_ICCID_IDX = GLOBAL_FILES_START,
+ FILE_EID_IDX,
+ FILE_ELP_IDX,
+ FILE_LOCK_IDX,
+ FILE_VER_IDX,
+ FILE_KT_USIM_TYPE_IDX,
+ FILE_VZPF_IDX,
+ GLOBAL_FILES_END = FILE_VZPF_IDX,
+ FILE_SAI_IDX,
+ FILE_SLL_IDX,
+ FILE_MEXE_ST_IDX,
+ FILE_ORPK_IDX,
+ FILE_ARPK_IDX,
+ FILE_TPRPK_IDX,/*20*/
+ FILE_IMG_IDX,
+ FILE_LP_IDX,
+ FILE_IMSI_IDX,
+ FILE_KC_IDX,
+ FILE_PLMNSEL_IDX,
+ FILE_HPLMN_IDX,
+ FILE_ACMAX_IDX,
+ FILE_SST_IDX,
+ FILE_ACM_IDX,
+ FILE_GID1_IDX,/*30*/
+ FILE_GID2_IDX,
+ FILE_SPN_IDX,
+ FILE_PUCT_IDX,
+ FILE_CBMI_IDX,
+ FILE_BCCH_IDX,
+ FILE_ACC_IDX,
+ FILE_FPLMN_IDX,
+ FILE_LOCI_IDX,
+ FILE_AD_IDX,
+ FILE_PHASE_IDX,/*40*/
+ FILE_VGCS_IDX,
+ FILE_VGCSS_IDX,
+ FILE_VBS_IDX,
+ FILE_VBSS_IDX,
+ FILE_EMLPP_IDX,
+ FILE_AAEM_IDX,
+ FILE_CBMID_IDX,
+ FILE_ECC_IDX,
+ FILE_CBMIR_IDX,
+ FILE_DCK_IDX,/*50*/
+ FILE_CNL_IDX,
+ FILE_NIA_IDX,
+ FILE_KCGPRS_IDX,
+ FILE_LOCIGPRS_IDX,
+ FILE_SUME_IDX,
+ FILE_PLMNWACT_IDX,
+ FILE_OPLMNWACT_IDX,
+ FILE_HPLMNACT_IDX,
+ FILE_CPBCCH_IDX,
+ FILE_INVSCAN_IDX,/*60*/
+ FILE_VM_WAIT_IDX,
+ FILE_CPHS_SST_IDX,
+ FILE_CF_FLAG_IDX,
+ FILE_OP_STRING_IDX,
+ FILE_CSP_IDX,
+ FILE_CPHS_INFO_IDX,
+ FILE_MAILBOX_NUM_IDX,
+ FILE_OP_SHORTFORM_IDX,
+ FILE_INFO_NUM_IDX,
+ FILE_ADN_IDX,/*70*/
+ FILE_FDN_IDX,
+ FILE_SMS_IDX,
+ FILE_CCP_IDX,
+ FILE_ECCP_IDX,
+ FILE_MSISDN_IDX,
+ FILE_SMSP_IDX,
+ FILE_SMSS_IDX,
+ FILE_LND_IDX,
+ FILE_SDN_IDX,
+ FILE_EXT1_IDX,/*80*/
+ FILE_EXT2_IDX,
+ FILE_EXT3_IDX,
+ FILE_BDN_IDX,
+ FILE_EXT4_IDX,
+ FILE_SMSR_IDX,
+ FILE_CMI_IDX,
+ FILE_IMG_1_IDX,
+ FILE_IMG_2_IDX,
+ FILE_IMG_3_IDX,
+ FILE_IMG_4_IDX,/*90*/
+ FILE_IMG_5_IDX,
+ FILE_IMG_6_IDX,
+ FILE_IMG_7_IDX,
+ FILE_IMG_8_IDX,
+ FILE_IMG_9_IDX,
+ FILE_IMG_A_IDX,
+ FILE_IMG_B_IDX,
+ FILE_IMG_C_IDX,
+ FILE_IMG_D_IDX,
+ FILE_IMG_E_IDX,/*100*/
+ FILE_IMG_F_IDX,
+ /*__HOMEZONE_SUPPORT__ start*/
+ FILE_VID_IDX,
+ FILE_HZ_IDX,
+ FILE_HZ_CACHE1_IDX,
+ FILE_HZ_CACHE2_IDX,
+ FILE_HZ_CACHE3_IDX,
+ FILE_HZ_CACHE4_IDX,
+ /*__HOMEZONE_SUPPORT__ end*/
+ /*__ENS__ start*/ /*ENS support mtk01488 */
+ FILE_ENS_DF_7F66_IDX,
+ FILE_ENS_DF_5F30_IDX,
+ FILE_ENS_ACTING_HPLMN_IDX,/*110*/
+ FILE_ENS_TERMINAL_SUPPORT_TABLE_IDX,
+ /*__ENS__ end*/
+ FILE_PNN_IDX,
+ FILE_OPL_IDX,
+ FILE_MBDN_IDX,
+ FILE_EXT6_IDX,
+ FILE_MBI_IDX,
+ FILE_MWIS_IDX,
+ FILE_CFIS_IDX,
+ FILE_EXT7_IDX,
+ FILE_SPDI_IDX,/*120*/
+ FILE_MMSN_IDX,
+ FILE_EXT8_IDX,
+ FILE_MMSICP_IDX,
+ FILE_MMSUP_IDX,
+ FILE_MMSUCP_IDX,
+ SIM_TOT_FILES,
+ FILE_DIR_IDX = SIM_TOT_FILES,
+ FILE_ARR_IDX,
+ FILE_USIM_IDX,
+ FILE_U_LI_IDX,
+ FILE_U_IMSI_IDX,/*130*/
+ FILE_U_KEYS_IDX,
+ FILE_U_KEYSPS_IDX,
+ FILE_U_PLMNWACT_IDX,
+ FILE_U_HPPLMN_IDX,
+ FILE_U_ACMMAX_IDX,
+ FILE_U_UST_IDX,
+ FILE_U_ACM_IDX,
+ FILE_U_GID1_IDX,
+ FILE_U_GID2_IDX,
+ FILE_U_SPN_IDX,/*140*/
+ FILE_U_PUCT_IDX,
+ FILE_U_CBMI_IDX,
+ FILE_U_ACC_IDX,
+ FILE_U_FPLMN_IDX,
+ FILE_U_LOCI_IDX,
+ FILE_U_AD_IDX,
+ FILE_U_CBMID_IDX,
+ FILE_U_ECC_IDX,
+ FILE_U_CBMIR_IDX,
+ FILE_U_PSLOCI_IDX,/*150*/
+ FILE_U_FDN_IDX,
+ FILE_U_SMS_IDX,
+ FILE_U_MSISDN_IDX,
+ FILE_U_SMSP_IDX,
+ FILE_U_SMSS_IDX,
+ FILE_U_SDN_IDX,
+ FILE_U_EXT2_IDX,
+ FILE_U_EXT3_IDX,
+ FILE_U_SMSR_IDX,
+ FILE_U_ICI_IDX,/*160*/
+ FILE_U_OCI_IDX,
+ FILE_U_ICT_IDX,
+ FILE_U_OCT_IDX,
+ FILE_U_EXT5_IDX,
+ FILE_U_CCP2_IDX,
+ FILE_U_EMLPP_IDX,
+ FILE_U_AAEM_IDX,
+ FILE_U_HIDDENKEY_IDX,
+ FILE_U_BDN_IDX,
+ FILE_U_EXT4_IDX,/*170*/
+ FILE_U_CMI_IDX,
+ FILE_U_EST_IDX,
+ FILE_U_ACL_IDX,
+ FILE_U_DCK_IDX,
+ FILE_U_CNL_IDX,
+ FILE_U_STARTHFN_IDX,
+ FILE_U_THRESHOLD_IDX,
+ FILE_U_OPLMNWACT_IDX,
+ FILE_U_HPLMNWACT_IDX,
+ FILE_U_ARR_IDX,/*180*/
+ FILE_U_NETPAR_IDX,
+ FILE_U_PNN_IDX,
+ FILE_U_OPL_IDX,
+ FILE_U_MBDN_IDX,
+ FILE_U_EXT6_IDX,
+ FILE_U_MBI_IDX,
+ FILE_U_MWIS_IDX,
+ FILE_U_CFIS_IDX,
+ FILE_U_EXT7_IDX,
+ FILE_U_SPDI_IDX,/*190*/
+ FILE_U_MMSN_IDX,
+ FILE_U_EXT8_IDX,
+ FILE_U_MMSICP_IDX,
+ FILE_U_MMSUP_IDX,
+ FILE_U_MMSUCP_IDX,
+ FILE_U_NIA_IDX,
+ FILE_U_VGCS_IDX,
+ FILE_U_VGCSS_IDX,
+ FILE_U_VBS_IDX,
+ FILE_U_VBSS_IDX,/*200*/
+ FILE_U_VGCSCA_IDX,
+ FILE_U_VBSCA_IDX,
+ FILE_U_GBAP_IDX,
+ FILE_U_MSK_IDX,
+ FILE_U_MUK_IDX,
+ FILE_U_GBANL_IDX,
+ FILE_U_SOLSA_IDX,
+ FILE_U_SAI_IDX,
+ FILE_U_SLL_IDX,
+ FILE_U_LSAD_IDX,/*210*/
+ FILE_U_PHONEBOOK_IDX,
+ FILE_U_PBR_IDX,
+ FILE_U_IAP_IDX,
+ FILE_U_ADN_IDX,
+ FILE_U_EXT1_IDX,
+ FILE_U_PBC_IDX,
+ FILE_U_GRP_IDX,
+ FILE_U_AAS_IDX,
+ FILE_U_GAS_IDX,
+ FILE_U_ANR_IDX,/*220*/
+ FILE_U_SNE_IDX,
+ FILE_U_CCP1_IDX,
+ FILE_U_UID_IDX,
+ FILE_U_PSC_IDX,
+ FILE_U_CC_IDX,
+ FILE_U_PUID_IDX,
+ FILE_U_EMAIL_IDX,
+ FILE_U_GSMACCESS_IDX,
+ FILE_U_KC_IDX,
+ FILE_U_KCGPRS_IDX,/*230*/
+ FILE_U_CPBCCH_IDX,
+ FILE_U_INVSCAN_IDX,
+ FILE_U_MEXE_IDX,
+ FILE_U_MEXEST_IDX,
+ FILE_U_ORPK_IDX,
+ FILE_U_ARPK_IDX,
+ FILE_U_TPRPK_IDX,
+ FILE_U_TKCDF_IDX,
+ FILE_U_WLAN_IDX,
+ FILE_U_PSEUDO_IDX,/*240*/
+ FILE_U_UPLMNWLAN_IDX,
+ FILE_U_OPLMNWLAN_IDX,
+ FILE_U_USSIDL_IDX,
+ FILE_U_OSSIDL_IDX,
+ FILE_U_WRI_IDX,
+ FILE_G_PHONEBOOK_IDX,
+ FILE_G_PBR_IDX,
+ FILE_G_IAP_IDX,
+ FILE_G_ADN_IDX,
+ FILE_G_EXT1_IDX,/*250*/
+ FILE_G_PBC_IDX,
+ FILE_G_GRP_IDX,
+ FILE_G_AAS_IDX,
+ FILE_G_GAS_IDX,
+ FILE_G_ANR_IDX,
+ FILE_G_SNE_IDX,
+ FILE_G_CCP1_IDX,
+ FILE_G_UID_IDX,
+ FILE_G_PSC_IDX,
+ FILE_G_CC_IDX,/*260*/
+ FILE_G_PUID_IDX,
+ FILE_G_EMAIL_IDX,
+ FILE_MULTIMEDIA_IDX,
+ FILE_MML_IDX,
+ FILE_MMDF_IDX,
+ FILE_U_EHPLMN_IDX, //__R7_EHPLMN__
+ FILE_U_EHPLMNPI_IDX,
+ FILE_U_LRPLMNSI_IDX,
+/*__U_CSP_SUPPORT__ start*/ /*[MAUI_02387843] mtk01612: AT&T proprietary: support EF U_CSP under 7FFF*/
+ FILE_U_CSP_IDX,
+/*__U_CSP_SUPPORT__ end*/
+ FILE_U_ENS_RAT_IDX, //__ENS_RAT_BALANCING__ /*270*/
+ FILE_U_ENS_TERMINAL_SUPPORT_TABLE_IDX, /* [MAUI_02908638] mtk01616_110418 support EF_U_TS_table under 7FFF */
+ FILE_U_ENS_DF_7F66_IDX,
+ FILE_U_ENS_DF_5F30_IDX,
+ FILE_U_ENS_ACTING_HPLMN_IDX,
+/* R8 __CSG_SUPPORT__ start */
+ FILE_U_HNB_IDX,
+ FILE_U_ACSGL_IDX,
+ FILE_U_CSGT_IDX,
+ FILE_U_HNBN_IDX,
+ FILE_U_OCSGL_IDX,
+/* R8 __CSG_SUPPORT__ end */
+ FILE_U_EPSLOCI_IDX,
+ FILE_U_EPSNSC_IDX,
+/* __ISIM_SUPPORT__ start */
+ FILE_PSISMSC_IDX,
+ FILE_ISIM_IDX,
+ FILE_I_IST_IDX,
+ FILE_I_IMPI_IDX,
+ FILE_I_DOMAIN_IDX,
+ FILE_I_IMPU_IDX,
+ FILE_I_AD_IDX,
+ FILE_I_ARR_IDX,
+ FILE_I_PCSCF_IDX,
+ FILE_I_GBAP_IDX,
+ FILE_I_GBANL_IDX,
+ FILE_I_NAFKCA_IDX,
+ FILE_I_UICCIARI_IDX,
+ FILE_I_SMS_IDX,
+ FILE_I_SMSS_IDX,
+ FILE_I_SMSR_IDX,
+ FILE_I_SMSP_IDX,
+/* __ISIM_SUPPORT__ end */
+
+/* USIM R10/R11 new file start */
+ FILE_U_NAFKCA_IDX,
+ FILE_U_SPNI_IDX,
+ FILE_U_PNNI_IDX,
+ FILE_U_NCPIP_IDX,
+ //FILE_U_EPSLOCI_IDX,// Already exist
+ //FILE_U_EPSNSC_IDX,// Already exist
+ FILE_U_UFC_IDX,
+ FILE_U_UICCIARI_IDX,
+ FILE_U_NASCONFIG_IDX,
+ FILE_U_PWS_IDX,
+/* USIM R10/R11 new file end */
+
+/* WLAN addition start */
+ FILE_U_HWSIDL_IDX,
+ FILE_U_WEHPLMNPI_IDX,
+ FILE_U_WHPI_IDX,
+ FILE_U_WLRPLMN_IDX,
+ FILE_U_HPLMNDAI_IDX,
+/* WLAN addition end */
+
+/* HNB addition start */
+ FILE_U_OCSGT_IDX,
+ FILE_U_OHNBN_IDX,
+/* HNB addition end */
+
+/* USIM R12/R13/R14 new files start */
+ FILE_U_FDNURI_IDX,
+ FILE_U_BDNURI_IDX,
+ FILE_U_SDNURI_IDX,
+ FILE_U_IWL_IDX,
+ FILE_U_IPS_IDX,
+ FILE_U_IPD_IDX,
+ FILE_U_EPDGID_IDX,
+ FILE_U_EPDGSELECTION_IDX,
+ FILE_U_EPDGIDEM_IDX,
+ FILE_U_EPDGSELECTIONEM_IDX,
+ FILE_U_FROMPREFERRED_IDX,
+ FILE_U_IMSCONFIGDATA_IDX,
+ FILE_U_TVCONFIG_IDX,
+ FILE_U_3GPPPSDATAOFF_IDX,
+ FILE_U_3GPPPSDATAOFFSERVICELIST_IDX,
+ /* PHONEBOOK start */
+ FILE_U_PURI_IDX,
+ /* PHONEBOOK end */
+ /* ProSe start */
+ FILE_U_PROSE_IDX,
+ FILE_U_PROSE_MON_IDX,
+ FILE_U_PROSE_ANN_IDX,
+ FILE_U_PROSEFUNC_IDX,
+ FILE_U_PROSE_RADIO_COM_IDX,
+ FILE_U_PROSE_RADIO_MON_IDX,
+ FILE_U_PROSE_RADIO_ANN_IDX,
+ FILE_U_PROSE_POLICY_IDX,
+ FILE_U_PROSE_PLMN_IDX,
+ FILE_U_PROSE_GC_IDX,
+ FILE_U_PST_IDX,
+ FILE_U_PROSE_UIRC_IDX,
+ FILE_U_PROSE_GM_DISCOVERY_IDX,
+ FILE_U_PROSE_RELAY_IDX,
+ FILE_U_PROSE_RELAY_DISCOVERY_IDX,
+ /* ProSe end */
+ /* ACDC start */
+ FILE_U_ACDC_IDX,
+ FILE_U_ACDC_LIST_IDX,
+ FILE_U_ACDC_OS_CONFIG_IDX,
+ /* ACDC end */
+/* USIM R12/R13/R14 new files end */
+ FILE_U_OP_STRING_IDX,
+ FILE_U_OP_SHORTFORM_IDX,
+
+/* TELECOM R13/R14 new files start */
+ FILE_MCPTT_IDX,
+ FILE_MST_IDX,
+ FILE_MCPTT_CONFIG_IDX,
+ FILE_V2X_IDX,
+ FILE_VST_IDX,
+ FILE_V2X_CONFIG_IDX,
+/* TELECOM R13/R14 new files end */
+
+/* ISIM R12/R13/R14 new files start */
+ FILE_I_FROMPREFERRED_IDX,
+ FILE_I_IMSCONFIGDATA_IDX,
+/* ISIM R12/R13/R14 new files end */
+
+/* CDMA2000 file start */
+ FILE_MMSS_IDX,
+ FILE_MLPL_IDX,
+ FILE_MSPL_IDX,
+ FILE_MMSSMODE_IDX,
+ FILE_CSIM_IDX,
+ FILE_C_COUNT_IDX,
+ FILE_C_IMSI_M_IDX,
+ FILE_C_IMSI_T_IDX,
+ FILE_C_TMSI_IDX,
+ FILE_C_CDMA_HOME_IDX,
+ FILE_C_ACCLOC_IDX,
+ FILE_C_TERM_IDX,
+ FILE_C_SSCI_IDX,
+ FILE_C_PRL_IDX,
+ FILE_C_UIM_ID_IDX,
+ FILE_C_CST_IDX,
+ FILE_C_OTAPASPC_IDX,
+ FILE_C_NAMLOCK_IDX,
+ FILE_C_OTA_IDX,
+ FILE_C_ESN_MEID_ME_IDX,
+ FILE_C_LI_IDX,
+ FILE_C_FDN_IDX,
+ FILE_C_SMS_IDX,
+ FILE_C_SMSP_IDX,
+ FILE_C_SMSS_IDX,
+ FILE_C_SPN_IDX,
+ FILE_C_USGIND_IDX,
+ FILE_C_AD_IDX,
+ FILE_C_MDN_IDX,
+ FILE_C_SPCS_IDX,
+ FILE_C_ECC_IDX,
+ FILE_C_ME3GPDOPC_IDX,
+ FILE_C_3GPDOPM_IDX,
+ FILE_C_SIPCAP_IDX,
+ FILE_C_MIPCAP_IDX,
+ FILE_C_SIPUPP_IDX,
+ FILE_C_MIPUPP_IDX,
+ FILE_C_SIPSP_IDX,
+ FILE_C_MIPSP_IDX,
+ FILE_C_SIPPAPSS_IDX,
+ FILE_C_MECRP_IDX,
+ FILE_C_HRPDCAP_IDX,
+ FILE_C_HRPDUPP_IDX,
+ FILE_C_EPRL_IDX,
+ FILE_C_BCSMScfg_IDX,
+ FILE_C_BCSMStable_IDX,
+ FILE_C_BCSMSP_IDX,
+ FILE_C_GID1_IDX,
+ FILE_C_GID2_IDX,
+ FILE_C_SFUIMID_IDX,
+ FILE_C_EST_IDX,
+ FILE_C_EXT2_IDX,
+ FILE_C_MIPFlags_IDX,
+ FILE_C_3GPDUPPExt_IDX,
+ FILE_C_IPC6CAP_IDX,
+ FILE_C_TCPConfig_IDX,
+ FILE_C_DGC_IDX,
+ FILE_CDMA_IDX,
+ FILE_UIM_IMSI_M_IDX,
+ FILE_UIM_AD_IDX,
+ FILE_UIM_UIM_ID_IDX,
+ FILE_UIM_COUNT_IDX,
+ FILE_UIM_IMSI_T_IDX,
+ FILE_UIM_CDMA_HOME_IDX,
+ FILE_UIM_ACCLOC_IDX,
+ FILE_UIM_TERM_IDX,
+ FILE_UIM_SSCI_IDX,
+ FILE_UIM_OTAPASPC_IDX,
+ FILE_UIM_NAMLOCK_IDX,
+ FILE_UIM_MDN_IDX,
+ FILE_UIM_CST_IDX,
+ FILE_UIM_USGIND_IDX,
+ FILE_UIM_SFUIMID_IDX,
+ FILE_UIM_SPCS_IDX,
+/* CDMA2000 file end */
+
+ FILE_PERSO_IDX,
+
+ /* OP07 RPM VERSION */
+ FILE_RPM_DF_ARMED_AGENT_IDX,
+ FILE_RPM_VERSION_IDX,
+ FILE_U_RPM_DF_ARMED_AGENT_IDX,
+ FILE_U_RPM_VERSION_IDX,
+
+/* USIM R15 new files start */
+ FILE_U_EARFCNLIST_IDX,
+/* 5GS files start */
+ FILE_U_5GS_IDX,
+ FILE_U_5GS3GPPLOCI_IDX,
+ FILE_U_5GSN3GPPLOCI_IDX,
+ FILE_U_5GS3GPPNSC_IDX,
+ FILE_U_5GSN3GPPNSC_IDX,
+ FILE_U_5GAUTHKEYS_IDX,
+ FILE_U_UAC_AIC_IDX,
+ FILE_U_SUCI_CALC_INFO_IDX,
+ FILE_U_OPL5G_IDX,
+ FILE_U_NSI_IDX,
+ FILE_U_ROUTING_INDICATOR_IDX,
+ FILE_U_URSP_IDX,
+/* 5GS files end */
+/* USIM R15 new files end */
+
+/* ISIM R14/R15 new files start */
+ FILE_I_WEBRTCURI_IDX,
+ FILE_I_XCAPCONFIGDATA_IDX,
+ FILE_I_WLAN_EPS_ROAMING_HANDOVER_IDX,
+/* ISIM R14/R15 new files end */
+
+ UICC_TOTAL_FILES
+}sim_file_index_enum;
+
+#define UTK_MIN_PROACTIVE_POLLING_INTERVAL 1 /* 1s */
+
+#endif // _SIM_PUBLIC_ENUM_PUBLIC_H_
+
diff --git a/mcu/interface/protocol/l4_c2k/sysapi.h b/mcu/interface/protocol/l4_c2k/sysapi.h
new file mode 100644
index 0000000..3c764b3
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/sysapi.h
@@ -0,0 +1,2560 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 SYSAPI_H
+#define SYSAPI_H
+/*****************************************************************************
+
+ FILE NAME: sysapi.h
+
+ DESCRIPTION:
+
+ This file contains all the constants, mail message definition and
+ function prototypes exported by the SYS unit.
+
+*****************************************************************************/
+
+#include "sysdefs.h"
+#include "perf_api.h"
+
+#ifndef GEN_FOR_PC /* Disable for MoDIS CodenGen error */
+/* Define functions normally accessed from the C library */
+#include <string.h>
+#include <stdlib.h>
+
+#endif
+
+#define SysMemset memset
+#define SysMemcpy memcpy
+#define SysMemcmp memcmp
+#define SysAbs( x ) abs( (x) )
+
+#define ALL_ST_INTS_MASK 0xFFFF /* Mask used for all ST interrupt Mask */
+
+
+#define PAD32(_bytes_) ((((_bytes_) + sizeof(kal_uint32) - 1)/sizeof(kal_uint32)) * sizeof(kal_uint32))
+
+/* Define variables used for System Timer interrupts */
+#define ST_CPINT_0 0x0001
+#define ST_CPINT_125 0x0002
+#define ST_CPINT_250 0x0004
+#define ST_CPINT_375 0x0008
+#define ST_CPINT_500 0x0010
+#define ST_CPINT_625 0x0020
+#define ST_CPINT_750 0x0040
+#define ST_CPINT_875 0x0080
+#define ST_CPINT_1000 0x0100
+#define ST_CPINT_1125 0x0200
+#define ST_CPINT_1250 0x0400
+#define ST_CPINT_1375 0x0800
+#define ST_CPINT_1500 0x1000
+#define ST_CPINT_1625 0x2000
+#define ST_CPINT_1750 0x4000
+#define ST_CPINT_1875 0x8000
+
+#define ST_CPINT_ALL 0xFFFF
+
+/* Define variables used for System Timer interrupts for DO*/
+#define ST_DO_CPINT_0 0x0001
+#define ST_DO_CPINT_166 0x0002
+#define ST_DO_CPINT_333 0x0004
+#define ST_DO_CPINT_500 0x0008
+#define ST_DO_CPINT_667 0x0010
+#define ST_DO_CPINT_834 0x0020
+#define ST_DO_CPINT_1001 0x0040
+#define ST_DO_CPINT_1168 0x0080
+#define ST_DO_CPINT_1335 0x0100
+#define ST_DO_CPINT_1502 0x0200
+#define ST_DO_CPINT_1669 0x0400
+#define ST_DO_CPINT_1836 0x0800
+#define ST_DO_CPINT_2003 0x1000
+#define ST_DO_CPINT_2170 0x2000
+#define ST_DO_CPINT_2337 0x4000
+#define ST_DO_CPINT_2504 0x8000
+
+#define ST_DO_CPINT_ALL 0xFFFF
+
+
+#define INVALID_SYSTIME_SECS 0xFFFFFFFF
+
+
+#define C2K_INVALID_MODULE_ID 0
+#define C2K_INVALID_MESSAGE_ID 0
+
+/*---------------------------------------------------------------
+* Carrier definitions and check for carrier compile options
+*----------------------------------------------------------------*/
+/* !!! When adding new carrier extension: !!! */
+/* !!! -update TOTAL_CARRIER_EXTENSIONS check below !!! */
+/* !!! -add carrier to SysCarrierId enum below !!! */
+/* !!! -update function sysGetCarrierdId() in sysutils.c !!! */
+/* !!! -update CarrierFeatureMatrix[][] in function !!! */
+/* !!! sysIsFeatureSupported()in sysutils.c !!! */
+#define TOTAL_CARRIER_EXTENSIONS ( defined(VERIZON_EXTENSIONS) + \
+ defined(SPRINT_EXTENSIONS) + \
+ defined(LGT_EXTENSIONS) + \
+ defined(KDDI_EXTENSIONS) )
+
+#if TOTAL_CARRIER_EXTENSIONS > 1
+ #error "Multiple carrier extensions(Verizon/Sprint/...) enabled in this build"
+#endif
+
+typedef enum
+{
+ SYS_CARRIER_GENERIC = 0, /* no carrier extension defined */
+ SYS_CARRIER_VERIZON, /* VERIZON_EXTENSIONS */
+ SYS_CARRIER_SPRINT, /* SPRINT_EXTENSIONS */
+ SYS_CARRIER_CHINATELECOM, /* CHINATELECOM_EXTENSIONS */
+ SYS_CARRIER_LGT, /* LGT_EXTENSIONS */
+ SYS_CARRIER_KDDI, /* KDDI_EXTENSIONS */
+ SYS_NUM_CARRIERS
+} SysCarrierId;
+
+/*---------------------------------------------------------------
+* Declare constants and typedefs used for 1x in SysTime.c
+*----------------------------------------------------------------*/
+
+/* Define interrupt types used in SysIntEnable call */
+typedef enum
+{
+ SYS_FIQ_INT = 0x40,
+ SYS_IRQ_INT = 0x80,
+ SYS_ALL_INT = SYS_IRQ_INT | SYS_FIQ_INT
+} SysIntT;
+
+/* structure used for finer system time resolution (36 bits) */
+typedef struct
+{
+ kal_uint32 MostSignificant32Bits;
+ kal_uint8 LeastSignificant4Bits;
+} SysSystemTimeFineT;
+
+typedef struct
+{
+ kal_bool Immediate; /* do immdediate or at action time */
+ SysSystemTimeT Time; /* action time in 20 ms */
+} SysActionTimeT;
+
+typedef enum
+{
+ SYS_FRAME_SIZE_20MS = 0,
+ SYS_FRAME_SIZE_26MS = 1
+} SysFrameSizeT;
+
+typedef enum
+{
+ SYS_TX_SIGNAL_PERIOD_5MS,
+ SYS_TX_SIGNAL_PERIOD_10MS,
+ SYS_TX_SIGNAL_PERIOD_20MS
+} SysTxSignalPeriodT;
+
+typedef enum
+{
+ SYS_TX_SIGNAL_START_FRAME_SUBFRAME_0, /* Tx signal starts at 0 ms into 20 ms frame */
+ SYS_TX_SIGNAL_START_FRAME_SUBFRAME_1, /* Tx signal starts at 5 ms into 20 ms frame */
+ SYS_TX_SIGNAL_START_FRAME_SUBFRAME_2, /* Tx signal starts at 10 ms into 20 ms frame */
+ SYS_TX_SIGNAL_START_FRAME_SUBFRAME_3 /* Tx signal starts at 15 ms into 20 ms frame */
+} SysTxSignalStartFrameT;
+
+
+typedef enum
+{
+ SLOT00_NUM = 0x00, /* PCG or Slot 0 */
+ SLOT01_NUM,
+ SLOT02_NUM,
+ SLOT03_NUM,
+ SLOT04_NUM,
+ SLOT05_NUM,
+ SLOT06_NUM,
+ SLOT07_NUM,
+ SLOT08_NUM,
+ SLOT09_NUM,
+ SLOT10_NUM,
+ SLOT11_NUM,
+ SLOT12_NUM,
+ SLOT13_NUM,
+ SLOT14_NUM,
+ SLOT15_NUM
+} SlotMaskNumberT;
+
+
+typedef struct
+{
+ kal_bool Enabled;
+ kal_uint8 FrameSize;
+ kal_uint8 Cnt;
+ kal_uint8 System;
+} FreeRunT;
+
+typedef struct
+{
+ kal_bool ValidCalendarSystemTime;
+ kal_uint32 Lower32;
+ kal_uint8 Upper6;
+ kal_uint8 LpSec;
+ kal_int8 LtmOff;
+ kal_bool DayLt;
+ FreeRunT FreeRun;
+} SysTimeDataT;
+
+typedef struct
+{
+ kal_uint32 Lower32;
+ kal_uint8 Upper6;
+}FullSystemTimeT;
+
+
+typedef struct
+{
+ kal_uint32 Seconds;
+ kal_uint32 Milliseconds;
+} SysCalendarTimeDataT;
+
+
+/*---------------------------------------------------------------
+* Declare constants and typedefs used for DO in SysTime.c
+*----------------------------------------------------------------*/
+/* Select the mode when called SysCallbackregister or cancel */
+#define SYS_ACTION_EVENT_MASK 0x1
+#define SYS_ACTION_SLOT_EVENT_MASK 0x2
+#define SYS_PERIODIC_SLOT_EVENT_MASK 0x4
+typedef enum
+{ /* bit 0 = 0: slot event
+ bit 0 = 1: action event
+ bit 1 = 1: action slot event
+ bit 2 = 0: single event
+ bit 2 = 1: periodic event
+ */
+ ACTION_EVENT = SYS_ACTION_EVENT_MASK,
+ ACTION_SLOT_EVENT = (SYS_ACTION_EVENT_MASK | SYS_ACTION_SLOT_EVENT_MASK),
+ SLOT_EVENT = 0,
+ PERIODIC_SLOT_EVENT = SYS_PERIODIC_SLOT_EVENT_MASK,
+ ACTION_PERIODIC_SLOT_EVENT = (ACTION_SLOT_EVENT | SYS_PERIODIC_SLOT_EVENT_MASK)
+} SysEventTypeT;
+
+typedef enum
+{
+ SINGLE_PCG_EVENT = SLOT_EVENT,
+ PERIODIC_PCG_EVENT = PERIODIC_SLOT_EVENT
+} PcgEventTypeT;
+#define SINGLE_SLOT_EVENT SLOT_EVENT
+
+/* For Tag Type */
+#define SYS_TAG_FRMOFT_ADJ_MASK 0x8 /* FrameOffset adjust flag, bit 3: 0 = Offset not yet adjusted, 1 = FrameOffset adjusted */
+#define SYS_TAG_FRMOFT_MASK 0x4 /* FrameOffset, bit 2: 0 = No Offset, 1 = FrameOffset */
+#define SYS_TAG_KEEP_MASK 0x2 /* Flush or Keep, bit 1: 0 = Flush Q, 1 = Keep Q */
+#define SYS_TAG_MODE_MASK 0x1 /* AirInterface, bit 0: 0 = 1xRTT, 1 = EVDO */
+typedef enum
+{
+ FLUSH_QUEUE_1X = 0, /* b000 */
+ FLUSH_QUEUE_DO = 1, /* b001 */
+ KEEP_QUEUE_1X = 2, /* b010 */
+ KEEP_QUEUE_DO = 3, /* b011 */
+ OFT_FLUSH_QUEUE_DO = 5, /* b101 */
+ OFT_KEEP_QUEUE_DO = 7 /* b111 */
+} SysTagTypeT;
+
+/* Define Tracking Frame Counter based, according 1X and DO Frame counter */
+typedef struct
+{
+ kal_uint32 Lower32; /* Lower 32 bit */
+ kal_uint8 Upper6; /* Upper 6 bit */
+} FrameRecT;
+
+/* The system time definition in echip level. */
+typedef struct
+{
+ kal_uint64 SuperFrame; /* The superframe in 80ms unit. */
+ kal_uint32 Chip8xOffset; /* Offset to 80ms frame boundary, in unit of 1/8 chip. */
+} SysSFrameTimeT;
+
+
+typedef struct
+{
+ kal_uint32 Lower32;
+ kal_uint8 Upper6;
+ kal_int8 Subframe;
+ kal_int8 Slot;
+ kal_int16 SymbNum;
+} SysTimeFullT;
+
+
+/* For Transition from 1x to do or vise versa */
+#define SYS_TRANS_HW_SWITCH 0x1
+#define SYS_TRANS_DUAL_UPDATE 0x2
+#define SYS_TRANS_TIME_RESET 0x4
+#define SYS_TRANS_TIME_RESYNC 0x8
+typedef enum
+{
+/* (Time << 2) | (Update << 1) | HW
+ Time : 0 = Curr, 1 = Reset, 2 = Resync
+ Update: 0 = SINGLE, 1 = DUAL
+ HW : 0 = NO, 1 = HW
+*/
+ SYS_TRANS_NO_ACTION = 0,
+ SYS_TRANS_CURR_SINGLE_HW = 1, /* b0001 */
+ SYS_TRANS_RESET_SINGLE_HW = 5, /* b0101 */
+ SYS_TRANS_RESET_DUAL_HW = 7, /* b0111 */
+ SYS_TRANS_RESYNC_SINGLE_NO = 8, /* b1000 */
+ SYS_TRANS_RESYNC_SINGLE_HW = 9, /* b1001 */
+ SYS_TRANS_RESYNC_DUAL_HW = 11 /* b1011 */
+} SysTransitionTypeT;
+
+
+/*----------------------------------------------------------------------------------
+* Declare constants and typedefs used for Bondout Option functions in SysBondout.c
+*-----------------------------------------------------------------------------------*/
+typedef enum
+{
+ SYS_BONDOUT_EVDOREV0_VOICE,
+ SYS_BONDOUT_EVDOREV0_NO_VOICE,
+ SYS_BONDOUT_EVDOREV0A_VOICE,
+ SYS_BONDOUT_EVDOREV0A_NO_VOICE,
+ SYS_BONDOUT_VOICE_ONLY
+} SysBondoutOptionsT;
+
+typedef enum
+{
+ SYS_ENH_SYSTEM_SELECT_FEATURE, /* Enhanced System Select with AutoA and AutoB options */
+ SYS_ERI_FEATURE, /* Enhanced Roaming Indicator */
+ SYS_EXT_SMS_INIT_FEATURE, /* External SMS Initialization */
+ SYS_RSVD_ASSIGN_MODE_111_FEATURE,/* Enables IS-95A to specify Rate set 1 or 2 for data calls
+ using Reserved 111 ASSIGN Mode. */
+ SYS_GPS_FEATURE, /* Enhanced GPS HW select with features */
+ SYS_ALT_AKEY_CHKSUM_FEATURE, /* Alternate Akey Checksum algorithm */
+
+ SYS_GPS_SUPL_FEATURE,
+
+ SYS_PRL_ENHANCE_FOR_INT_ROAM_FEATURE, /* PRL Enhancements for International Roaming per CDG 86 */
+
+ SYS_REGISTRATION_THROTTLING_FEATURE, /* Registration throttling (to avoid draining battery in area
+ where MS continously fails to register due to Max Access
+ Probe failures) */
+
+ SYS_SAFETY_NET_REGISTRATION_FEATURE, /* Feature to perform safety net/fallback registration in
+ * network conditions that may result in the network not
+ * knowing the whereabouts of the MS for extended periods.
+ * Feature needed to compensation for poor network configurations
+ * seen on the TATA network in India.
+ */
+
+ SYS_HSC_CLK_CAL_FAST_SETTLE_FEATURE, /* Feature to be turned on on devices with fast drifting 32k clocks */
+
+ SYS_HWD_KEYBOARD_FEATURE, /* Hwd Keyboard. */
+
+ SYS_CSS_1X_MAPE_HOME_SYS_AVOID_FEATURE, /* Home system avoidance upon MAPE registration failure.
+ Acquire less preferred system if available */
+
+ SYS_CSS_1X_CDG143_MAPE_SYS_AVOID_FEATURE, /* CDG143 Req. The channel over which access failed is placed last
+ in the channels list */
+
+ SYS_CSS_1X_CDG143_REDIR_SYS_AVOID_FEATURE, /* CDG143 Req. If Redirection Scan List is exhausted and return_if_fail is KAL_FALSE,
+ MS shall avoid the original channel over which the redirection was received for 30 sec. */
+
+ SYS_CSS_1X_CDG143_REDIR_MPSS_FEATURE, /* CDG143 Req 4.5.5. Perform MPSS after T_bsr_redir when acquiring a less pref. sys. following a
+ redirection. If no better service found, reacquire the original system from which it got redirected */
+
+ SYS_CSS_1X_CDG143_CALL_RELEASE_MPSS_FEATURE, /* CDG143 Req 4.2.5b. MS shall perform better service reselection T_bsr_call sec after end of call */
+
+ SYS_CSS_1X_FINISH_1ST_BSR_B4_DATACALL_FEATURE, /* MS will continue the initial BSR after acquiring a less preferred system
+ if the user attempts to access the network for a data call */
+
+ SYS_CSS_1X_FINISH_1ST_BSR_AFTER_POWERUP_FEATURE, /* MS will continue the initial BSR after acquiring a less preferred system
+ during power up if user attempts calls (except for 911) */
+
+ SYS_CSS_1X_USE_NAM_FOR_VALIDATION_FEATURE, /* A 1x System not found in the PRL, not negative in NAM but found in the NAM
+ positive SID NID list will be declared Home and accepted (if PRL pref_only=KAL_FALSE) */
+
+ SYS_CSS_1X_VOICE_ROAM_BARRING_FEATURE, /* Ability to reject International and or Domestic roaming based on ERI */
+
+ SYS_CSS_1X_LOST_CHANNEL_DWELL_FEATURE, /* The lost channel will be scanned repeatedly for the duratioon specified */
+ /* in Phase 0 of OOSA System Lost Stage => Phase 0 scan method MUST be set to timer based. */
+
+ SYS_CSS_1X_RESET_GEO_UPON_SYSLOST_FEATURE, /* Upon system lost, the MS will scan from the top of the GEO instead of continuing */
+ /* from current index */
+
+ SYS_CSS_1X_RESTRICT_SILENTRETRY_TO_SAME_GEO_FEATURE, /* Only same Geo Systems will be accepted in Silent Retry state */
+
+ SYS_CSS_1X_ONLY_REJECT_REDIR_IF_NEG_IN_PRL_FEATURE, /* Reject the redirected system only if found negative in PRL or NAM. */
+ /* Non-system table systems will be accepted no matter what */
+
+ SYS_CSS_1X_ACCEPT_SIDNID_CHANGE_IN_IDLE_FEATURE, /* Do not inititate immediate better service scan in SID NID changes */
+ /* as a result of idle channel hash, idle handoff */
+
+ SYS_CSS_1X_USE_RESTRICTIVE_SIDNID_MATCH_FEATURE, /* When matching an SID/NID in the PRL, use more restrictive SID/NID */
+ /* matching using the band class and channel */
+
+ SYS_CSS_DO_USE_RESTRICTIVE_SUBNET_MATCH_FEATURE, /* Restrictive subnet match feature */
+
+ SYS_CSS_1X_MPSS_PILOT_STRENGTH_FEATURE, /* During MPSS, higher priority system can only be selected if they meet certain pilot strength criteria*/
+
+ SYS_CSS_1X_CDG143_NEW_SYS_MPSS_FEATURE, /* CDG143 Req 4.2.6. MS shall perform better service reselection T_bsr_newsys sec after idle handoff or hash to less pref system */
+
+ SYS_CSS_1X_ALLOW_SILENTRETRY_ON_LOWER_PRI_FEATURE, /* Allow Silent Retry on lower priority systems in same geo. */
+
+ SYS_MMC_MBIM_API_FEATURE, /* Microsoft MBIM API feature */
+
+ SYS_MCC_1X_LTE_ASSOCIATION, /* SPRINT carrier requirement */
+
+ SYS_NUM_FEATURES
+} SysFeatureId;
+
+/* bitmap for Home System avoidance customization */
+typedef enum
+{
+ ALLOW_AVOIDANCE_WHEN_SYS_LOST = 0,
+ ALLOW_LESS_PREF_SYS_AVOIDANCE,
+ ALLOW_MPSS_DURING_AVOIDANCE
+} SysCssHomeSysAvoidanceOptions;
+
+/* For C2k ,Define for C2k Sys Recover PREF Info Trace */
+typedef struct
+{
+ module_type module_id; /**Module id which call Sys Recover */
+ SysAirInterfaceT cur_c2k_rat; /**Modem Rat which call Sys Recover*/
+ kal_uint32 RecoverDbgData[16];
+} C2kSysRecoverDbgInfoT;
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysGetCpsrValue
+
+ DESCRIPTION:
+
+ PARAMETERS:
+
+ None
+
+ RETURNED VALUES:
+
+ CPSR Value.
+
+*****************************************************************************/
+extern kal_uint32 SysGetCpsrValue(void);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysGetSpValue
+
+ DESCRIPTION:
+
+ PARAMETERS:
+
+ None
+
+ RETURNED VALUES:
+
+ SP Value.
+
+*****************************************************************************/
+extern kal_uint32 SysGetSpValue(void);
+
+/*****************************************************************************
+;
+; FUNCTION NAME: SysSaveArmRegs
+;
+; DESCRIPTION:
+;
+; Stores the Arm current mode regs (r0~r15 to ArmRegs)
+;
+; This function should only be used during crash dump.
+;
+; C FUNCTION PROTOTYPE:
+;
+; void SysSaveArmRegs(void);
+;
+; PARAMETERS:
+;
+; None
+;
+; RETURNED VALUES:
+;
+; None.
+;
+;*****************************************************************************/
+void SysSaveArmRegs(void);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysSaveContextHistory
+
+ DESCRIPTION:
+
+ This routine save NU_Thread_Id and 32k time to ContextHistory array.
+ It is called by high frequency, so use ASM routine to save time.
+
+ C FUNCTION PROTOTYPE:
+
+ void SysSaveContextHistory(void);
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+void SysSaveContextHistory(void);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysJumpToCodeAddr
+
+ DESCRIPTION:
+
+ This routine jump to the one code section, boot, cp or UA boot etc.
+
+ PARAMETERS:
+
+ CpAddr: The start address of CP code section.
+ R6Flag: The flag need to save to R6
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void SysJumpToCodeAddr(kal_uint32 CpAddr, kal_uint32 R6Flag);
+
+extern kal_uint32 SaveAndSetIRQMask(void);
+extern void RestoreIRQMask(kal_uint32);
+extern kal_uint32 kal_hrt_SaveAndSetIRQMask(void);
+extern void kal_hrt_RestoreIRQMask(kal_uint32);
+
+#define SysIntDisable(IntType) \
+{ \
+ volatile kal_uint32 M_IntStat; \
+ if (kal_get_current_domain() != KAL_DOMAIN_NORMAL) \
+ { \
+ M_IntStat = kal_hrt_SaveAndSetIRQMask(); \
+ } \
+ else \
+ { \
+ M_IntStat = SaveAndSetIRQMask(); \
+ } \
+
+#define SysIntEnable(IntType) \
+ if (kal_get_current_domain() != KAL_DOMAIN_NORMAL) \
+ { \
+ kal_hrt_RestoreIRQMask(M_IntStat); \
+ } \
+ else \
+ { \
+ RestoreIRQMask(M_IntStat); \
+ } \
+}
+
+#define SysIntDisableEnd(IntType) M_IntStat;}
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeRegister
+
+ DESCRIPTION:
+
+ This routine registers either a signal OR a call back function associated
+ with an action time in the system time queue. The system time queue contains an order
+ list of all action times.
+
+ NOTE: 1. The Routine function pointer MUST be set to NULL to cause a message to be sent.
+ 2. If this Routine function is called in HRT domain, only be allowed in frame/PCG/slot tick.
+
+ PARAMETERS:
+
+ ActionTime - Action time to insert into the time queue
+ Module_id - Module ID of task to send signal.
+ Signal - Signal to send.
+ Routine - Call back routine when action time is reached
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+#ifdef SYS_DEBUG_FAULT_FILE_INFO
+#define C2kSysTimeRegister(ActionTime, module_id, message, Routine) \
+ __C2kSysTimeRegister(ActionTime, module_id, message, Routine, __MODULE__, __LINE__)
+extern void __C2kSysTimeRegister(kal_uint32 ActionTime, module_type module_id, msg_type message, void (*Routine) (kal_uint32),
+ const char *ModuleName, unsigned line);
+#else
+extern void C2kSysTimeRegister(kal_uint32 ActionTime, module_type module_id, msg_type message, void (*Routine) (kal_uint32));
+#endif
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeRegisterCancel
+
+ DESCRIPTION:
+
+ This routine cancels the signal OR callback that is registered at a specified
+ action time.
+
+ NOTE: If this Routine function is called in HRT domain, only be allowed in frame/PCG/slot tick.
+
+ PARAMETERS:
+
+ ActionTime - Action time of registered signal to cancel.
+ Module_id - Module ID of task to send signal.
+ Signal - Signal to send.
+ Routine - Call back routine when action time is reached
+
+ RETURNED VALUES:
+
+ kal_boolean flag indicating operation status.
+ Returns KAL_TRUE if action cancelled successfully.
+ Returns KAL_FALSE if specified action not found in registration queue.
+
+ Note: Input paramters must match those used when SysTimeRegister was called
+ originally.
+
+*****************************************************************************/
+#ifdef SYS_DEBUG_FAULT_FILE_INFO
+#define C2kSysTimeRegisterCancel(ActionTime, module_id, message, Routine) \
+ __C2kSysTimeRegisterCancel(ActionTime, module_id, message, Routine, __MODULE__, __LINE__)
+extern kal_bool __C2kSysTimeRegisterCancel(kal_uint32 ActionTime, module_type module_id, msg_type message, void (*Routine) (kal_uint32),
+ const char *ModuleName, unsigned line);
+#else
+extern kal_bool C2kSysTimeRegisterCancel(kal_uint32 ActionTime, module_type module_id, msg_type message, void (*Routine) (kal_uint32));
+#endif
+
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysCallbackGroupCancel
+
+ DESCRIPTION:
+
+ This routine cancels all the SLOT_EVENT, ACTION_EVENT, and SLOT_ACTION_EVENT
+ (basically ALL) callbacks associated with the specified module id and Signal.
+
+ NOTE: If this Routine function is called in HRT domain, only be allowed in frame/PCG/slot tick.
+
+ PARAMETERS:
+
+ Module_id - Module ID of task to send signal.
+ Signal - Signal to send.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+#ifdef SYS_DEBUG_FAULT_FILE_INFO
+#define C2kSysCallbackGroupCancel(AirInterface, module_id, message) \
+ __C2kSysCallbackGroupCancel(AirInterface, module_id, message, __MODULE__, __LINE__)
+extern void __C2kSysCallbackGroupCancel(SysAirInterfaceT AirInterface, module_type module_id, msg_type message,
+ const char *ModuleName, unsigned line);
+#else
+extern void C2kSysCallbackGroupCancel(SysAirInterfaceT AirInterface, module_type module_id, msg_type message);
+#endif
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysPcgEventRegister
+
+ DESCRIPTION:
+
+ This routine registers either a signal OR a call back function associated
+ with a PCG trigger with the system timer interrupts. The PCG event queue contains
+ the number of events based on which PCG is checked.
+
+ NOTE: If this Routine function is called in HRT domain, only be allowed in frame/PCG/slot tick.
+
+ PARAMETERS:
+
+ PcgMask - System Timer event mask to identify which PCG(s) to trigger event
+ EventType - Continuous periodic or single PCG event types.
+ Module_id - Module ID of task to send signal.
+ Signal - Signal to send.
+ Routine - Call back routine when action time is reached
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+#ifdef SYS_DEBUG_FAULT_FILE_INFO
+#define C2kSysPcgEventRegister(PcgMask, EventType, module_id, message, Routine) \
+ __C2kSysPcgEventRegister(PcgMask, EventType, module_id, message, Routine, __MODULE__, __LINE__)
+extern void __C2kSysPcgEventRegister(kal_uint16 PcgMask, PcgEventTypeT EventType, module_type module_id, msg_type message, void (*Routine) (kal_uint32),
+ const char *ModuleName, unsigned line);
+#else
+extern void C2kSysPcgEventRegister(kal_uint16 PcgMask, PcgEventTypeT EventType, module_type module_id, msg_type message, void (*Routine) (kal_uint32));
+#endif
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimePcgEventRegister
+
+ DESCRIPTION:
+
+ This routine registers either a signal OR a callback function associated
+ with a PCG trigger at an defined action time. This is done with a special
+ callback at the set action time which then logs the PCG event in the
+ appropriate PCG event queue.
+
+ NOTE: If this Routine function is called in HRT domain, only be allowed in frame/PCG/slot tick.
+
+ PARAMETERS:
+
+ ActionTime - Action time to insert PCG event callback routine into the time queue
+ PcgMask - System Timer event mask to identify which PCG(s) to trigger event
+ EventType - Continuous periodic or single PCG event types.
+ Module_id - Module ID of task to send signal.
+ Signal - Signal to send.
+ Routine - Call back routine when action time is reached
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+#ifdef SYS_DEBUG_FAULT_FILE_INFO
+#define C2kSysTimePcgEventRegister(ActionTime, PcgMask, EventType, module_id, message, Routine) \
+ __C2kSysTimePcgEventRegister(ActionTime, PcgMask, EventType, module_id, message, Routine, __MODULE__, __LINE__)
+extern void __C2kSysTimePcgEventRegister(kal_uint32 ActionTime, kal_uint16 PcgMask, PcgEventTypeT EventType, module_type module_id, msg_type message, void (*Routine) (kal_uint32),
+ const char *ModuleName, unsigned line);
+#else
+extern void C2kSysTimePcgEventRegister(kal_uint32 ActionTime, kal_uint16 PcgMask, PcgEventTypeT EventType, module_type module_id, msg_type message, void (*Routine) (kal_uint32));
+#endif
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysPcgEventRegisterCancel
+
+ DESCRIPTION:
+
+ This routine cancels the signal OR callback that is registered at a specified
+ PCG event.
+
+ NOTE: Input parameters must match those used when SysEventRegister was called
+ originally. This function would normally be used to clear a PCG event which
+ is generated continuously/periodically - single PCG events clear themselves.
+
+ NOTE: If this Routine function is called in HRT domain, only be allowed in frame/PCG/slot tick.
+
+ PARAMETERS:
+
+ PcgMask - System Timer event mask to identify which PCG(s) to clear event
+ Module_id - Module ID of task to send signal.
+ Signal - Signal to send.
+ Routine - Call back routine when action time is reached
+
+ RETURNED VALUES:
+
+ kal_boolean flag indicating operation status.
+ Returns KAL_TRUE if action cancelled successfully.
+ Returns KAL_FALSE if specified action not found in PCG event queue.
+
+*****************************************************************************/
+#ifdef SYS_DEBUG_FAULT_FILE_INFO
+#define C2kSysPcgEventRegisterCancel(PcgMask, module_id, message, Routine) \
+ __C2kSysPcgEventRegisterCancel(PcgMask, module_id, message, Routine, __MODULE__, __LINE__)
+extern kal_bool __C2kSysPcgEventRegisterCancel(kal_uint16 PcgMask, module_type module_id, msg_type message, void (*Routine) (kal_uint32),
+ const char *ModuleName, unsigned line);
+#else
+extern kal_bool C2kSysPcgEventRegisterCancel(kal_uint16 PcgMask, module_type module_id, msg_type message, void (*Routine) (kal_uint32));
+#endif
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeIntReg
+
+ DESCRIPTION:
+
+ This routine register systime related IRQ
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+
+extern void SysTimeIntReg(void);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeGet
+
+ DESCRIPTION:
+
+ Frame number updating in Gen93 is at frame boudary but not like Gen91 at PCG0 IRQ.
+
+ To maintain meaning of this Routine return value, the returned frame number should
+ consider frame-offset.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ kal_uint32 - System time variable is returned.
+
+*****************************************************************************/
+extern kal_uint32 SysTimeGet(void);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeGetWithoutOffset
+
+ DESCRIPTION:
+
+ This routine gets a copy of the 1X system time variable which is not including
+ frame-offset.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ kal_uint32 - System time variable is returned.
+
+*****************************************************************************/
+extern kal_uint32 SysTimeGetWoOffset(void);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeGetFine
+
+ DESCRIPTION:
+
+ This routine returns the current system time with finer resolution,
+ nominally 1.25 ms resolution.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ Structure containing 36 bit resolution system time.
+
+*****************************************************************************/
+extern SysSystemTimeFineT SysTimeGetFine(void);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeLisr
+
+ DESCRIPTION:
+
+ This routine is the Lisr for system time. It increments
+ the system time variable and then determines if an action
+ is equal to the new system time. If so the HISR routine
+ is activated.
+
+ PARAMETERS:
+
+ StIntSrc - System Time Block Interrupt Source register contents at time of
+ interrupt.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysTimeLisr(kal_uint32 StIntSrc, kal_uint8 AirInterface);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysInit
+
+ DESCRIPTION:
+
+ This routine initializes system time variables.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysInit(void);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysEnableTxSignal
+
+ DESCRIPTION:
+
+ This routine controls the sending of the Tx signal to any tasks registered
+ using the SysRegisterTxSignal routine.
+
+
+ PARAMETERS:
+
+ TxSigPeriod - Sets rate at which Tx signal occurs.
+ TxSigStartFrame - Sets which sub-20ms frame the first Tx signal occurs in.
+ Parameter is relative to the 20 ms frame. This is ignored
+ for a 20 ms frame. Note this is valid for the first Tx
+ Signal; after the first one interrupts occur at each (sub)frame.
+
+ Note: Tx signal interrupt is configured for a constant number of ms before
+ the frame.
+
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysEnableTxSignal(SysTxSignalPeriodT TxSigPeriod,
+ SysTxSignalStartFrameT TxSigStartFrame,
+ kal_uint8 PcgIdx);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysDisableTxSignal
+
+ DESCRIPTION:
+
+ This routine disables the sending of the Tx signal to any tasks registered
+ using the SysRegisterTxSignal routine.
+
+
+ PARAMETERS:
+
+ None.
+
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysDisableTxSignal(void);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysEnableTimerSync
+
+ DESCRIPTION:
+
+ This routine enables/disables the synchronization of the CTS/DTS timers
+ with the System Timer. When enabled the System Timer block controls the
+ rollover of the CTS Timer. On disable, the CTS timer is set to rollover
+ at 20 ms, but not synced to the System Timer.
+
+ PARAMETERS:
+
+ Enable - KAL_TRUE for enable, KAL_FALSE for disable.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+#define SysEnableTimerSync(Enable)
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysSetFrameSize
+
+ DESCRIPTION:
+
+ This routine sets the System Timer block hardware to produce interrupts
+ corresponding to either a 20 ms or 26 ms period.
+
+ PARAMETERS:
+
+ FrameSize - Either 20 or 26 ms frames.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysSetFrameSize(SysFrameSizeT FrameSize);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysCtsCallbackClear
+
+ DESCRIPTION: Clears out all instances of the specified function from the
+ CTS callback routine .
+
+ PARAMETERS: CallbackPtr - routine to clear out of callback queue
+
+ RETURNED VALUES: None
+
+*****************************************************************************/
+#define SysCtsCallbackClear(CallbackPtr)
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysCtsRegisterCallback
+
+ DESCRIPTION: Provides a callback after the specified delay. The delay
+ is generated by using the hardware frame counter to
+ determine the current time, and then programming a single
+ shot strobe to occur after the specified delay.
+
+ Notes:
+ 1) Assumes frame time is 20 ms.
+ 2) Contains overrun checking.
+
+ PARAMETERS: DelayMs - Delay in ms.
+ CallbackPtr - Function to call after the delay.
+
+ RETURNED VALUES: Flag indicating if a callback was scheduled successfully.
+ KAL_TRUE: Callback scheduled.
+ KAL_FALSE: NO CTS Timers available, callback NOT scheduled.
+
+*****************************************************************************/
+#define SysCtsRegisterCallback(DelayMs, CallbackPtr)
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysCtsRegisterCallbackUsec
+
+ DESCRIPTION: Provides a callback after the specified delay. The delay
+ is generated by using the hardware frame counter to
+ determine the current time, and then programming a single
+ shot strobe to occur after the specified delay.
+
+ Notes:
+ 1) Contains overrun checking.
+ 2) Minimum delay of 100usec is required due to resolution
+ of 80kHz counter value.
+ 3) Resolution of 80kHz timer effectively "truncates" usec callbacks
+ to units of 12.5usec ticks.
+ 4) Specifying the LISR context will cause the system to crash if
+ the registered callback attempts to use any EXE/RTOS functionality
+ (e.g. - Intertask messagings/signals or MonFaults) This should
+ ONLY be used for time-critical operations that does not involve
+ the RTOS.
+
+ PARAMETERS: DelayUsec - Delay in usec.
+ Context - Context in which to execute callback (i.e., LISR or HISR)
+ CallbackPtr - Function to call after the delay.
+
+ RETURNED VALUES: Flag indicating if a callback was scheduled successfully.
+ KAL_TRUE: Callback scheduled.
+ KAL_FALSE: NO CTS Timers available, callback NOT scheduled.
+
+*****************************************************************************/
+#define SysCtsRegisterCallbackUsec(DelayUsec, Context, CallbackPtr)
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysCtsRegisterCallbackAbs
+
+ DESCRIPTION: Provides a callback when the hardware frame counter reaches
+ the specified value. This is implemented by programming a
+ single shot strobe to occur at the specified count.
+
+ Notes:
+ 1) Assumes frame time is 20 ms.
+ 2) Contains overrun checking.
+ 3) Uses same CTS as SysCtsRegisterCallbackDly
+
+
+ PARAMETERS: AbsCount - Frame counter value to generate callback
+ CallbackPtr - Function to call after the delay.
+
+ RETURNED VALUES: None
+
+*****************************************************************************/
+#define SysCtsRegisterCallbackAbs(AbsCount, CallbackPtr)
+
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeReset
+
+ DESCRIPTION:
+
+ This routine re-initializes system time variables and clears all callback
+ queues.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysTimeReset(void);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeDataGet
+
+ DESCRIPTION:
+
+ This routine retrieves the current system time data including the 38 bit
+ system time in 20 ms units and the other information most recently received
+ in the sync channel message.
+
+ PARAMETERS:
+
+ TimeDataP - Pointer to Time data structure to fill in with current data.
+
+ RETURNED VALUES:
+
+ kal_bool - KAL_TRUE if valid data was filled in. KAL_FALSE if valid data does NOT exist.
+
+*****************************************************************************/
+extern kal_bool SysTimeDataGet(SysTimeDataT *TimeDataP);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeSync
+
+ DESCRIPTION:
+
+ This routine is used to synchronize the system time variables received on
+ the sync channel with the data stored by SYS.
+
+ PARAMETERS:
+
+ LpSec : Leap seconds as received in sync channel message.
+ LtmOff : Local time offset as received in sync channel message
+ (units of signed 30 min).
+ DayLt : Daylight savings time kal_boolean flag.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysTimeSync(kal_uint8 *FullSystemTimeP,
+ kal_uint8 LpSec,
+ kal_int8 LtmOff,
+ kal_bool DayLt);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeUpper6BitsGet
+
+ DESCRIPTION:
+
+ This routine retrieves the upper 6 bits of the current system time kept in
+ 20 ms units, making the full system time 38 bits.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ Upper 6 bits of system time (right justified in the 8 bits returned).
+
+*****************************************************************************/
+extern kal_uint8 SysTimeUpper6BitsGet(void);
+
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeFullGet
+
+ DESCRIPTION:
+
+ This routine retrieves the current system time in 80 ms units.
+ It is returned in the same format as that received on the sync channel,
+ 36 bits contained in a five byte array with the data left justified.
+
+
+
+ PARAMETERS:
+
+ FullSystemTimeP - Pointer to 5 byte array for return data.
+
+ RETURNED VALUES:
+
+ Format:
+ FullSystemTimeP[0] => Current System Time, bits 35-28
+ FullSystemTimeP[1] => Current System Time, bits 27-20
+ FullSystemTimeP[2] => Current System Time, bits 19-12
+ FullSystemTimeP[3] => Current System Time, bits 11-4
+ FullSystemTimeP[4] => Current System Time, bits 3-0
+ (contained in bits 7-4 of this byte)
+
+
+*****************************************************************************/
+extern void SysTimeFullGet(kal_uint8 *FullSystemTimeP);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeDataCopy
+
+ DESCRIPTION:
+
+ PARAMETERS:
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysTimeDataCopy(SysAirInterfaceT AirInterface);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeDataFlush
+
+ DESCRIPTION:
+
+ PARAMETERS:
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysTimeDataFlush(SysAirInterfaceT AirInterface);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTime32BitTimeCalc
+
+ DESCRIPTION:
+
+ This routine calculates the system time in 20 ms, given the system
+ time in sync channel message format (36 bits in 80 ms units, left
+ justified) and returns the lower 32 bits of the calculated value.
+
+
+
+ PARAMETERS:
+
+ FullSystemTimeP - Pointer to 5 byte system time array.
+ Format:
+ FullSystemTimeP[0] => Current System Time, bits 35-28
+ FullSystemTimeP[1] => Current System Time, bits 27-20
+ FullSystemTimeP[2] => Current System Time, bits 19-12
+ FullSystemTimeP[3] => Current System Time, bits 11-4
+ FullSystemTimeP[4] => Current System Time, bits 3-0
+ (contained in bits 7-4 of this byte)
+
+ RETURNED VALUES:
+
+ Lower 32 bits of system time in 20 ms units.
+
+*****************************************************************************/
+extern kal_uint32 SysTime32BitTimeCalc(kal_uint8 *FullSystemTimeP);
+
+
+
+/*****************************************************************************
+
+ FUNCTION : SysTime2Secs
+
+ DESCRIPTION:Converts system time data into number of seconds since
+ the beginning of System Time. System time data includes
+ local time offset, leap seconds, and daylight savings time
+ indicator.
+
+ PARAMETERS: TimeDataP
+
+ !!!!IMPORTANT!!!!
+ TimeDataP must be initialized by SysTimeDataGet(TimeDataP).
+ In other words, SysTimeDataGet(TimeDataP) must be called
+ right before this function.
+
+ RETURNS: kal_uint32 - Number of seconds since start of System Time.
+ Returns 0xFFFFFFFF if not valid.
+
+ ***********************************************************************
+ * NOTE: THIS FUNCTION WILL NOT RETURN CORRECT VALUES FOR SYSTEM TIMES *
+ * CORRESPONDING TO A DATE LATER THAN FEB 12, 2067 (1X) or *
+ * 31 DEC, 2115 (DO). *
+ * SEE EMBEDDED COMMENTS IN THIS FUNCTION FOR MORE DETAILS. *
+ ***********************************************************************
+
+*****************************************************************************/
+extern SysCalendarTimeDataT SysTime2Secs(SysTimeDataT* SysTimeData);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysCallbackRegister
+
+ DESCRIPTION:
+
+ This routine registers either a signal OR a call back function associated
+ with an action time or Slot/PCG in the system time queue. The system time
+ queue contains an order list of all action times and contains Slot masks
+ without order.
+
+ NOTE: 1. The Routine function pointer MUST be set to NULL to cause a message to be sent.
+ 2. If this Routine function is called in HRT domain, only be allowed in frame/PCG/slot tick.
+
+ PARAMETERS:
+
+ ActionTime - Action time
+ SlotMask - System Timer event mask to identify which Slot(s) to trigger event
+ TagType - Identify the Air interface with Quese operation for Transition such as Flush or Keep.
+ Type - Signal type such as single or periodic shot.
+ Module_id - Module ID of task to send signal.
+ Signal - Signal to send.
+ Routine - Call back routine when action time is reached
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+#ifdef SYS_DEBUG_FAULT_FILE_INFO
+#define C2kSysCallbackRegister(ActionTime, SlotNum, TagType, EventType, module_id, message, Routine) \
+ __C2kSysCallbackRegister(ActionTime, SlotNum, TagType, EventType, module_id, message, Routine, __MODULE__, __LINE__)
+extern kal_bool __C2kSysCallbackRegister(kal_uint32 ActionTime, kal_uint16 SlotNum, SysTagTypeT TagType,
+ SysEventTypeT EventType, module_type module_id, msg_type message,
+ void (*Routine) (kal_uint32),
+ const char *ModuleName, unsigned line);
+#else
+extern kal_bool C2kSysCallbackRegister(kal_uint32 ActionTime, kal_uint16 SlotNum, SysTagTypeT TagType,
+ SysEventTypeT EventType, module_type module_id, msg_type message,
+ void (*Routine) (kal_uint32));
+#endif
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysCallbackRegisterCancel
+
+ DESCRIPTION:
+
+ This routine registers either a signal OR a call back function associated
+ with an action time or Slot in the system time queue. The system time queue contains
+ an order list of all action times and contains Slot mask without order.
+
+ NOTE: 1. The Routine function pointer MUST be set to NULL to cause a message to be sent.
+ 2. If this Routine function is called in HRT domain, only be allowed in frame/PCG/slot tick.
+
+ PARAMETERS:
+
+ ActionTime - Action time
+ SlotMask - System Timer event mask to identify which Slot(s) to trigger event
+ TagType - Identify the Air interface with Quese operation for Transition such as Flush or Keep.
+ Module_id - Module ID of task to send signal.
+ Signal - Signal to send.
+ Routine - Call back routine when action time is reached
+
+ RETURNED VALUES:
+
+ kal_boolean flag indicating operation status.
+ Returns KAL_TRUE if action cancelled successfully.
+ Returns KAL_FALSE if specified action not found in registration queue.
+
+ Note: Input paramters must match those used when SysCallbackRegister was called
+ originally.
+
+*****************************************************************************/
+#ifdef SYS_DEBUG_FAULT_FILE_INFO
+#define C2kSysCallbackRegisterCancel(ActionTime, SlotNum, TagType, EventType, module_id, message, Routine) \
+ __C2kSysCallbackRegisterCancel(ActionTime, SlotNum, TagType, EventType, module_id, message, Routine, __MODULE__, __LINE__)
+extern kal_bool __C2kSysCallbackRegisterCancel(kal_uint32 ActionTime, kal_uint16 SlotNum, SysTagTypeT TagType,
+ SysEventTypeT EventType, module_type module_id, msg_type message,
+ void (*Routine) (kal_uint32),
+ const char *ModuleName, unsigned line);
+#else
+extern kal_bool C2kSysCallbackRegisterCancel(kal_uint32 ActionTime, kal_uint16 SlotNum, SysTagTypeT TagType,
+ SysEventTypeT EventType, module_type module_id, msg_type message,
+ void (*Routine) (kal_uint32));
+#endif
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeCbOperation
+
+ DESCRIPTION:
+
+ This routine executes in message deliver HISR to run the systime CB operation which is called in HRT domain;
+
+ NOTE: If systime CB operation is called in HRT domain, only be allowed in frame/PCG/slot tick.
+
+ PARAMETERS:
+
+ Ptr - Pointer to the parameters
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void SysTimeCbOperation(kal_uint8* Ptr);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysDoTimeGet
+
+ DESCRIPTION:
+
+ This routine gets a copy of the system time variable as 26msec unit.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ kal_uint32 - System time variable is returned.
+
+*****************************************************************************/
+extern kal_uint32 SysDoTimeGet( kal_bool useFrameOffset );
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysDoTimeGetSubframe
+
+ DESCRIPTION:
+
+ Returns Subframe: a 0-11 subframe count for an 80ms interval.
+
+ PARAMETERS:
+
+ UseFrameOffset: Set to KAL_TRUE to subtrace FrameOffset from the SYS unit hardware subframe.
+
+ RETURNED VALUES:
+ kal_int8
+
+*****************************************************************************/
+extern kal_int8 SysDoTimeGetSubframe( kal_bool UseFrameOffset );
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysDoTimeInSlotGet
+
+ DESCRIPTION:
+
+ This routine returns the current system time in units of slots.
+ Slots are 1.66ms duration.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ Structure containing 36 bit resolution system time.
+
+*****************************************************************************/
+extern kal_uint64 SysDoTimeInSlotGet( kal_bool UseFrameOffset );
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysDoTimeUpdateLtfLps
+
+ DESCRIPTION:
+
+ This routine writes the LeapSecs and LocalTimeOffset into global structure
+ SysTimeData.
+
+ PARAMETERS:
+
+ FrameOffset - in units of slots
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysDoTimeUpdateLtfLps(kal_uint8 LpSec, kal_uint16 LtmOff);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeStatusUpdate
+
+ DESCRIPTION:
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysTimeStatusUpdate(SysAirInterfaceT AirInterface, kal_uint8 UpdateReason);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysDoTimeFullSet
+
+ DESCRIPTION:
+
+ This routine sets the current system time.
+
+ PARAMETERS:
+
+ FrameRecT FullSystemTime - Structure to 37 bits input system time array.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysDoTimeFullSet(FrameRecT FullSystemTime);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysDoTimeFullGet
+
+ DESCRIPTION:
+
+ Returns:
+ - frame count in units of 26.66ms frame
+ - subframe count within 26.66ms frame [0-3]
+ - slot count within 26.66ms frame [0-15]
+ - symbol number within 26.66ms frame [0-511]
+
+ PARAMETERS:
+
+ none
+
+ RETURNED VALUES:
+ See SysTimeFullT in sysapi.h
+
+*****************************************************************************/
+extern SysTimeFullT SysDoTimeFullGet(kal_bool UseFrameOffset);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysSetFrameOffset
+
+ DESCRIPTION:
+
+ This routine sets C2K modem's frame offset
+
+ PARAMETERS:
+
+ AirInterface - 1X or DO
+ FrameOffset - in units of slots
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysSetFrameOffset(SysAirInterfaceT AirInterface, kal_uint8 FrameOffset);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysGetFrameOffset
+
+ DESCRIPTION:
+
+ This routine gets C2K modem's frame offset
+
+ PARAMETERS:
+
+ AirInterface - 1X or DO
+
+
+ RETURNED VALUES:
+
+ FrameOffset - in units of slots
+
+*****************************************************************************/
+extern kal_uint8 SysGetFrameOffset(SysAirInterfaceT AirInterface);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeSymbNum
+
+ DESCRIPTION:
+ Returns the Symbol count [0-0x5FF] if AirInterface==SYS_MODE_EVDO. (wraps 80ms)
+ Returns 0 if AirInterface== SYS_MODE_1xRTT. (wraps 80ms)
+
+ PARAMETERS:
+
+ StIntSrc - Current setted Interrupt Mask.
+
+ RETURNED VALUES:
+
+*****************************************************************************/
+extern kal_uint16 CphSysTimeSymbNum(SysAirInterfaceT Airinterface);
+#define SysTimeSymbNum(AirInterface) CphSysTimeSymbNum(AirInterface)
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTime9MHzCnt
+
+ DESCRIPTION:
+ Returns the 9MHz SystemTime count of the corresponding AirInterface
+
+ PARAMETERS:
+
+ StIntSrc - Current setted Interrupt Mask.
+
+ RETURNED VALUES:
+
+*****************************************************************************/
+extern kal_uint32 CphSysTimeEchipCnt(SysAirInterfaceT Airinterface);
+#define SysTime9MHzCnt(AirInterface) CphSysTimeEchipCnt(AirInterface)
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysFrameCntGet
+
+ DESCRIPTION:
+
+ PARAMETERS:
+ Return Upper8 and Lower 32 Frame Cnt (NO Frame Offset for EVDO!)
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysFrameCntGet(kal_uint8 AirInterfaceBM, FrameRecT* FrameCntP);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeRemove
+
+ DESCRIPTION:
+
+ This routine requests removes system time from active list.
+
+ PARAMETERS:
+
+ SysAirInterfaceT AirInterface
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysTimeRemove(SysAirInterfaceT AirInterface);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeSwitchControl
+
+ DESCRIPTION:
+
+ This routine requests adds/removes systime for the system.
+
+ PARAMETERS:
+
+ SysAirInterfaceT NewAirInterface
+ kal_bool Enable
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+kal_uint8 SysTimeSwitchControl(SysAirInterfaceT NewAirInterface, kal_bool Enable);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysFrameCountGet
+
+ DESCRIPTION: This function feels the 1X and DO time.
+
+ PARAMETERS:
+ Return
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysFrameCountGet(void* pSysTime);
+
+extern void CphSysStIntDisable (SysAirInterfaceT Airinterface, kal_uint16 Mask);
+extern void CphSysStIntEnable (SysAirInterfaceT Airinterface, kal_uint16 Mask);
+#define SysStIntDisable(AirInterface, Mask) CphSysStIntDisable(AirInterface,Mask)
+#define SysStIntEnable(AirInterface, Mask) CphSysStIntEnable(AirInterface,Mask)
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysAirInterfaceGet
+
+ DESCRIPTION:
+
+ PARAMETERS:
+
+ RETURNED VALUES:
+ return SYS_MODE_1xRTT or SYS_MODE_EVDO
+
+ None.
+
+*****************************************************************************/
+extern kal_uint8 SysAirInterfaceGet(void);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeSetFreqOffset
+
+ DESCRIPTION:
+
+ PARAMETERS: Airinterface - 1X or DO
+ AfcPpb - in unit of ppb, if AfcPpb>0, this setting will
+ increase chip-rate of Rx timer; else, decrease it.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysTimeSetFreqOffset(SysAirInterfaceT Airinterface, kal_int16 AfcPpb);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeGetFreqOffset
+
+ DESCRIPTION:
+
+ PARAMETERS:
+
+ RETURNED VALUES:
+
+ Return the frequency offset of Rx timer usage.
+
+*****************************************************************************/
+extern kal_int16 SysTimeGetFreqOffset(SysAirInterfaceT Airinterface);
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeSyncTime
+
+ DESCRIPTION: This Routine will implement the sys time big jump.
+ For ICS/Sync Reception/Cross copy/SIB8 timing
+
+ PARAMETERS: Airinterface: 1X or DO
+ SyncEchip: the terminal e-chip count to restart counting
+ EchipIni: e-chip count initial value
+ SupfrmIniH/SupfrmIniL: super frame count synchronization initial value
+
+ RETURNED VALUES:
+ return SYS_MODE_1xRTT or SYS_MODE_EVDO
+
+ None.
+
+*****************************************************************************/
+extern void SysTimeSyncTime(SysAirInterfaceT Airinterface, kal_uint32 SyncEchip, kal_uint32 EchipIni, kal_uint8 SupfrmIniH, kal_uint32 SupfrmIniL);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: Sys9MHzCntInitReq
+
+ DESCRIPTION: Uses the hardware 1X System time count to initialize the
+ hardware DO System time count
+ Note: Can do : 1X time -> DO time.
+ CanNOT do: DO time -> 1X time
+
+ PARAMETERS: AckRequired:
+ KAL_TRUE : INSP_1XASSIST_DOACQ_MSG or some form of acknowledgement
+ will be sent upon successful completion of this request.
+ KAL_FALSE: No acknowledgement will be sent to indicate completion of
+ request.
+
+ RETURNED VALUE:
+ KAL_TRUE : 1X system time can be used to initialize DO system time.
+ KAL_FALSE: 1X system time cannot be used to initialize DO system time.
+
+*****************************************************************************/
+extern kal_bool Sys9MHzCntInitReq(kal_bool AckRequired);
+
+/*****************************************************************************
+
+ FUNCTION NAME: Sys9MHzCntInitProcess
+
+ DESCRIPTION: Thie Routine executes in PCG handler
+
+ PARAMETERS: NONE
+
+ RETURNED VALUE:
+ NONE
+
+*****************************************************************************/
+extern void Sys9MHzCntInitProcess(void);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeValid
+
+ DESCRIPTION:
+
+ Inquire whether the AirInterface has valid or invalid system time.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ KAL_TRUE: valid system time. KAL_FALSE: invalid system time.
+
+*****************************************************************************/
+extern kal_uint8 SysTimeValid(kal_uint8 AirInterfaceBM);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeCurrent
+
+ DESCRIPTION:
+
+ Inquire whether the AirInterface has current system time.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ KAL_TRUE: valid system time. KAL_FALSE: invalid system time.
+
+*****************************************************************************/
+extern kal_bool SysTimeCurrent(kal_uint8 AirInterfaceBM);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTimeTotalGet
+
+ DESCRIPTION:
+
+ This routine returns full time including super-frame / e-chip.
+
+ PARAMETERS:
+
+ AirInterface - 1X or DO
+ SFramePtr - pointer to the returned full time
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void SysTimeTotalGet(SysAirInterfaceT AirInterface, SysSFrameTimeT * SFramePtr);
+
+
+#if defined (MTK_DEV_C2K_IRAT) && defined (MTK_DEV_C2K_SRLTE_L1)
+/*****************************************************************************
+
+ FUNCTION NAME: SysSFrameGet
+
+ DESCRIPTION:
+
+ PARAMETERS: AirInterface: 1X or DO
+ Curr: Return curr super frame num or not
+ CheckFrameLo32: If Curr=KAL_FALSE, Return super frame num of CheckFrameLo32
+
+ Return Lower 32 Super Frame Cnt
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern kal_uint64 SysSFrameGet(SysAirInterfaceT AirInterface, kal_bool Curr, kal_uint32 CheckFrameLo32);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysSFrameGetWith9M
+
+ DESCRIPTION: Get correct super frame numer with giving 9M Cnt
+
+ PARAMETERS: AirInterface: 1X or DO
+ Check9M: given 8X clock cnt of system time
+
+ Return Lower 32 of Super Frame Cnt
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern kal_uint64 SysSFrameGetWith9M(SysAirInterfaceT AirInterface, kal_uint32 Check9M);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysFrameSizeIs26ms
+
+ DESCRIPTION:
+
+ PARAMETERS:
+
+ RETURNED VALUES:
+ return Frame size type
+ KAL_TRUE: is 80/3 ms
+ KAL_FALSE: is 20 ms
+
+ None.
+
+*****************************************************************************/
+extern kal_bool SysFrameSizeIs26ms(SysAirInterfaceT AirInterface);
+
+
+extern void SysUpdateSysTime(SysAirInterfaceT AirInterface);
+
+#endif
+
+extern sap_type SysGetSapIdHisr(module_type src,module_type dest);
+
+
+/****************************************************************************
+
+ FUNCTION NAME: EndianSwap
+
+ DESCRIPTION:
+
+ This function is used to convert
+ unsigned integers from Big endian format to Little endian format and vice-versa.
+
+ PARAMETERS:
+
+ kal_uint8 *input Input that needs to be endian-swapped, in-place.
+ kal_uint8 numOfBytes Number of bytes
+
+ RETURNED VALUES:
+
+ KAL_TRUE if numOfBytes is 2,4,8 KAL_FALSE otherwise. This is because we have
+ 16,32 and 64 bit integers only in our S/W.
+
+*****************************************************************************/
+kal_bool EndianSwap( kal_uint8* input , kal_uint8 numOfBytes);
+
+/****************************************************************************
+
+ FUNCTION NAME: CP_Strnlen
+
+ DESCRIPTION:
+
+ This function is used to return the length of a "C" Style string (NULL
+ Terminated). The max length returned is capped at MAX_LENGTH parameter
+ which means that if the string is of size greater than MAX_LENGTH, further
+ calculation of the string's length is stopped and MAX_LENGTH is returned,
+ hence the name CP_Str **n** len.
+
+ PARAMETERS:
+
+ char *str Input string that needs to be used
+ kal_uint32 MAX_LENGTH Max length to be returned
+
+ RETURNED VALUES: the length of the string if its less than or equal to MAX_LENGTH
+ else MAX_LENGTH is returned.
+
+*****************************************************************************/
+kal_uint32 CP_Strnlen( char *str, kal_uint32 MAX_LENGTH);
+
+/****************************************************************************
+;
+; FUNCTION NAME: SysArmSleep
+;
+; DESCRIPTION:
+;
+; Puts Arm into light sleep using coprocessor. Any INT should wake
+; (SN bit does not work for CBP70 A0 so we use Arm968 light sleep)
+;
+;
+; PARAMETERS:
+;
+; None
+;
+; RETURNED VALUES:
+;
+; None.
+;
+*****************************************************************************/
+void SysArmSleep(void);
+
+/*****************************************************************************
+;
+; FUNCTION NAME: SysArmModeRegs
+;
+; DESCRIPTION:
+;
+; Stores the Arm mode regs (CPSR, SP, LR, SPSR) for 5 Arm modes
+; (supervisor, FIQ, IRQ, Undef, Abort, Sytem). User mode does not have
+; its own mode specific registers.
+;
+; This function should only be used during crash dump.
+;
+; C FUNCTION PROTOTYPE:
+;
+; void SysArmModeRegs(MonExceptArmModeRegs* pRegs);
+; Use kal_uint32* so we don't need definition of MonExceptArmModeRegs
+;
+; PARAMETERS:
+;
+; pRegs (r0), pointer to array of 6 MonExceptArmModeRegs
+;
+; RETURNED VALUES:
+;
+; None.
+;
+;*****************************************************************************/
+void SysArmModeRegs(kal_uint32* pRegs);
+
+/****************************************************************************
+ *
+ * Name: sysIsBandSupported()
+ *
+ * Description: This routine validates the band by examining the allowed
+ * operation modes as set by teh compile time switches in
+ * custom.h.
+ *
+ * Parameters: SysCdmaBandT band - band to be validated
+ *
+ * Returns: kal_bool - KAL_TRUE if the band is supported
+ *
+ * Notes:
+ *
+ ****************************************************************************/
+kal_bool sysIsBandSupported(SysCdmaBandT band);
+
+
+/****************************************************************************
+ *
+ * Name: sysFrequencyToBlock()
+ *
+ * Description: This routine finds the block for the given channel.
+ *
+ * Parameters: SysCdmaBandT band - band channel is in
+ * kal_uint16 channel - channel for which block is to be found
+ *
+ * Returns: kal_uint8 - PCS block
+ *
+ * Notes: A liberal range is used for channel numbers since this is
+ * not validating the channels, only selecting a system.
+ *
+ ****************************************************************************/
+kal_uint8 sysFrequencyToBlock(SysCdmaBandT band, kal_uint16 channel);
+
+/****************************************************************************
+ *
+ * Name: sysFrequencyToSubClass()
+ *
+ * Description: This routine finds the subclass for the given channel.
+ *
+ * Parameters: SysCdmaBandT band - band channel is in
+ * kal_uint16 channel - channel for which block is to be found
+ *
+ * Returns: kal_uint8 - Subclass
+ *
+ ****************************************************************************/
+kal_uint8 sysFrequencyToSubClass(SysCdmaBandT band, kal_uint16 channel);
+
+/****************************************************************************
+ *
+ * Name: sysIsBandChannelValid()
+ *
+ * Description: This routine validates a given channel against the given
+ * band, based on Standard band definion only.
+ * It DOES NOT consider hardware, including possible hwd
+ * band SubClass limitation.
+ *
+ * Parameters: BandChannel *bandChannel - band and channel to validate
+ *
+ * Returns: kal_bool - KAL_TRUE if channel is valid within the band
+ *
+ * Notes:
+ *
+ ****************************************************************************/
+kal_bool sysIsBandChannelValid(SysBandChannelT *bandChannel);
+
+/****************************************************************************
+ *
+ * Name: sysSupportCDMAChannel()
+ *
+ * Description: This routine determines if the provided band and channel
+ * are supported and valid.
+ *
+ * Parameters: BandChannel *bandChannel - band and channel
+ *
+ * Returns: kal_bool - KAL_TRUE if the band is supported and the channel is valid
+ *
+ * Notes:
+ *
+ ****************************************************************************/
+kal_bool sysIsBandChannelSupported(SysBandChannelT *bandChannel);
+
+/*****************************************************************************
+
+ FUNCTION NAME: sysSOServiceType
+
+ DESCRIPTION:
+
+ This routine returns the service type for the passed Service option.
+
+ PARAMETERS:
+
+ SysServiceOptionT serviceOption
+
+ RETURNED VALUES:
+
+ SysServiceTypeT service type (e.g. VOICE, PACKET_DATA, etc...)
+
+*****************************************************************************/
+SysServiceTypeT sysSOServiceType(SysServiceOptionT serviceOption);
+
+/*****************************************************************************
+
+ FUNCTION NAME: sysLoopbackSvcType
+
+ DESCRIPTION:
+
+ This routine returns the service subtype for a loopback Service option.
+
+ PARAMETERS:
+
+ SysServiceOptionT serviceOption
+
+ RETURNED VALUES:
+
+ SysLoopbackSvcTypeT service sub type (IS126, Markov, TDSO)
+
+*****************************************************************************/
+SysLoopbackSvcTypeT sysLoopbackSvcType(SysServiceOptionT serviceOption);
+
+/*****************************************************************************
+
+ FUNCTION NAME: sysCircuitDataSvcType
+
+ DESCRIPTION:
+
+ This routine returns the service subtype for a cicuit data Service option.
+
+ PARAMETERS:
+
+ SysServiceOptionT serviceOption
+
+ RETURNED VALUES:
+
+ SysCircuitDataSvcTypeT service sub type (Async, Fax)
+
+*****************************************************************************/
+SysCircuitDataSvcTypeT sysCircuitDataSvcType(SysServiceOptionT serviceOption);
+
+/*****************************************************************************
+
+ FUNCTION NAME: sysPacketDataSvcType
+
+ DESCRIPTION:
+
+ This routine returns the service subtype for a packet data Service option.
+
+ PARAMETERS:
+
+ SysPacketDataSvcTypeT serviceOption
+
+ RETURNED VALUES:
+
+ SysPacketDataSvcTypeT service sub type (LSPD, MSPD, HSPD)
+
+*****************************************************************************/
+
+SysPacketDataSvcTypeT sysPacketDataSvcType(SysServiceOptionT serviceOption);
+
+
+
+SysSoGrpT sysSOSvcGrp(kal_uint16 serviceOption);
+
+/*****************************************************************************
+
+ FUNCTION NAME: calcChecksum
+
+ DESCRIPTION:
+
+ Calculates the checksum for the data pointed to by ptrtodata whose size
+ is given by sizeofdata. The function also inverts the checksum before
+ returning it.
+
+ PARAMETERS:
+
+ kal_uint8 *ptrtodata - pointer to the data whose checksum has to be calc
+ kal_uint16 sizeofdata - size of the data whose checksum has to be calc
+ (this does not incl the checksum size)
+
+ RETURNED VALUES: Inverted checksum.
+
+*****************************************************************************/
+kal_uint16 calcChecksum(kal_uint8 *ptrtodata, kal_uint16 sizeofdata);
+
+/****************************************************************************
+ *
+ * Name: SysBondoutOptionGet ()
+ *
+ * Description: This routine returns the chip's bondout option configuration.
+ *
+ * Parameters: None
+ *
+ * Returns: SysBondoutOptionsT - Bondout option
+ *
+ ****************************************************************************/
+SysBondoutOptionsT SysBondoutOptionGet (void);
+
+/****************************************************************************
+ *
+ * Name: SysIsVoiceSupported()
+ *
+ * Description: This routine returns a kal_boolean indicating whether voice is
+ * supported based on the chip's bondout option configuration.
+ *
+ * Parameters: None
+ *
+ * Returns: KAL_TRUE if voice is supported, KAL_FALSE otherwise
+ *
+ ****************************************************************************/
+kal_bool SysIsVoiceSupported (void);
+
+
+/****************************************************************************
+ *
+ * Name: SysIsDORevASupported()
+ *
+ * Description: This routine returns a kal_boolean indicating whether or not EV-DO
+ * RevA is supported based on the chip's bondout option configuration.
+ *
+ * Parameters: None
+ *
+ * Returns: KAL_TRUE if EV-DO RevA is supported, KAL_FALSE otherwise
+ *
+ ****************************************************************************/
+kal_bool SysIsDORevASupported (void);
+
+/****************************************************************************
+ *
+ * Name: sysIsFeatureSupported()
+ *
+ * Description: This routine returns whether a system wide feature is
+ * supported.
+ *
+ * Parameters: SysFeatures Feature
+ *
+ * Returns: kal_bool - KAL_FALSE: Feature not supported
+ * KAL_TRUE: Feature supported
+ *
+ ****************************************************************************/
+kal_bool sysIsFeatureSupported(SysFeatureId Feature);
+
+
+/****************************************************************************
+ *
+ * Name: sysSWFeatureValue()
+ *
+ * Description: Returns an indication as to which variation of a software
+ * feature is supported.
+ *
+ * Parameters: SysFeatures Feature
+ *
+ * Returns:
+ *
+ ****************************************************************************/
+kal_uint32 sysSWFeatureValue(SysFeatureId Feature);
+
+/****************************************************************************
+ *
+ * Name: sysGetCarrierdId()
+ *
+ * Description: Returns the carrier Id for which the SW was compiled for
+ *
+ * Parameters: none
+ *
+ * Returns: SysCarrierId enum
+ *
+ ****************************************************************************/
+SysCarrierId sysGetCarrierId(void);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: SysTransitionReq
+
+ DESCRIPTION:
+
+ This routine requests transition from 1x to Do and vice versa.
+
+ PARAMETERS:
+
+ SysAirInterfaceT NewAirInterface
+ kal_bool HybridMode
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+kal_uint8 SysTransitionReq(SysAirInterfaceT NewAirInterface);
+
+
+
+/****************************************************************************
+ *
+ * Name: max8
+ *
+ * Scope: public
+ *
+ * Description: Returns the greater of two kal_uint8 values.
+ *
+ * Parameters:
+ * kal_uint8 a - First value.
+ * kal_uint8 b - Second value.
+ *
+ * Returns:
+ * kal_uint8
+ *
+ * Notes:
+ *
+ ****************************************************************************/
+kal_uint8 max8 (kal_uint8 a, kal_uint8 b);
+
+/****************************************************************************
+ *
+ * Name: min8
+ *
+ * Scope: public
+ *
+ * Description: Returns the lesser of two kal_uint8 values.
+ *
+ * Parameters:
+ * kal_uint8 a - First value.
+ * kal_uint8 b - Second value.
+ *
+ * Returns:
+ * kal_uint8
+ *
+ * Notes:
+ *
+ ****************************************************************************/
+kal_uint8 min8 (kal_uint8 a, kal_uint8 b);
+
+/****************************************************************************
+ *
+ * Name: max16
+ *
+ * Scope: public
+ *
+ * Description: Returns the greater of two kal_uint16 values.
+ *
+ * Parameters:
+ * kal_uint16 a - First value.
+ * kal_uint16 b - Second value.
+ *
+ * Returns:
+ * kal_uint16
+ *
+ * Notes:
+ *
+ ****************************************************************************/
+kal_uint16 max16 (kal_uint16 a, kal_uint16 b);
+
+/****************************************************************************
+ *
+ * Name: min16
+ *
+ * Scope: public
+ *
+ * Description: Returns the lesser of two kal_uint16 values.
+ *
+ * Parameters:
+ * kal_uint16 a - First value.
+ * kal_uint16 b - Second value.
+ *
+ * Returns:
+ * kal_uint16
+ *
+ * Notes:
+ *
+ ****************************************************************************/
+kal_uint16 min16 (kal_uint16 a, kal_uint16 b);
+
+/*****************************************************************************
+
+ FUNCTION NAME: C2KPerfRecovery
+
+ DESCRIPTION: flight mode recovery API
+
+ PARAMETERS: module_id: module id,such as MOD_CPSW
+ debug_info: the information to be printed
+ debug_length: the length of debug_info
+
+ RETURNED VALUES: None
+
+*****************************************************************************/
+void C2KPerfRecovery( module_type module_id, C2kSysRecoverDbgInfoT* debug_info,
+ const char* debug_file, kal_uint16 debug_line);
+
+/*****************************************************************************
+
+ FUNCTION NAME: C2K_PERF_RECOVERY
+
+ DESCRIPTION: C2K PERF recovery API
+
+ PARAMETERS: module_id: module id,such as MOD_CPSW
+ p_buffer: pointer to debug variable
+ buf_size: the size of debug variable
+
+ RETURNED VALUES: None
+
+*****************************************************************************/
+
+#define C2K_PERF_RECOVERY(module_id,p_buffer,buf_size) \
+{ \
+ protocol_exception_recovery_info_struct info; \
+ info.protocol_id = ((ValIratGetSimAccessIndex() >= UIM_IRAT_ACCESS_REMOTE_SIM1) && (ValIratGetSimAccessIndex() < UIM_IRAT_ACCESS_NUM)) \
+ ?(ValIratGetSimAccessIndex() - UIM_IRAT_ACCESS_REMOTE_SIM1):(PEFR_ALL_PROTOCOL_ID); \
+ info.debug.p_buf = (p_buffer); \
+ info.debug.size = (buf_size); \
+ PROTOCOL_EXCEPTION_RECOVERY((module_id), RECOVERY_TYPE_FLIGHT_MODE, &info); \
+}
+
+/****************************************************************************
+ *
+ * Name: waitForExtMsg
+ *
+ * Scope: public
+ *
+ * Description: Wait for an external message
+ *
+ * Parameters:
+ * kal_uint32 expMsgId - Id of the expected external message.
+ * ilm_struct *ilm - pointer to the received expected message.
+ *
+ * Returns:
+ * void
+ *
+ * Notes:
+ * Do NOT forget to destroy the expected ilm after calling this function
+ ****************************************************************************/
+extern void waitForExtMsg(kal_uint32 expMsgId, ilm_struct *ilm);
+
+
+extern void SysInitWaitEg(void);
+
+extern void SysInitSetEg(void);
+
+
+/*****************************************************************************
+
+ Empty MACRO stubbing for MON&HWD sleep
+
+*****************************************************************************/
+#define MonDeepSleepStatistInit(SetDefaultCheckLength)
+#define MonDeepSleepStatistCtrlMsg(CheckLengthP)
+#define MonDeepClearSleepRecordInfo()
+#define MonDeepReadSleepRecordInfo(SleepCnts,MdSystemTime1,MdSystemTime2,MdRtcCnts,AllSleepduration)
+#define MonDeepRecordRtcCntOfEnterSleep()
+#define MonDeepRecordTotalSleepDuration()
+#define MonDeepRecordSystimeOfExitSleep()
+
+#endif
+
+/*****************************************************************************
+ * removed!
+*****************************************************************************/
+
+/**Log information: \main\CBP80\cbp80_cshen_scbp10098\1 2012-07-26 06:27:42 GMT cshen
+** cbp80_cshen_scbp10098**/
+/**Log information: \main\Trophy\Trophy_czhang_href21785\1 2013-11-25 02:42:46 GMT czhang
+** HREF#21785**/
+/**Log information: \main\Trophy\1 2013-11-25 02:55:25 GMT czhang
+** HREF#21785**/
+/**Log information: \main\Trophy\Trophy_xding_href22331\1 2013-12-10 07:18:04 GMT xding
+** HREF#22331, ºÏ²¢MMCÏà¹Ø¹¦Äܵ½Trophy baselineÉÏ**/
+/**Log information: \main\Trophy\2 2013-12-10 08:33:42 GMT jzwang
+** href#22331:Merge MMC latest implementation from Qilian branch.**/
+
+
+
+
+
diff --git a/mcu/interface/protocol/l4_c2k/tcm_context_public.h b/mcu/interface/protocol/l4_c2k/tcm_context_public.h
new file mode 100644
index 0000000..439eb1b
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/tcm_context_public.h
@@ -0,0 +1,66 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 _TCM_CONTEXT_PUBLIC_H
+#define _TCM_CONTEXT_PUBLIC_H
+
+/* for R12 */
+/* Values are aligned to Request Type IE in 24.008. */
+typedef enum {
+ REQUEST_TYPE_INITIAL_REQUEST = 1,
+ REQUEST_TYPE_HANDOVER = 2,
+ REQUEST_TYPE_UNUSED = 3,
+ REQUEST_TYPE_EMERGENCY = 4,
+ REQUEST_TYPE_HANDOVER_OF_EMERGENCY = 6, // 2+4
+}tcm_request_type_enum;
+
+typedef enum {
+ IPV4_ADDR_ALLOC_VIA_NAS_SIGNALLING,
+ IPV4_ADDR_ALLOC_VIA_NAS_DHCPV4,
+} tcm_ipv4_addr_alloc_enum;
+
+/** P-CSCF address discovery method */
+typedef enum {
+ P_CSCF_ADDR_DISCOVERY_VIA_NONE = 0, /**< none */
+ P_CSCF_ADDR_DISCOVERY_VIA_NAS_SIGNALLING = 1, /**< NAS signalling */
+ P_CSCF_ADDR_DISCOVERY_VIA_DHCP = 2 /**< DHCP */
+}tcm_p_cscf_discovery_enum;
+
+/** IM CN signalling */
+typedef enum {
+ NOT_FOR_IM_CN_SIGNALLING = 0, /**< not */
+ FOR_IM_CN_SIGNALLING = 1 /**< IM CN signalling */
+}tcm_im_cn_signalling_enum;
+
+#endif //_TCM_CONTEXT_PUBLIC_H
diff --git a/mcu/interface/protocol/l4_c2k/tcm_cval_struct.h b/mcu/interface/protocol/l4_c2k/tcm_cval_struct.h
new file mode 100644
index 0000000..f965944
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/tcm_cval_struct.h
@@ -0,0 +1,191 @@
+/*****************************************************************************
+* 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:
+ * ---------
+ * tcm_cval_struct.h
+ *
+ * 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 _TCM_CVAL_STRUCT_H
+#define _TCM_CVAL_STRUCT_H
+
+// #include "kal_general_types.h"
+// #include "kal_public_defs.h"
+
+#include "l3_inc_enums_public.h"
+#include "ps_public_enum_public.h"
+#include "l4c_common_enum_public.h"
+
+typedef struct {
+ /** User defined APN */
+ kal_uint8 apn_len;
+ kal_uint8 apn[MAX_APN_LEN];
+
+ snd_pcomp_algo_enum pcomp_algo; /* Protocol compression algorithm to be used in SNDCP. */
+ snd_dcomp_algo_enum dcomp_algo; /* Data compression algorithm to be used in SNDCP. */
+
+ pdp_addr_type_enum pdp_type; /* Type of pdp address. */
+ pdp_addr_len_enum pdp_len; /* Length of pdp address. */
+ kal_uint8 pdp_addr[IPV4V6_ADDR_LEN]; /* Former 4 bytes are for IPv4; later 16 bytes are for IPv6 */
+
+ tcm_ipv4_addr_alloc_enum ipv4_addr_alloc;
+ tcm_p_cscf_discovery_enum p_cscf_discovery;
+ tcm_im_cn_signalling_enum im_cn_signalling_flag;
+ tcm_request_type_enum request_type;
+
+ lte_c2k_activate_pdp_request_ipv4_mtu_enum act_pdp_with_pco_req_v4_mtu;
+} tcm_cval_cgdcont_struct;
+
+typedef struct {
+ kal_uint8 auth_type;
+ kal_uint8 user_name[TCM_MAX_GPRS_USER_NAME_LEN];
+ kal_uint8 password[TCM_MAX_GPRS_PASSWORD_LEN];
+} tcm_cval_cgauth_struct;
+
+typedef struct {
+ kal_uint8 mcc1;
+ kal_uint8 mcc2;
+ kal_uint8 mcc3;
+ kal_uint8 mnc1;
+ kal_uint8 mnc2;
+ kal_uint8 mnc3;
+} tcm_cval_plmn_id_struct;
+
+typedef struct {
+ kal_bool clean_egpco_context;
+
+ l4c_tcm_activate_pdp_request_ipv4_dns_enum act_pdp_with_pco_req_v4_dns;
+ l4c_tcm_activate_pdp_request_ipv6_dns_enum act_pdp_with_pco_req_v6_dns;
+
+ kal_bool req_msisdn;
+ kal_bool pcscf_reselection_support;
+
+ kal_uint32 op_pco_id; // FF00
+ tcm_cval_plmn_id_struct op_pco_plmn_id; // VZ_REQ_LTEDATA_60923: always set to 311480
+
+ kal_bool epdg_v6_addr_req; // FF01
+ tcm_cval_plmn_id_struct epdg_v6_addr_req_container; // VZ_REQ_LTEDATA_60923: always set to 311480
+
+ kal_bool epdg_v4_addr_req; // FF02
+ tcm_cval_plmn_id_struct epdg_v4_addr_req_container; // VZ_REQ_LTEDATA_60923: always set to 311480
+} tcm_cval_egpco_struct;
+
+typedef struct {
+ pdp_addr_type_enum roaming_ip_type;
+} tcm_cval_egdcont_struct;
+
+/* This primitive is sent from TCM to CVAL after receiving:
+ * AT+CGDCONT, AT+CGAUTH, and AT+EAPNSYNC
+ */
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_uint8 cid;
+
+ kal_bool is_cgdcont_valid;
+ tcm_cval_cgdcont_struct cgdcont_user_defined;
+
+ kal_bool is_cgauth_vaild;
+ tcm_cval_cgauth_struct cgauth_user_defined;
+
+ kal_bool is_egpco_valid;
+ tcm_cval_egpco_struct egpco_user_defined;
+
+ kal_bool is_egdcont_valid;
+ tcm_cval_egdcont_struct egdcont_user_defined;
+
+} tcm_cval_pdp_define_req_struct;
+
+typedef struct {
+ kal_uint8 apn_idx; /* apn table entry index */
+ kal_uint8 apn_length;
+ kal_uint8 apn[MAX_APN_LEN];
+ kal_uint16 inactivity_time;
+} tcm_cval_eapnsync_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_bool clear_all_apn_info;
+ tcm_cval_eapnsync_struct eapnsync_user_defined;
+} tcm_cval_eapnsync_define_req_struct;
+
+typedef struct {
+ kal_uint8 wapn;
+ kal_uint8 apn_class;
+ kal_uint32 apnni_len;
+ kal_uint8 apnni[MAX_APN_LEN];
+ pdp_addr_type_enum pdp_type;
+ rat_enum rat;
+ kal_bool is_enable;
+ kal_uint32 apn_timer_value_in_minute;
+} vzw_apn_define_common_struct;
+
+/* This primitive is sent from TCM to CVAL after receiving: AT+VZWAPNE */
+typedef struct {
+ LOCAL_PARA_HDR
+
+ kal_bool clear_all_vzw_apn_table;
+ vzw_apn_define_common_struct vzw_apn;
+} tcm_cval_vzw_apn_define_req_struct;
+
+#endif /* _TCM_CVAL_STRUCT_H */
diff --git a/mcu/interface/protocol/l4_c2k/uim_msg_struct.h b/mcu/interface/protocol/l4_c2k/uim_msg_struct.h
new file mode 100644
index 0000000..93aa557
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/uim_msg_struct.h
@@ -0,0 +1,1264 @@
+/*************************************************************
+*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+
+/*****************************************************************************
+*
+* FILE NAME :uim_msg_struct.h
+*
+* DESCRIPTION :
+*
+*
+*
+* HISTORY :
+* See Log at end of file
+*
+*****************************************************************************/
+#ifndef _UIM_MSG_STRUCT_H
+#define _UIM_MSG_STRUCT_H
+
+#include "uimapi.h"
+#include "valdbmapi.h"
+#include "valuimapi.h"
+
+/* MSG_ID_UIM_RAW_CMD_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimRawCmdMsgT msg;
+} uim_raw_cmd_msg_struct;
+
+/* MSG_ID_UIM_SELECT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimSelectMsgT msg;
+} uim_select_msg_struct;
+
+/* MSG_ID_UIM_STATUS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimStatusMsgT msg;
+} uim_status_msg_struct;
+
+/* MSG_ID_UIM_READ_BINARY_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimReadBinaryMsgT msg;
+} uim_read_binary_msg_struct;
+
+/* MSG_ID_UIM_UPDATE_BINARY_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUpdateBinaryMsgT msg;
+} uim_update_binary_msg_struct;
+
+/* MSG_ID_UIM_READ_RECORD_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimReadRecordMsgT msg;
+} uim_read_record_msg_struct;
+
+/* MSG_ID_UIM_UPDATE_RECORD_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUpdateRecordMsgT msg;
+} uim_update_record_msg_struct;
+
+/* MSG_ID_UIM_SEARCH_RECORD_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimSearchRecordMsgT msg;
+} uim_search_record_msg_struct;
+
+/* MSG_ID_UIM_VERIFY_CHV_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimVerifyCHVMsgT msg;
+} uim_verify_chv_msg_struct;
+
+/* MSG_ID_UIM_CHANGE_CHV_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimChangeCHVMsgT msg;
+} uim_change_chv_msg_struct;
+
+/* MSG_ID_UIM_ENABLE_CHV_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimEnableCHVMsgT msg;
+} uim_enable_chv_msg_struct;
+
+/* MSG_ID_UIM_DISABLE_CHV_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimDisableCHVMsgT msg;
+} uim_disable_chv_msg_struct;
+
+/* MSG_ID_UIM_UNBLOCK_CHV_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUnblockCHVMsgT msg;
+} uim_unblock_chv_msg_struct;
+
+/* MSG_ID_UIM_BS_CHALLENGE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimBSChallengeMsgT msg;
+} uim_bs_challenge_msg_struct;
+
+/* MSG_ID_UIM_CONFIRM_SSD_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimConfirmSSDMsgT msg;
+} uim_confirm_ssd_msg_struct;
+
+/* MSG_ID_UIM_RUN_CAVE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimRunCaveMsgT msg;
+} uim_run_cave_msg_struct;
+
+/* MSG_ID_UIM_GENERATE_KEY_VPM_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGenerateKeyVPMMsgT msg;
+} uim_generate_key_vpm_msg_struct;
+
+/* MSG_ID_UIM_STORE_ESN_ME_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimStoreEsnMeMsgT msg;
+} uim_store_esn_me_msg_struct;
+
+/* MSG_ID_UIM_TERMINAL_PROFILE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimTermProfileMsgT msg;
+} uim_terminal_profile_msg_struct;
+
+/* MSG_ID_UIM_TERMINAL_RESPONSE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimTermRspMsgT msg;
+} uim_terminal_response_msg_struct;
+
+/* MSG_ID_UIM_ENVELOPE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimEnvelopeMsgT msg;
+} uim_envelope_msg_struct;
+
+/* MSG_ID_UIM_HLP_ACCESS_CHAP_REQ_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimHlpAccessChapReqMsgT msg;
+} uim_hlp_access_chap_req_msg_struct;
+
+/* MSG_ID_UIM_3GPD_OPC_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDOPCGetMsgT msg;
+} uim_3gpd_opc_get_msg_struct;
+
+/* MSG_ID_UIM_3GPD_OPC_UPDATE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDOPCUpdateMsgT msg;
+} uim_3gpd_opc_update_msg_struct;
+
+/* MSG_ID_UIM_3GPD_OPM_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDOPMGetMsgT msg;
+} uim_3gpd_opm_get_msg_struct;
+
+/* MSG_ID_UIM_3GPD_OPM_UPDATE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDOPMUpdateMsgT msg;
+} uim_3gpd_opm_update_msg_struct;
+
+/* MSG_ID_UIM_3GPD_SIPCAP_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDSIPCapGetMsgT msg;
+} uim_3gpd_sipcap_get_msg_struct;
+
+/* MSG_ID_UIM_3GPD_MIPCAP_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDMIPCapGetMsgT msg;
+} uim_3gpd_mipcap_get_msg_struct;
+
+/* MSG_ID_UIM_3GPD_SIPUPP_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDSIPUPPGetMsgT msg;
+} uim_3gpd_sipupp_get_msg_struct;
+
+/* MSG_ID_UIM_3GPD_MIPUPP_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDMIPUPPGetMsgT msg;
+} uim_3gpd_mipupp_get_msg_struct;
+
+/* MSG_ID_UIM_3GPD_SIPSP_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDSIPSPGetMsgT msg;
+} uim_3gpd_sipsp_get_msg_struct;
+
+/* MSG_ID_UIM_3GPD_SIPSP_UPDATE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDSIPSPUpdateMsgT msg;
+} uim_3gpd_sipsp_update_msg_struct;
+
+/* MSG_ID_UIM_3GPD_MIPSP_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDMIPSPGetMsgT msg;
+} uim_3gpd_mipsp_get_msg_struct;
+
+/* MSG_ID_UIM_3GPD_MIPSP_UPDATE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDMIPSPUpdateMsgT msg;
+} uim_3gpd_mipsp_update_msg_struct;
+
+/* MSG_ID_UIM_3GPD_SIPPAPSS_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDSIPPAPSSGetMsgT msg;
+} uim_3gpd_sippapss_get_msg_struct;
+
+/* MSG_ID_UIM_3GPD_SIPPAPSS_UPDATE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDSIPPAPSSUpdateMsgT msg;
+} uim_3gpd_sippapss_update_msg_struct;
+
+/* MSG_ID_UIM_3GPD_UPPEXT_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GPDUppExtGetMsgT msg;
+} uim_3gpd_uppext_get_msg_struct;
+
+/* HLP_UIM_GET_USIM_FILE_LENGTH_RSP_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetEFPropertyRspMsgT msg;
+} hlp_uim_get_usim_file_length_rsp_msg_struct;
+
+/* MSG_ID_UIM_USIM_UST_DATA_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUsimFileDataGetMsgT msg;
+} uim_usim_ust_data_get_msg_struct;
+
+/* MSG_ID_UIM_USIM_EST_DATA_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUsimFileDataGetMsgT msg;
+} uim_usim_est_data_get_msg_struct;
+
+/* MSG_ID_UIM_USIM_ACL_DATA_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUsimFileDataGetMsgT msg;
+} uim_usim_acl_data_get_msg_struct;
+
+/* MSG_ID_UIM_MS_KEY_REQUEST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimMSKeyMsgT msg;
+} uim_ms_key_request_msg_struct;
+
+/* MSG_ID_UIM_KEY_GENERATION_REQUEST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimKeyGenMsgT msg;
+} uim_key_generation_request_msg_struct;
+
+/* MSG_ID_UIM_COMMIT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimCommitMsgT msg;
+} uim_commit_msg_struct;
+
+/* MSG_ID_UIM_VALIDATE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimValidateMsgT msg;
+} uim_validate_msg_struct;
+
+/* MSG_ID_UIM_CONFIGURATION_REQUEST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimConfigurationMsgT msg;
+} uim_configuration_request_msg_struct;
+
+/* MSG_ID_UIM_DOWNLOAD_REQUEST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimDownloadMsgT msg;
+} uim_download_request_msg_struct;
+
+/* MSG_ID_UIM_SSPR_CONFIGURATION_REQUEST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimSSPRConfigurationMsgT msg;
+} uim_sspr_configuration_request_msg_struct;
+
+/* MSG_ID_UIM_SSPR_DOWNLOAD_REQUEST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimSSPRDownloadMsgT msg;
+} uim_sspr_download_request_msg_struct;
+
+/* MSG_ID_UIM_3GPD_CONFIGURATION_REQUEST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3gpdConfigurationRequestMsgT msg;
+} uim_3gpd_configuration_request_msg_struct;
+
+/* MSG_ID_UIM_3GPD_DOWNLOAD_REQUEST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3gpdDownloadRequestMsgT msg;
+} uim_3gpd_download_request_msg_struct;
+
+/* MSG_ID_UIM_OTAPA_REQUEST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimOTAPAMsgT msg;
+} uim_otapa_request_msg_struct;
+
+/* MSG_ID_UIM_OTA_RUN_CAVE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimRunCaveMsgT msg;
+} uim_ota_run_cave_msg_struct;
+
+/* MSG_ID_UIM_PROACTIVE_POLLING_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimProactivePollingMsgT msg;
+} uim_proactive_polling_msg_struct;
+
+/* MSG_ID_UIM_HRPD_MD5_AUTH_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimHrpdMD5AuthMsgT msg;
+} uim_hrpd_md5_auth_msg_struct;
+
+
+/* MSG_ID_UIM_CARD_TYPE_GET_MSG
+ * Handler not found for this message in UIM Manager
+ * The structure is obscure, leave blank for now*/
+
+
+
+/* MSG_ID_UIM_3G_SIP_CHAP_REQ_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GSipChapReqMsgT msg;
+} uim_3g_sip_chap_req_msg_struct;
+
+/* MSG_ID_UIM_3G_MIP_MNHA_AUTH_REQ_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GMipMNHAAuthReqMsgT msg;
+} uim_3g_mip_mnha_auth_req_msg_struct;
+
+/* MSG_ID_UIM_3G_MIP_RRQ_HASH_REQ_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GMipRRQHashReqMsgT msg;
+} uim_3g_mip_rrq_hash_req_msg_struct;
+
+/* MSG_ID_UIM_3G_MIP_MNAAA_AUTH_REQ_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GMipMNAAAAuthReqMsgT msg;
+} uim_3g_mip_mnaaa_auth_req_msg_struct;
+
+/* MSG_ID_UIM_3G_AKA_AUTH_REQ_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ Uim3GAkaAuthReqMsgT msg;
+} uim_3g_aka_auth_req_msg_struct;
+
+/* MSG_ID_UIM_APP_INIT_TERM_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimAppInitTermMsgT msg;
+} uim_app_init_term_msg_struct;
+
+/* MSG_ID_UIM_EXT_INFO_GET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimExtSimInfoGetT msg;
+} uim_ext_info_get_msg_struct;
+
+/* MSG_ID_UICC_LOGI_CHAN_OPEN_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UiccLogicChanOpenT msg;
+} uicc_logi_chan_open_msg_struct;
+
+/* MSG_ID_UICC_LOGI_CHAN_CLOSE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UiccLogicChanCloseT msg;
+} uicc_logi_chan_close_msg_struct;
+
+/* MSG_ID_UIM_RESET_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimResetMsgT msg;
+} uim_reset_msg_struct;
+
+#ifdef MTK_DEV_C2K_IRAT
+/* MSG_ID_UIM_UTK_REFRESH_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUtkRefreshMsgT msg;
+} uim_utk_refresh_msg_struct;
+#endif
+/* MSG_ID_UIM_GET_NAM_DATA_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetNamDataMsgT msg;
+} uim_get_nam_data_msg_struct;
+
+
+/* MSG_ID_UIM_GET_PRL_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} uim_get_prl_msg_struct;
+
+/* MSG_ID_UIM_GET_EXT_PRL_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} uim_get_ext_prl_msg_struct;
+
+/* MSG_ID_UIM_GET_USIM_IMSI_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimMsgHeaderT msg;
+} uim_get_usim_imsi_msg_struct;
+
+/* MSG_ID_UIM_GET_USIM_AD_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimMsgHeaderT msg;
+} uim_get_usim_ad_msg_struct;
+
+/* MSG_ID_UIM_UPDATE_NAM_DATA_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUpdateNamDataMsgT msg;
+} uim_update_nam_data_msg_struct;
+
+/* MSG_ID_UIM_GET_CST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimMsgHeaderT msg;
+} uim_get_cst_msg_struct;
+
+/* MSG_ID_UIM_GET_UIMID_EUIMID_MSG
+ * Handler not found for this message in UIM Manager */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetNamDataMsgT msg; /* Structure type is deduced from the msg sent from VAL */
+} uim_get_uimid_euimid_msg_struct;
+
+/* MSG_ID_UIM_GET_IMSI_MSG
+ * Handler not found for this message in UIM Manager
+ * The structure is obscure, leave blank for now */
+
+/* MSG_ID_UIM_OTA_UPDATE_NAM_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+} uim_ota_update_nam_msg_struct;
+
+
+/* MSG_ID_UIM_CARD_TYPE_GET_MSG
+ * Handler not found for this message in UIM Manager
+ * The structure is obscure, leave blank for now */
+
+/* MSG_ID_UIM_SET_CARDTYPE_MSG
+ * Handler not found for this message in UIM Manager
+ * The structure is obscure, leave blank for now */
+
+#ifdef MTK_DEV_C2K_IRAT
+/* MSG_ID_UIM_SIM_ACCESS_OPTION_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimSimAccessOptionMsgT msg;
+} uim_access_option_msg_struct;
+#endif
+/* MSG_ID_UIM_FULL_RECOVERY_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+} uim_full_recovery_msg_struct;
+
+/* MSG_ID_UIM_GET_PHB_REC_PARAMS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetPhbRecParamsMsgT msg;
+} uim_get_phb_rec_params_msg_struct;
+
+/* MSG_ID_UIM_GET_PHB_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetPhoneRecMsgT msg;
+} uim_get_phb_rec_msg_struct;
+
+/* MSG_ID_UIM_GET_FDN_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetPhoneRecMsgT msg;
+} uim_get_fdn_rec_msg_struct;
+
+/* MSG_ID_UIM_UPDATE_PHB_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUpdatePhoneRecMsgT msg;
+} uim_update_phb_rec_msg_struct;
+
+/* MSG_ID_UIM_ERASE_PHB_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimErasePhoneRecMsgT msg;
+} uim_erase_phb_rec_msg_struct;
+
+/* MSG_ID_UIM_ERASE_FDN_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimErasePhoneRecMsgT msg;
+} uim_erase_fdn_rec_msg_struct;
+
+/* MSG_ID_UIM_UPDATE_FDN_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUpdateFdnRecMsgT msg;
+} uim_update_fdn_rec_msg_struct;
+
+/* MSG_ID_UIM_SET_FDN_STATUS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimSetFdnStatusMsgT msg;
+} uim_set_fdn_status_msg_struct;
+
+/* MSG_ID_UIM_GET_FDN_STATUS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetFdnStatusMsgT msg;
+} uim_get_fdn_status_msg_struct;
+
+/* MSG_ID_UIM_GET_SMS_CAP_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetSmsCapMsgT msg;
+} uim_get_sms_cap_msg_struct;
+
+/* MSG_ID_UIM_GET_SMS_REC_PARAMS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetSmsRecParamsMsgT msg;
+} uim_get_sms_rec_params_msg_struct;
+
+/* MSG_ID_UIM_GET_SMS_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetSmsRecMsgT msg;
+} uim_get_sms_rec_msg_struct;
+
+/* MSG_ID_UIM_UPDATE_SMS_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUpdateSmsRecMsgT msg;
+} uim_update_sms_rec_msg_struct;
+
+/* MSG_ID_UIM_ERASE_SMS_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimEraseSmsRecMsgT msg;
+} uim_erase_sms_rec_msg_struct;
+
+/* MSG_ID_UIM_GET_STATUS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimCardStatusRecMsgT msg;
+} uim_get_status_msg_struct;
+
+/* MSG_ID_UIM_CARD_DETECT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+
+} uim_card_detect_msg_struct;
+
+/* MSG_ID_UIM_APP_VERIFY_CHV_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimAppVerifyCHVMsgT msg;
+} uim_app_verify_chv_msg_struct;
+
+/* MSG_ID_UIM_APP_CHANGE_CHV_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimAppChangeCHVMsgT msg;
+} uim_app_change_chv_msg_struct;
+
+/* MSG_ID_UIM_APP_ENABLE_CHV_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimAppEnableCHVMsgT msg;
+} uim_app_enable_chv_msg_struct;
+
+/* MSG_ID_UIM_APP_DISABLE_CHV_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimAppDisableCHVMsgT msg;
+} uim_app_disable_chv_msg_struct;
+
+/* MSG_ID_UIM_APP_UNBLOCK_CHV_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimAppUnblockCHVMsgT msg;
+} uim_app_unblock_chv_msg_struct;
+
+/* MSG_ID_UIM_GET_EF_PROPERTY_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetEFPropertyMsgT msg;
+} uim_get_ef_property_msg_struct;
+
+#ifdef MTK_DEV_C2K_IRAT
+/*MSG_ID_UIM_BTSAP_CONNECT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimBtsapConnectMsgT msg;
+} uim_btsap_connect_msg_struct;
+
+/* MSG_ID_UIM_BTSAP_DISCONNECT_MSG*/
+typedef struct
+{ LOCAL_PARA_HDR
+ UimBtsapDisconnectMsgT msg;
+} uim_btsap_disconnect_msg_struct;
+
+/* MSG_ID_UIM_BTSAP_POWER_ON_MSG*/
+typedef struct
+{ LOCAL_PARA_HDR
+ UimBtsapPowerOnMsgT msg;
+} uim_btsap_power_on_msg_struct;
+
+/* MSG_ID_UIM_BTSAP_POWER_OFF_MSG*/
+typedef struct
+{ LOCAL_PARA_HDR
+ UimBtsapPowerOffMsgT msg;
+} uim_btsap_power_off_msg_struct;
+
+/* MSG_ID_UIM_BTSAP_RESET_MSG*/
+typedef struct
+{ LOCAL_PARA_HDR
+ UimBtsapResetMsgT msg;
+} uim_btsap_reset_msg_struct;
+
+/* MSG_ID_UIM_BTSAP_TRANSFER_APDU_MSG*/
+typedef struct
+{ LOCAL_PARA_HDR
+ UimBtsapTransferApduMsgT msg;
+} uim_btsap_transfer_apdu_msg_struct;
+#endif
+
+/* MSG_ID_UIM_NOTIFY_REGISTER_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimNotifyRegisterMsgT msg;
+} uim_notify_register_msg_struct;
+
+/* MSG_ID_UIM_SET_PARM_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValGenericSetParmMsgT msg;
+} uim_set_parm_msg_struct;
+
+/* UIM_SET_FACTORY_MODE_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_bool factory_mode;
+}uim_set_factory_mode_msg_struct;
+
+/* UIM_GET_FACTORY_MODE_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+}uim_get_factory_mode_msg_struct;
+
+/* MSG_ID_UIM_GET_PARM_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValGenericGetParmMsgT msg;
+} uim_get_parm_msg_struct;
+
+#ifdef MTK_DEV_C2K_IRAT
+/* MSG_ID_UIM_FILE_CHANGE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimFileChangeRspMsgT msg;
+}uim_file_change_rsp_msg_struct;
+#endif
+
+/*Response data of MSG_ID_UIM_SET_FDN_STATUS_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimSetFdnStatusRspMsgT msg;
+}uim_set_fdn_status_rsp_msg_struct;
+
+/*Response data of MSG_ID_UIM_GET_FDN_STATUS_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetFdnStatusRspMsgT msg;
+}uim_get_fdn_status_rsp_msg_struct;
+
+/*Response data of MSG_ID_UIM_GET_FDN_REC_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetFdnRecRspMsgT msg;
+}uim_get_fdn_rec_rsp_msg_struct;
+
+/*Response data of MSG_ID_UIM_ERASE_FDN_REC_MSG & MSG_ID_UIM_ERASE_PHB_REC_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimErasePhoneRecRspMsgT msg;
+}uim_erase_phone_rec_rsp_msg_struct;
+
+/*Response data of MSG_ID_UIM_UPDATE_FDN_REC_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimUpdateFdnRecRspMsgT msg;
+}uim_update_fdn_rec_rsp_msg_struct;
+
+/* Response data of MSG_ID_UIM_GET_PHB_REC_PARAMS_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetPhbRecParamsRspMsgT msg;
+}uim_get_phb_rec_params_rsp_msg_struct;
+
+/*Response data structure of MSG_ID_UIM_GET_PHB_REC_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetPhoneRecRspMsgT msg;
+}uim_get_phone_rec_rsp_msg_struct;
+
+/* Response data of MSG_ID_UIM_UPDATE_PHB_REC_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimUpdatePhoneRecRspMsgT msg;
+}uim_update_phone_rec_rsp_msg_struct;
+
+/* Response data structure of UIM_GET_SMS_REC_ PARAMS _MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetSmsRecParamsRspMsgT msg;
+}uim_get_sms_rec_params_rsp_msg_struct;
+
+/*Response data structure of MSG_ID_UIM_GET_SMS_REC_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetSmsRecRspMsgT msg;
+}uim_get_sms_rec_rsp_msg_struct;
+
+/* Response data of MSG_ID_UIM_UPDATE_SMS_REC_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimUpdateSmsRecRspMsgT msg;
+}uim_update_sms_rec_rsp_msg_struct;
+
+/* Response data of MSG_ID_UIM_ERASE_SMS_REC_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimEraseSmsRecRspMsgT msg;
+}uim_erase_sms_rec_rsp_msg_struct;
+
+/*Response data structure of MSG_ID_UIM_GET_SMS_CAP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetSmsCapRspMsgT msg;
+}uim_get_sms_cap_rsp_msg_struct;
+
+/* APP CHV operation response message */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimAppChvRspMsgT msg;
+}uim_app_chv_rsp_msg_struct;
+
+/* Response to uim card status*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimCardStatusRspMsgT msg;
+}uim_card_status_rsp_msg_struct;
+
+/* Generic uim command response*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspInfoT msg;
+}uim_generic_rsp_msg_struct;
+
+
+#define CUIM_MAX_MDN_RECORD 10
+
+typedef struct
+{
+ kal_uint8 mdn_raw_data[MAX_NUMBER_BCD_LEN+1];
+}cuim_mdn_raw_data_struct;
+
+typedef struct
+{
+ kal_uint8 num_of_mdn;
+ cuim_mdn_raw_data_struct mdn_data[CUIM_MAX_MDN_RECORD];
+}cuim_mdn_ef_data_struct;
+
+typedef struct
+{
+ cuim_mdn_ef_data_struct ef_mdn_data;
+ kal_uint16 status_word;
+}uim_get_mdn_cnf_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_mdn_cnf_struct msg;
+}c2k_uim_get_mdn_cnf_struct;
+
+typedef struct
+{
+ UimRspInfoT RspInfo;
+}uim_get_mdn_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_mdn_req_struct msg;
+}c2k_uim_get_mdn_req_struct;
+
+typedef struct
+{
+ UimRspInfoT RspInfo;
+}uim_get_home_sid_nid_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_home_sid_nid_req_struct msg;
+}c2k_uim_get_home_sid_nid_req_struct;
+
+typedef struct
+{
+ kal_uint16 SIDp[MAX_POSITIVE_SIDS]; /* CDMA Home SID, NID */
+ kal_uint16 NIDp[MAX_POSITIVE_SIDS];
+ kal_uint8 NUM_POSITIVE_SID_NIDp;
+ kal_uint16 status_word;
+}uim_get_home_sid_nid_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_home_sid_nid_cnf_struct msg;
+}c2k_uim_get_home_sid_nid_cnf_struct;
+
+typedef struct
+{
+ UimRspInfoT RspInfo;
+}uim_get_imsi_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_imsi_req_struct msg;
+}c2k_uim_get_imsi_req_struct;
+
+typedef struct
+{
+ kal_bool IMSI_M_Valid; /* IMSI_M */
+ IMSIType IMSI_Mp;
+ kal_bool IMSI_T_Valid; /* IMSI_T */
+ IMSIType IMSI_Tp;
+ kal_uint16 status_word;
+}uim_get_imsi_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_imsi_cnf_struct msg;
+}c2k_uim_get_imsi_cnf_struct;
+
+typedef struct
+{
+ UimRspInfoT RspInfo;
+}uim_get_iccid_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_iccid_req_struct msg;
+}c2k_uim_get_iccid_req_struct;
+
+typedef struct
+{
+ kal_bool ICCID_Valid;
+ kal_uint8 ICCID[UICC_ICCID_DATA_LEN];
+ kal_uint16 status_word;
+}uim_get_iccid_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_iccid_cnf_struct msg;
+}c2k_uim_get_iccid_cnf_struct;
+
+typedef struct
+{
+ UimRspInfoT RspInfo;
+ UimCardAppIdT APP_Id;
+}uim_get_card_app_info_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_card_app_info_req_struct msg;
+}c2k_uim_get_card_app_info_req_struct;
+
+typedef struct
+{
+ kal_uint8 power_on_mode;
+}uim_set_power_on_mode_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_set_power_on_mode_req_struct msg;
+}c2k_uim_set_power_on_mode_req_struct;
+
+typedef struct
+{
+ UimCardAppIdT APP_Id;
+ kal_uint8 Slot_Id;
+ kal_uint8 Iccid[UICC_ICCID_DATA_LEN];
+ kal_uint8 Channel_Id;
+ kal_uint8 AID_Len;
+ kal_uint8 AID[UICC_AID_MAX_LEN];
+ kal_uint8 APP_Label_Len;
+ kal_uint8 APP_Label[UICC_APP_LABEL_LEN];
+ kal_bool PIN1_Enabled;
+ kal_bool PIN1_Verified;
+ kal_bool PIN2_Enabled;
+ kal_bool PIN2_Verified;
+ kal_uint8 PIN1_Count;
+ kal_uint8 PIN2_Count;
+ kal_uint8 PUK1_Count;
+ kal_uint8 PUK2_Count;
+ kal_uint16 status_word;
+}uim_get_card_app_info_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_card_app_info_cnf_struct msg;
+}c2k_uim_get_card_app_info_cnf_struct;
+
+typedef struct
+{
+ kal_uint8 Protocol_Id;
+ kal_uint8 Channel_Id;
+ kal_uint8 AID_Len;
+ kal_uint8 AID[UICC_AID_MAX_LEN];
+ kal_uint8 APP_Label_Len;
+ kal_uint8 APP_Label[UICC_APP_LABEL_LEN];
+ kal_bool PIN1_Enabled;
+ kal_bool PIN2_Enabled;
+ kal_uint8 PIN1_Count;
+ kal_uint8 PIN2_Count;
+ kal_uint8 PUK1_Count;
+ kal_uint8 PUK2_Count;
+ kal_bool IccidValid;
+ kal_uint8 Iccid[UICC_ICCID_DATA_LEN];
+ kal_bool UimidValid;
+ kal_uint32 UimId;
+#ifdef __CARRIER_RESTRICTION__
+ kal_uint8 SlotId;
+#endif
+}uim_card_app_info_ind_struct;
+
+typedef struct
+{
+ kal_uint8 Protocol_Id;
+ kal_bool PIN1_Enabled;
+ kal_bool PIN2_Enabled;
+ kal_uint8 PIN1_Count;
+ kal_uint8 PIN2_Count;
+ kal_uint8 PUK1_Count;
+ kal_uint8 PUK2_Count;
+ kal_uint8 ChvStatus;
+#ifdef __CARRIER_RESTRICTION__
+ kal_uint8 SlotId;
+#endif
+ kal_uint16 CardStatus;
+}uim_card_pin_info_ind_struct;
+
+typedef struct
+{
+ kal_uint8 Protocol_Id;
+ UimFileTypeT file_type;
+ kal_uint8 file_path_len;
+ kal_uint8 file_path[VAL_UIM_MAX_FULLPATH_LENGTH];
+ ValCacheFcpInfoT fcp_info;
+}uim_cache_fcp_info_ind_struct;
+
+typedef struct
+{
+ kal_uint8 Protocol_Id;
+ UimFileTypeT file_type;
+ kal_uint8 file_path_len;
+ kal_uint8 file_path[VAL_UIM_MAX_FULLPATH_LENGTH];
+ ValCacheRecordInfoT record_info;
+}uim_cache_record_info_ind_struct;
+
+typedef struct
+{
+ kal_uint8 Protocol_Id;
+ UimFileTypeT file_type;
+ kal_uint8 file_path_len;
+ kal_uint8 file_path[VAL_UIM_MAX_FULLPATH_LENGTH];
+ ValCacheBinaryInfoT binary_info;
+}uim_cache_binary_info_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_access_option_enum uim_index;
+ kal_uint16 card_type;
+ UimOmhCardTypeT omh_card_type;
+ kal_uint8 sim_slot_id;
+ usim_logic_channel_enum USIMchan;
+ usim_logic_channel_enum ISIMchan;
+ usim_logic_channel_enum CSIMchan;
+ kal_uint8 atr_length;
+ kal_uint8 atr[40];
+ kal_uint8 remote_sim_protocol_task;
+ kal_bool iccid_valid;
+ kal_uint8 iccid[10];
+ kal_uint8 NumOfEccList;
+ UimEccContactT EccList[MAX_ECC_LIST];
+ UimNamT namData;
+ kal_bool nam_valid;
+ kal_uint8 meidInCard[7];
+ kal_uint8 meidLen;
+ kal_uint8 ef_ota_len;
+ kal_uint8 ef_ota_data[255];
+ kal_uint8 pin1_count;
+ kal_uint8 puk1_count;
+ kal_uint8 pin2_count;
+ kal_uint8 puk2_count;
+ CardStatusT CardStatus;
+ ChvStatusT ChvStatus;
+ kal_uint8 Csim_AID[16];
+ kal_uint8 Usim_AID[16];
+ kal_uint8 Isim_AID[16];
+ uim_gsm_file_info_struct gsm_file_info;
+ kal_bool is_fdn_enabled;
+#ifdef __CARRIER_RESTRICTION__
+ kal_bool is_cdma_only_card;
+ kal_bool spn_valid;
+ kal_uint8 ef_spn_data[35];
+ uim_gid_struct gid_info;
+#endif
+}uim_card_status_info_ind_struct;
+
+typedef uim_sim_apdu_access_req_struct c2k_uim_sim_apdu_access_req_struct;
+
+typedef uim_sim_apdu_access_cnf_struct c2k_uim_sim_apdu_access_cnf_struct;
+
+typedef uim_sim_error_ind_struct c2k_uim_sim_error_ind_struct;
+
+typedef uim_card_status_info_ind_struct c2k_uim_card_status_info_ind_struct;
+
+typedef uim_sim_status_ind_struct c2k_uim_vsim_status_ind_struct;
+
+typedef uim_sat_file_change_res_struct c2k_uim_sat_file_change_res_struct;
+
+typedef uim_sim_read_cnf_struct c2k_sim_read_cnf_struct;
+
+typedef uim_sim_read_req_struct c2k_sim_read_req_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}c2k_uim_index_register_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uimUtkFileChangedIndMsgT msg;
+} c2k_uim_file_changed_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uimCallStatusMsgT msg;
+} uim_call_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uimImsRegisterStatusMsgT msg;
+} uim_ims_register_status_msg_struct;
+
+
+typedef struct
+{
+ UimRspInfoT RspInfo;
+}uim_get_uimid_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_uimid_req_struct msg;
+}c2k_uim_get_uimid_req_struct;
+
+typedef struct
+{
+ kal_uint32 uimid;
+ kal_uint16 status_word;
+}uim_get_uimid_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimExtendedRawCmdMsgT msg;
+}uim_extended_raw_cmd_msg_struct;
+
+typedef struct
+{
+ kal_uint8 chan_id;
+ kal_uint16 status_word;
+ kal_uint16 len;
+ kal_uint8* data;
+}c2k_uim_extended_raw_cmd_data_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ c2k_uim_extended_raw_cmd_data_msg_struct msg;
+}uim_extended_raw_cmd_data_msg_struct;
+
+typedef uim_extended_raw_cmd_data_msg_struct val_uim1_extended_raw_cmd_data_msg_struct;
+typedef uim_extended_raw_cmd_data_msg_struct val_uim2_extended_raw_cmd_data_msg_struct;
+
+#ifdef __CARRIER_RESTRICTION__
+typedef struct
+{
+ kal_uint8 slot_id;
+}uim_cval_card_error_ind_struct;
+#endif
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+typedef struct
+{
+ UimRspInfoT RspInfo;
+ kal_bool factory_mode;
+}uim_set_factory_mode_struct;
+
+typedef struct
+{
+ UimRspInfoT RspInfo;
+}uim_get_factory_mode_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_set_factory_mode_struct msg;
+}uim_val_set_factory_mode_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_factory_mode_struct msg;
+}uim_val_get_factory_mode_msg_struct;
+
+typedef struct
+{
+ kal_uint8 action_rsp;
+}uim_refresh_conf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_refresh_conf_struct msg;
+}uim_refresh_conf_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimSmsStoreEsnMeMsgT msg;
+}uim_sms_store_esn_me_msg_struct;
+#endif /* _UIM_MSG_STRUCT_H */
+#endif /* _UIM_MSG_STRUCT_H */
+
diff --git a/mcu/interface/protocol/l4_c2k/uim_nvram.h b/mcu/interface/protocol/l4_c2k/uim_nvram.h
new file mode 100644
index 0000000..db9dae0
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/uim_nvram.h
@@ -0,0 +1,272 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 CONSKAL_TRUED 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 _UIM_NVRAM_H_
+
+#define _UIM_NVRAM_H_ 1
+
+
+/*****************************************************************************
+ * Includes
+ ****************************************************************************/
+#include "kal_general_types.h"
+#include "sim_public_enum.h"
+
+#define UICC_DBM_CACHE_CARD_NUM SUPPORT_SIM_TOTAL /* Number of card info cached in DBM NV */
+#define UICC_ICCID_DATA_LEN 10
+#define UICC_CHV1_DATA_LEN 8
+#define UICC_VSIM_FCP_LEN 32
+#define UICC_EPRL_DATA_LEN 256
+#define UICC_IMSI_DATA_LEN 10
+#define UICC_AD_DATA_LEN 3
+#define UICC_UIMID_DATA_LEN 8
+#define UICC_ACCLOC_DATA_LEN 1
+#define UICC_TERM_DATA_LEN 1
+#define UICC_SSCI_DATA_LEN 1
+#define UICC_NAMLOCK_DATA_LEN 1
+#define UICC_SFUIMID_DATA_LEN 1
+#define UICC_MDN_DATA_LEN 11
+
+/* CSIM Profile Definition */
+#define UTK_TIMER_EXPIRATION 1
+#define UTK_PROFILE_DOWNLOAD 1
+#define UTK_SMSPP_DOWNLOAD 1
+#define UTK_MENU_SELECTION 1
+#define UTK_CMD_RST 1
+#define UTK_TIMER_EXPIRY 1
+#define UTK_UCS2_ENTRY 1
+#define UTK_UCS2_DISP 1
+#define UTK_DISP_TXT 1
+#define UTK_GET_INPUT 1
+#define UTK_MORE_TIME 1
+#define UTK_PLAY_TONE 1
+#define UTK_REFRESH 1
+#define UTK_SELECT_ITEM 1
+#define UTK_SET_UP_CALL 1
+#define UTK_SET_UP_MENU 1
+#define UTK_TIMER_MNGT_START 1
+#define UTK_DISP_TXT_VAR_TIME 1 /*DISPLAY TEXT (Variable Time out)*/
+#define UTK_SEND_SMS 1
+#define UTK_PROVIDELOCALINFO_MCC_MNC_LAC_CellID_IMEI 1
+#define UTK_PROVIDELOCALINFO_NMR 0
+#define UTK_PROVIDELOCALINFO_DATE_TIME 1
+#define UTK_PROVIDELOCALINFO_LANGUAGE 1
+#define UTK_PROVIDELOCALINFO_ENHANCEDTIMER 0
+#define UTK_PROVIDELOCALINFO_ACCESS_TECH 1
+#define UTK_PROVIDELOCALINFO_ESN 0
+#define UTK_POLL_INTERVAL 1
+#define UTK_POLLING_OFF 1
+#define UTK_GET_INKEY 1
+#define UTK_GET_INKEY_HELP 1 /*GET INKEY (help is supported while waiting for
+ immediate response or variable timeout) */
+#define UTK_GET_INKEY_VAR_TIME 0 /* GET INKEY (Variable Timeout) */
+#ifdef __SATCE__
+#define UTK_SET_UP_EVENT_LIST 1
+#define UTK_EVENT_MT_CALL 1
+#define UTK_EVENT_CALL_CONNECTED 1
+#define UTK_EVENT_CALL_DISCONNECTED 1
+#define UTK_EVENT_LOCAL_STATUS 1
+#define UTK_EVENT_USER_ACTIVITY 1
+#define UTK_EVENT_IDLE_SCREEN_AVAIL 1
+#define UTK_EVENT_CARD_READER_STATUS 1
+#define UTK_EVENT_LAN_SELECTION 1
+#define UTK_EVENT_BROWSER_TERM 1
+#define UTK_EVENT_DATA_AVAIL 1
+#define UTK_EVENT_CHANNEL_STATUS 1
+#define UTK_EVENT_ACCESS_TECH_STATUS 1
+#define UTK_EVENT_DISP_PARAMS_CHANGED 1
+#define UTK_EVENT_LOCAL_CONNECTION 1
+#define UTK_EVENT_NET_SEARCH_MODE_CHANGE 1
+#define UTK_OPEN_CHANNEL 1
+#define UTK_CLOSE_CHANNEL 1
+#define UTK_RECEIVE_DATA 1
+#define UTK_SEND_DATA 1
+#define UTK_GET_CHANNEL_STATUS 1
+
+#else
+#define UTK_SET_UP_EVENT_LIST 0
+#define UTK_EVENT_MT_CALL 0
+#define UTK_EVENT_CALL_CONNECTED 0
+#define UTK_EVENT_CALL_DISCONNECTED 0
+#define UTK_EVENT_LOCAL_STATUS 0
+#define UTK_EVENT_USER_ACTIVITY 0
+#define UTK_EVENT_IDLE_SCREEN_AVAIL 0
+#define UTK_EVENT_CARD_READER_STATUS 0
+#define UTK_EVENT_LAN_SELECTION 0
+#define UTK_EVENT_BROWSER_TERM 0
+#define UTK_EVENT_DATA_AVAIL 0
+#define UTK_EVENT_CHANNEL_STATUS 0
+#define UTK_EVENT_ACCESS_TECH_STATUS 0
+#define UTK_EVENT_DISP_PARAMS_CHANGED 0
+#define UTK_EVENT_LOCAL_CONNECTION 0
+#define UTK_EVENT_NET_SEARCH_MODE_CHANGE 0
+#define UTK_OPEN_CHANNEL 0
+#define UTK_CLOSE_CHANNEL 0
+#define UTK_RECEIVE_DATA 0
+#define UTK_SEND_DATA 0
+#define UTK_GET_CHANNEL_STATUS 0
+#endif
+
+#define SUPPORT_SOFTKEY_FOR_SELECT_ITEM 0
+#define SUPPORT_SOFTKEY_FOR_SELECT_MENU 0
+#define SOFTKEY_MAX_NUM 2
+#define DISP_HEIGHT_CHAR_NUM 5
+#define SUPPORT_DISP_HEIGHT_SIZING_PARAM 0
+#define DISP_WIDTH_CHAR_NUM 7
+#define SUPPORT_VAR_SIZE_FORTS 0
+#define SUPPORT_DISP_RESIZE 0
+#define SUPPORT_TEXT_WRAPPING 0
+#define SUPPORT_TEXT_SCROLLING 1
+#define WIDTH_REDUCTION 7
+#define SUPPORT_EXTENDED_TEXT 0
+
+#define UTK_TIMER_MANAGEMENT_START_STOP 1
+#define UTK_MAX_CHANNEL_NUM_SUPPORT 7
+#define UTK_TCP_CLIENT_REMOTE 1
+#define UTK_UDP_CLIENT_REMOTE 1
+#define UTK_TCP_SERVER 1
+/* CSIM Profile Definition End*/
+#define TERM_PROFILE_LEN 20
+
+typedef struct
+{
+#ifdef MTK_DEV_CCCI_FS
+ kal_bool IsICCIDValid;
+ kal_bool IsCHVValid;
+#else
+ kal_bool IsICCIDValid:1;
+ kal_bool IsCHVValid:1;
+#endif
+ kal_uint8 CHVData[UICC_CHV1_DATA_LEN];
+ kal_uint8 ICCIDData[UICC_ICCID_DATA_LEN];
+} UiccDbmChvIccidStruct;
+
+typedef struct
+{
+ UiccDbmChvIccidStruct DbmChvIccid[UICC_DBM_CACHE_CARD_NUM]; /* 0 for current Card */
+} UiccDbmCardDataT;
+
+
+typedef struct
+{
+ kal_bool FactoryMode;
+ UiccDbmChvIccidStruct DbmChvIccid;
+} UiccDbmDataT;
+
+/*C2K MDVSIM*/
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 EprlData[UICC_EPRL_DATA_LEN];
+}UiccVsimEprlT;
+
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 ImsiData[UICC_IMSI_DATA_LEN];
+}UiccVsimImsiT;
+
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 IccidData[UICC_ICCID_DATA_LEN];
+}UiccVsimIccidT;
+
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 AdData[UICC_AD_DATA_LEN];
+}UiccVsimAdT;
+
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 UimidData[UICC_UIMID_DATA_LEN];
+}UiccVsimUimidT;
+
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 AcclocData[UICC_ACCLOC_DATA_LEN];
+}UiccVsimAcclocT;
+
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 TermData[UICC_TERM_DATA_LEN];
+}UiccVsimTermT;
+
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 SsciData[UICC_SSCI_DATA_LEN];
+}UiccVsimSsciT;
+
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 NamlockData[UICC_NAMLOCK_DATA_LEN];
+}UiccVsimNamelockT;
+
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 SfuimidData[UICC_SFUIMID_DATA_LEN];
+}UiccVsimSfuimidT;
+
+typedef struct
+{
+ kal_uint8 FcpData[UICC_VSIM_FCP_LEN];
+ kal_uint8 MdnData[UICC_MDN_DATA_LEN];
+}UiccVsimMdnT;
+
+typedef struct
+{
+ UiccVsimIccidT VsimIccidValue;
+ UiccVsimEprlT VsimEprlValue;
+ UiccVsimImsiT VsimImsiMVale;
+ UiccVsimImsiT VsimImsiTVale;
+ UiccVsimAdT VsimAdValue;
+ UiccVsimUimidT VsimUimidValue;
+ UiccVsimAcclocT VsimAcclocValue;
+ UiccVsimTermT VsimTermValue;
+ UiccVsimSsciT VsimSsciValue;
+ UiccVsimNamelockT VsimNamlockValue;
+ UiccVsimSfuimidT VsimSfuimidValue;
+ UiccVsimMdnT VsimMdnValue;
+}UiccC2KVsimT;
+
+#endif/* _UIM_NVRAM_H_ */
+
diff --git a/mcu/interface/protocol/l4_c2k/uimapi.h b/mcu/interface/protocol/l4_c2k/uimapi.h
new file mode 100644
index 0000000..b98ff59
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/uimapi.h
@@ -0,0 +1,2133 @@
+
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2002-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef UIMAPI_H
+#define UIMAPI_H
+/*****************************************************************************
+
+ FILE NAME: uimapi.h
+
+ DESCRIPTION:
+
+ This file contains all constants and typedefs needed to interface
+ with the UIM unit via the Exe mail service routines.
+
+
+*****************************************************************************/
+
+#include "kal_public_defs.h"
+#include "kal_public_api.h"
+#include "sbp_public_utility.h"
+
+#include "sysapi.h"
+#include "pswnam.h"
+#include "pswcustom.h"
+#include "uim_nvram.h"
+
+#include "uim_msgid.h"
+#include "sim_ps_struct_public.h"
+#include "sim_ps_msgid.h"
+#include "sim_public_enum_public.h"
+
+#include "c2k_irat_msg_struct.h"
+
+/*------------------------------------------------------------------------
+ * Define constants
+ *------------------------------------------------------------------------*/
+#define C2K_MOD_UIM_PROXY MOD_UIM_PROXY
+
+#define SW_OK 0x9000
+
+#define MAX_NUM_OF_GID 20
+#define C2K_HRPD_NAI_LEN 72
+
+#define MAX_SUPPORT_SIM_TOTAL SUPPORT_SIM_TOTAL
+
+#define UTK_TIMER_MANAGER_NUM 8
+
+/* 5 bytes header: CLA, INS, P1, P2, Lc */
+#define CUIM_APDU_REQ_HDR_LEN 5
+/* 261 - 5 = 256 */
+#define CUIM_APDU_REQ_BODY_MAX_LEN APDU_REQ_MAX_LEN - CUIM_APDU_REQ_HDR_LEN
+/* 258 - 2 bytes status word SW1 and SW2 = 256 */
+#define CUIM_APDU_RSP_MAX_LEN APDU_RSP_MAX_LEN - 2
+
+#ifdef MTK_DEV_C2K_IRAT
+#define UICC_ATR_MAX_LEN 40
+#define UICC_BASIC_LCH 0 /* Basic Logical Channel */
+#define UICC_AID_MAX_LEN 16
+#define UICC_APP_LABEL_LEN 32
+#endif
+
+#ifdef MTK_CBP
+#define MAXALPHALENGTH 40
+#else
+#define MAXALPHALENGTH 21
+#endif
+#define MAXSMSMSGLENGTH 253
+
+#define UIM_PARAM_P_LEN 64
+#define UIM_PARAM_G_LEN 20
+#define UIM_MAX_BS_RESULT_LEN 64
+#define UIM_MAX_PARAM_SIZE 200
+#define UIM_MAX_OTA_DATA_BURST_SIZE 255
+#define UIM_MAX_EF_NUM 6
+
+#define UIM_SIM_SC_ADDRESS_LENGTH 0x0a
+#define UIM_SIM_STATUS_OK 0
+#define UIM_SIM_STATUS_NO_SIM 1
+#define UIM_SIM_STATUS_NO_PIN 2
+#define MAX_NUMBER_BCD_LEN 10
+
+#ifdef MTK_CBP
+#define MAX_EFPL_SIZE 8 * 2 /* Each language indicator takes 2 bytes, 8 languages should be supported at maximum according to spec C.R1001 */
+#define MAX_NUMBER_FDN_BCD_LEN 20
+#define UIM_EXT2_REC_ADD_DATA_TYPE 0x2
+#define UIM_EXT2_REC_CALL_PARTY_SUBADD_TYPE 0x1
+#define UIM_EXT2_REC_FREE_TYPE 0x0
+
+#define UIM_ECC_NUMBER_BCD_LEN 3
+#define MAX_ECC_LIST 10
+#endif
+#define C2K_EF_SF_EUIMID_SIZE 7
+
+#define SESSIONID_LSH(id) (id << 5) // the LSB 5 bits are DFIndex, and the MSB 3 bits are SessionID
+#define SESSIONID_RSH(id) (id >> 5)
+#define DFINDEX(idx) (idx & 0x1f)
+
+/* UTK Command Tag Definitions */
+#define UTK_COMMAND_DETAILS_TAG 0X81
+#define UTK_DEVICE_IDENT_TAG 0X02
+#define UTK_RESULT_TAG 0X83
+#define UTK_DURATION_TAG 0X04
+#define UTK_ALPHA_IDENT_TAG 0X05
+#define UTK_ADDRESS_TAG 0X06
+#define UTK_CAPA_CONF_PARA_TAG 0X07
+#define UTK_SUB_ADDRESS_TAG 0x08
+#define UTK_CDMA_SMS_TPDU_TAG 0X48
+#define UTK_TEXT_STR_TAG 0X0D
+#define UTK_TONE_TAG 0X0E
+#define UTK_ITEM_TAG 0X0F
+#define UTK_ITEM_IDENT_TAG 0X10
+#define UTK_RESP_LENGTH_TAG 0X11
+#define UTK_FILE_LIST_TAG 0X12
+#define UTK_LOCATION_INFO_TAG 0X13
+#define UTK_IMEI_TAG 0X14
+#define UTK_HELP_REQUEST_TAG 0X15
+#define UTK_NET_MEASU_RESULT_TAG 0X16
+#define UTK_DEFAULT_TEXT_TAG 0X17
+#define UTK_ITEM_NEXT_ACT_INDIC_TAG 0X18
+#define UTK_EVENT_LIST_TAG 0X19
+#define UTK_LOCATION_STATUS_TAG 0x1B
+#define UTK_ICON_IDENT_TAG 0X1E
+#define UTK_ITEM_ICON_IDENT_LIST 0X1F
+#define UTK_TIMER_ID_TAG 0X24
+#define UTK_TIMER_VALUE_TAG 0X25
+#define UTK_IMMEDIATE_RESP_TAG 0X2B
+#define UTK_LANGUAGE_TAG 0X2D
+#define UTK_DATE_TIME_TAG 0X26
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+#define UTK_BC_REPEAT_INDICATOR_TAG 0X2A
+#endif
+#define UTK_DTMF_STRING_TAG 0X2C
+#define UTK_AID_TAG 0x2F
+#define UTK_ACCESS_TECHNOLOGY_TAG 0X3F
+
+/*command code*/
+#define UTK_SET_UP_MENU_CMD 0x25
+#define UTK_SET_UP_CALL_CMD 0x10
+#define UTK_SET_UP_SEND_SS 0x11
+#define UTK_SET_UP_SEND_USSD 0x12
+
+#define UTK_REFRESH_CMD 0x01
+#define UTK_MORE_TIME_CMD 0x02
+#define UTK_CDMA_SEND_SMS_CMD 0x13
+#define UTK_SEND_DTMF_CMD 0x14
+#define UTK_GEOGRAPHICAL_LOCATION_REQUEST 0x16
+
+#define UTK_CAUSE_TAG 0x1A
+#define UTK_TRANSACTION_IDENTIFIER_TAG 0x1C
+#define UTK_PLAY_TONE_CMD 0x20
+#define UTK_DISPLAY_TEXT_CMD 0x21
+#define UTK_GET_INPUT_CMD 0x23
+#define UTK_SELECT_ITEM_CMD 0X24
+#define UTK_POLL_INTERVAL_CMD 0x03
+#define UTK_POLLING_OFF_CMD 0x04
+#define UTK_SETUP_EVENT_LIST 0x05
+#define UTK_SESSION_END_CMD 0x81
+#define UTK_PROVIDE_LOCAL_INFORMATION_CMD 0x26
+#define UTK_TIMER_MANAGER_CMD 0x27
+#define UTK_GET_INKEY_CMD 0x22
+
+#define UTK_PERFORM_CARD_APDU 0x30
+#define UTK_POWER_ON_CARD 0x31
+#define UTK_POWER_OFF_CARD 0x32
+#define UTK_GET_READER_STATUS 0x33
+#define UTK_RUN_AT_COMMAND 0x34
+#define UTK_SERVICE_SEARCH 0x45
+#define UTK_GET_SERVICE_INFO 0x46
+#define UTK_DECLARE_SERVICE 0x47
+#define UTK_SET_FRAMES 0x50
+#define UTK_GET_GRAMES_STATUS 0x51
+#define UTK_RETRIEVE_MULTIMEDIA_MSG 0x60
+#define UTK_SUBIT_MULTIMEDIA_MSG 0x61
+#define UTK_DISPLAY_MULTIMEDIA_MSG 0x62
+#define UTK_ACTIVATE 0x70
+#define UTK_CONTACTLESS_STATE_CHANGED 0x71
+#define UTK_COMMAND_CONTAINER 0x72
+#define UTK_ENCAPSULATED_SESSION_CONTROL 0x73
+
+#define UTK_ESN_TAG 0x46
+#define UTK_MEID_TAG 0x6D
+
+#ifdef __CARRIER_RESTRICTION__
+#define UIM_EF_SPN_LENGTH 35
+#endif
+
+#define UIM_CMD_MSG_CLASS 0x0000
+#define UIM_NAM_MSG_CLASS 0x0100
+#define UIM_APP_MSG_CLASS 0x0200
+#define UIM_MNG_MSG_CLASS 0x0300
+
+#define CARD_FAST_RECOVERY_COUNT 3
+
+typedef enum
+{
+ VAL_UIM_CMD_RST_OK = 0x00, /*Command performed successfully*/
+ VAL_UIM_CMD_RST_OK_ICON_NOT_DISPLAYED = 0x4, /* command performed successfully,but request icon could not be displayed */
+ VAL_UIM_CMD_RST_REFRESH_PERFORM_BUT_NAA_NOT_ACTIVE = 0X08,
+ VAL_UIM_CMD_RST_NO_RESP_FROM_USER = 0x12, /*No response from user*/
+ VAL_UIM_CMD_RST_ME_UNABLE = 0x20, /*terminal currently unable to process command*/
+ VAL_UIM_CMD_RST_NET_UNABLE, /*Network currently unable to process command*/
+ VAL_UIM_CMD_RST_USER_NOT_ACCEPT, /*User did not accept the proactive command*/
+ VAL_UIM_CMD_RST_USER_CLEAR_CALL, /*User cleared down call before connection or network release*/
+ VAL_UIM_CMD_RST_CMD_BYD_CAP = 0x30, /*Command beyond terminal's capabilities*/
+ VAL_UIM_CMD_RST_CMD_TYPE_NOT_UND, /*Command type not understood by terminal*/
+ VAL_UIM_CMD_RST_CMD_DATA_NOT_UND, /*Command data not understood by terminal*/
+ VAL_UIM_CMD_RST_CMD_NUM_UNK, /*Command number not known by terminal*/
+ VAL_UIM_CMD_RST_REQ_VAL_MISS = 0x36, /*Error, required values are missing*/
+}ValUimCmdGenRstT;
+
+typedef enum
+{
+ VAL_UIM_CMD_ADD_INF_NO_CAUSE = 0x00, /*No specific cause can be given*/
+ VAL_UIM_CMD_ADD_INF_SCR_BUSY, /*Screen is busy*/
+ VAL_UIM_CMD_ADD_INF_BUSY_CALL, /*terminal currently busy on call*/
+ VAL_UIM_CMD_ADD_INF_NO_SERVICE = 0x04, /*No service*/
+ VAL_UIM_CMD_ADD_INF_ACC_CLASS_BAR = 0x05, /*Access control class bar*/
+ VAL_UIM_CMD_ADD_INF_RADIO_RES_NOT_GRANT=0x06,/*Radio resource not granted*/
+ VAL_UIM_CMD_ADD_INF_NOT_SPEECH_CALL, /*Not in speech call*/
+} ValUimCmdAddInfoT;
+
+#define C2K_UTK_FILE_NUM_MAX 50
+
+/*----------------------------------------------------------------------------
+ BER-TLV Tags
+----------------------------------------------------------------------------*/
+
+typedef enum
+{
+ VAL_UTK_REF_CMD_QUAL_UIM_INIT_FULL_FILE_CHANGE = 0,
+ VAL_UTK_REF_CMD_QUAL_UIM_FILE_CHANGE = 1,
+ VAL_UTK_REF_CMD_QUAL_UIM_INIT_FILE_CHANGE = 2,
+ VAL_UTK_REF_CMD_QUAL_UIM_INIT = 3,
+ VAL_UTK_REF_CMD_QUAL_UIM_RESET = 4,
+ VAL_UTK_REF_CMD_QUAL_UIM_APP_RESET = 5,
+ VAL_UTK_REF_CMD_QUAL_UIM_SESSION_RESET = 6,
+ VAL_UTK_REF_CMD_QUAL_STEERING_ROAMING = 7,
+ VAL_UTK_REF_CMD_QUAL_STEERING_ROAMING_FOR_I_WLAN = 8
+
+}ValUtkRefreshCmdQualT;
+
+typedef enum
+{
+ UTK_PROACTIVE_COMMAND_TAG = 0xD0,
+ UTK_CDMA_SMSPP_DOWNLOAD_TAG = 0xD1,
+ UTK_MENU_SELECTION_TAG = 0xD3,
+ UTK_CALL_CONTROL_TAG = 0xD4,
+ UTK_EVENT_DOWNLOAD_TAG = 0xD6,
+ UTK_TIMER_EXPIR_TAG = 0xD7
+}UtkBerTlvT;
+
+/*----------------------------------------------------------------------------
+ Device Identities
+----------------------------------------------------------------------------*/
+typedef enum
+{
+ UTK_KEYPAD = 0x01,
+ UTK_DISPLAY = 0x02,
+ UTK_EARPIECE = 0x03,
+ UTK_RUIM = 0x81,
+ UTK_TERMINAL = 0x82,
+ UTK_NETWORK = 0x83
+}UtkDeviceT;
+
+typedef enum
+{
+ UIM_MF = 0,
+ UIM_DF_CDMA,
+ UIM_DF_TELECOM,
+ UIM_DF_GSM,
+ UIM_DF_PHS,
+ UIM_DF_CURRENTDF,
+ UIM_DF_CSIM = 7,
+ UIM_DF_USIM,
+ UIM_DF_ISIM,
+/*child DF*/
+ UIM_DF_GLOBALPHB, /*,global phb,7f10/0x5F3A*/
+ UIM_DF_CSIMPHB,/*app phb ,CSIM/0x5F3A*/
+ UIM_DF_USIMPHB,/*app phb ,USIM/0x5F3A*/
+ UIM_DF_GSM_ACCESS, /*0x5F3B*/
+ UIM_DF_MAX_NUM
+} UimDFIndexT;
+
+
+/* UIM APP ID is used to diffirentiate each APP. Either CSIM or RUIM is active for MD3 */
+typedef enum
+{
+ CARD_APP_ID_ISIM,
+ CARD_APP_ID_USIM,
+ CARD_APP_ID_CSIM,
+ CARD_APP_ID_SIM,
+ CARD_APP_ID_RUIM,
+ CARD_APP_ID_MAX_NUM,
+ CARD_APP_INVALID = 0xff
+} UimCardAppIdT;
+
+/*------------------------------------------------------------------------
+* Define UIM message interface constants and structures
+*------------------------------------------------------------------------*/
+#define UIM_MAX_NAI_NUM 16
+
+typedef enum
+{
+ UIM_BOOT_UP_NORMAL = 0,
+ UIM_BOOT_UP_EXCEPTION,
+ UIM_BOOT_UP_NUM
+} UimBootUpModeE;
+
+typedef enum
+{
+ /* 3f00 */
+ C2K_EF_ICCID_IDX,
+ C2K_EF_PL_IDX,
+ C2K_EF_DIR_IDX,
+
+ /* 7F20 for gsm file */
+ C2K_EF_GSM_IMSI_IDX,
+ C2K_EF_GSM_ECC_IDX,
+
+ /* 7F10 for TELECOM file */
+ C2K_T_EF_ADN_IDX,
+ C2K_T_EF_FDN_IDX,
+ C2K_T_EF_CCP_IDX,
+ C2K_T_EF_ECCP_IDX,
+ C2K_T_EF_MSISDN_IDX,
+ C2K_T_EF_SMSP_IDX,
+ C2K_T_EF_SMSS_IDX,
+ C2K_T_EF_LND_IDX,
+ C2K_T_EF_SMSR_IDX,
+ C2K_T_EF_SDN_IDX,
+ C2K_T_EF_EXT_1_IDX,
+ C2K_T_EF_EXT_2_IDX,
+ C2K_T_EF_EXT_3_IDX,
+ C2K_T_EF_BDN_IDX,
+ C2K_T_EF_EXT_4_IDX,
+ C2K_T_EF_PSC_IDX,
+ C2K_T_EF_CC_IDX,
+ C2K_T_EF_PUID_IDX,
+ C2K_T_EF_PBR_IDX,
+
+ /* 7F25 for uim file */
+ C2K_U_EF_ECC_IDX,
+ C2K_U_EF_SPN_IDX,
+ C2K_U_EF_EPRL_IDX,
+ C2K_U_EF_PRL_IDX,
+ C2K_U_EF_OTA_IDX,
+ C2K_U_EF_MECRP_IDX,
+
+ C2K_U_EF_AD_IDX,
+ C2K_U_EF_UIM_ID_IDX,
+ C2K_U_EF_COUNT_IDX,
+ C2K_U_EF_IMSI_M_IDX,
+ C2K_U_EF_IMSI_T_IDX,
+ C2K_U_EF_CDMA_HOME_IDX,
+ C2K_U_EF_ACCOLC_IDX,
+ C2K_U_EF_TERM_IDX,
+ C2K_U_EF_SSCI_IDX,
+ C2K_U_EF_OTAPASPC_IDX,
+ C2K_U_EF_NAMLOCK_IDX,
+ C2K_U_EF_MDN_IDX,
+ C2K_U_EF_CST_IDX,
+ C2K_U_EF_USGIND_IDX,
+ C2K_U_EF_SFEUIMID_IDX,
+ C2K_U_EF_SPCS_IDX,
+ C2K_U_EF_MEID_IDX,
+
+ C2K_U_EF_TMSI_IDX,
+ C2K_U_EF_ZNREGI_IDX,
+ C2K_U_EF_SNREGI_IDX,
+ C2K_U_EF_DISREGI_IDX,
+ C2K_U_EF_SP_IDX,
+ C2K_U_EF_REVISION_IDX,
+ C2K_U_EF_RUIM_PL_IDX,
+ C2K_U_EF_SMS_IDX,
+ C2K_U_EF_SMSP_IDX,
+ C2K_U_EF_SMSS_IDX,
+ C2K_U_EF_SSFC_IDX,
+ C2K_U_EF_MAXPRL_IDX,
+ C2K_U_EF_ME3GPDOPC_IDX,
+ C2K_U_EF_3GPDOPM_IDX,
+ C2K_U_EF_SIPCAP_IDX,
+ C2K_U_EF_MIPCAP_IDX,
+ C2K_U_EF_SIPUPP_IDX,
+ C2K_U_EF_MIPUPP_IDX,
+ C2K_U_EF_SIPSP_IDX,
+ C2K_U_EF_MIPSP_IDX,
+ C2K_U_EF_SIPPAPSS_IDX,
+ C2K_U_EF_PUZL_IDX,
+ C2K_U_EF_MAXPUZL_IDX,
+ C2K_U_EF_HRPDCAP_IDX,
+ C2K_U_EF_HRPDUPP_IDX,
+ C2K_U_EF_CSSPR_IDX,
+ C2K_U_EF_ATC_IDX,
+ C2K_U_EF_BCSMSCFG_IDX,
+ C2K_U_EF_BCSMSPREF_IDX,
+ C2K_U_EF_BCSMSTABLE_IDX,
+ C2K_U_EF_BCSMSP_IDX,
+ C2K_U_EF_DCK_IDX,
+ C2K_U_EF_GID_1_IDX,
+ C2K_U_EF_GID_2_IDX,
+ C2K_U_EF_CDMACNL_IDX,
+ C2K_U_EF_HOMETAG_IDX,
+ C2K_U_EF_GROUPTAG_IDX,
+ C2K_U_EF_MODEL_IDX,
+ C2K_U_EF_SMSCAP_IDX,
+ C2K_U_EF_IPV6CAP_IDX,
+ C2K_U_EF_MIPFLAGS_IDX,
+ C2K_U_EF_TCPCFG_IDX,
+ C2K_U_EF_DATAGENCFG_IDX,
+ C2K_U_EF_3GPDUPPEXT_IDX,
+
+ /* 7FFF for csim file */
+ C2K_C_EF_ECC_IDX,
+ C2K_C_EF_SPN_IDX,
+ C2K_C_EF_EPRL_IDX,
+ C2K_C_EF_PRL_IDX,
+ C2K_C_EF_OTA_IDX,
+ C2K_C_EF_MECRP_IDX,
+
+ C2K_C_EF_AD_IDX,
+ C2K_C_EF_UIM_ID_IDX,
+ C2K_C_EF_COUNT_IDX,
+ C2K_C_EF_IMSI_M_IDX,
+ C2K_C_EF_IMSI_T_IDX,
+ C2K_C_EF_CDMA_HOME_IDX,
+ C2K_C_EF_ACCOLC_IDX,
+ C2K_C_EF_TERM_IDX,
+ C2K_C_EF_SSCI_IDX,
+ C2K_C_EF_OTAPASPC_IDX,
+ C2K_C_EF_NAMLOCK_IDX,
+ C2K_C_EF_MDN_IDX,
+ C2K_C_EF_CST_IDX,
+ C2K_C_EF_USGIND_IDX,
+ C2K_C_EF_SFEUIMID_IDX,
+ C2K_C_EF_SPCS_IDX,
+ C2K_C_EF_EST_IDX,
+ C2K_C_EF_MEID_IDX,
+
+ C2K_C_EF_TMSI_IDX,
+ C2K_C_EF_ZNREGI_IDX,
+ C2K_C_EF_SNREGI_IDX,
+ C2K_C_EF_DISREGI_IDX,
+ C2K_C_EF_SP_IDX,
+ C2K_C_EF_LI_IDX,
+ C2K_C_EF_FDN_IDX,
+ C2K_C_EF_SMS_IDX,
+ C2K_C_EF_SMSP_IDX,
+ C2K_C_EF_SMSS_IDX,
+ C2K_C_EF_SSFC_IDX,
+ C2K_C_EF_MAXPRL_IDX,
+ C2K_C_EF_ME3GPDOPC_IDX,
+ C2K_C_EF_3GPDOPM_IDX,
+ C2K_C_EF_SIPCAP_IDX,
+ C2K_C_EF_MIPCAP_IDX,
+ C2K_C_EF_SIPUPP_IDX,
+ C2K_C_EF_MIPUPP_IDX,
+ C2K_C_EF_SIPSP_IDX,
+ C2K_C_EF_MIPSP_IDX,
+ C2K_C_EF_SIPPAPSS_IDX,
+ C2K_C_EF_PUZL_IDX,
+ C2K_C_EF_MAXPUZL_IDX,
+ C2K_C_EF_HRPDCAP_IDX,
+ C2K_C_EF_HRPDUPP_IDX,
+ C2K_C_EF_CSSPR_IDX,
+ C2K_C_EF_ATC_IDX,
+ C2K_C_EF_BCSMSCFG_IDX,
+ C2K_C_EF_BCSMSPREF_IDX,
+ C2K_C_EF_BCSMSTABLE_IDX,
+ C2K_C_EF_BCSMSP_IDX,
+ C2K_C_EF_DCK_IDX,
+ C2K_C_EF_GID_1_IDX,
+ C2K_C_EF_GID_2_IDX,
+ C2K_C_EF_CDMACNL_IDX,
+ C2K_C_EF_HOMETAG_IDX,
+ C2K_C_EF_GROUPTAG_IDX,
+ C2K_C_EF_SDN_IDX,
+ C2K_C_EF_EXT_2_IDX,
+ C2K_C_EF_EXT_3_IDX,
+ C2K_C_EF_ICI_IDX,
+ C2K_C_EF_OCI_IDX,
+ C2K_C_EF_EXT_5_IDX,
+ C2K_C_EF_CCP_2_IDX,
+ C2K_C_EF_MODEL_IDX,
+ C2K_C_EF_SMSCAP_IDX,
+ C2K_C_EF_MIPFLAGS_IDX,
+ C2K_C_EF_3GPDUPPEXT_IDX,
+ C2K_C_EF_IPV6CAP_IDX,
+ C2K_C_EF_TCPCFG_IDX,
+ C2K_C_EF_DATAGENCFG_IDX,
+ C2K_C_EF_PSC_IDX,
+ C2K_C_EF_CC_IDX,
+ C2K_C_EF_PUID_IDX,
+ C2K_C_EF_PBR_IDX,
+ C2K_C_EF_ADN_IDX,
+ C2K_EF_MAX_NUM
+}cuim_file_idx_enum;
+
+typedef enum
+{
+ C2K_C_EF_AD_SFI_ID = 1,
+ C2K_C_EF_CST_SFI_ID,
+ C2K_C_EF_ACCOLC_SFI_ID,
+ C2K_C_EF_IMSI_M_SFI_ID,
+ C2K_C_EF_IMSI_T_SFI_ID,
+ C2K_C_EF_TMSI_SFI_ID,
+ C2K_C_EF_PRL_SFI_ID,
+ C2K_C_EF_SPN_SFI_ID,
+ C2K_C_EF_ECC_SFI_ID,
+ C2K_C_EF_LI_SFI_ID,
+ C2K_C_EF_3GCIK_SFI_ID,
+ C2K_C_EF_CDMA_HOME_SFI_ID,
+ C2K_C_EF_SNREGI_SFI_ID,
+ C2K_C_EF_EPRL_SFI_ID,
+ C2K_C_EF_EST_SFI_ID,
+ C2K_C_EF_ICI_SFI_ID,
+ C2K_C_EF_OCI_SFI_ID,
+ C2K_C_EF_CCP2_SFI_ID
+}cuim_file_sfi_id_enum;
+
+typedef struct
+{
+ kal_uint8 EccNum[UIM_ECC_NUMBER_BCD_LEN];/* ecc number value, encode with BCD format according to C.S0065 */
+}UimEccContactT;
+
+typedef struct
+{
+ kal_uint8 file_num;
+ cuim_file_idx_enum file_list[C2K_UTK_FILE_NUM_MAX];
+ kal_bool phb_file_existed;
+}uimFileListStruct;
+
+typedef enum
+{
+ UIM_UTK_FULL_FILE_CHANGED,
+ UIM_UTK_INIT_WITH_FILE_CHANGED,
+ UIM_UTK_FILE_CHANGED_ONLY
+}uimUtkFileChangeTypeT;
+
+typedef struct
+{
+ uimUtkFileChangeTypeT file_change;
+ kal_uint8 file_num;
+ kal_uint16 file_id[C2K_UTK_FILE_NUM_MAX];
+}uimUtkFileChangedIndMsgT;
+
+typedef struct
+{
+ kal_bool call_connected;
+}uimCallStatusMsgT;
+
+typedef struct
+{
+ kal_bool ims_registered;
+}uimImsRegisterStatusMsgT;
+
+/* Define UIM Rsp MSG information which will be used for UIM Response message */
+typedef struct
+{
+ module_type DestModId;
+ kal_uint32 MsgId;
+ kal_uint8 ChanId;
+} UimRspInfoT;
+
+/* Define UIM msg header format */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+} UimMsgHeaderT;
+
+/* Define UIM msg response for UIM_CMD_MSG_CLASS format */
+typedef struct
+{
+ kal_uint32 MsgId;
+ module_type DestModId;
+ kal_uint8 ChanId;
+ kal_bool is_cdma_only_card;/* used only for UTK proactive command */
+ kal_uint8 uim_index; /* used only for UTK proactive command */
+ kal_uint16 cmd_id; /* used only for UTK proactive command */
+ kal_uint16 Sw; /* status word, 0x9000 denotes ACK, 0x0000 denotes FAULT, other value see GSM11.11 */
+ kal_uint16 Len;
+ kal_uint8 Data[CUIM_APDU_RSP_MAX_LEN];
+} UimRspMsgT;
+
+/* Define UIM raw cmd msg command */
+typedef struct
+{
+ kal_uint16 Sw; /* status word, 0x9000 denotes ACK, 0x0000 denotes FAULT, other value see GSM11.11 */
+ kal_uint8 CaveSeqId;
+ kal_uint16 CaveMsgId;
+ kal_uint16 Len;
+ kal_uint8 Data[CUIM_APDU_RSP_MAX_LEN];
+} UimRspToPsMsgT;
+
+/* Define UIM raw cmd msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Cmd[5];
+ kal_uint16 Len;
+ kal_uint8 Data[CUIM_APDU_REQ_BODY_MAX_LEN];
+} UimRawCmdMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint16 Len;
+ kal_uint8* Data;
+} UimExtendedRawCmdMsgT;
+
+/* Define UIM select msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_bool IsFullPath; //Whether full path from MF
+ kal_uint16 EfId; //Used when IsFullPath = False
+ UimDFIndexT DfIndex; //Used when IsFullPath = False
+ kal_uint8 FullPathLen; //Used when IsFullPath = True
+ kal_uint8 FullPath[8]; //Used when IsFullPath = True
+} UimSelectMsgT;
+/* Define UIM status msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+} UimStatusMsgT;
+
+/* Define UIM read record msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_bool IsFullPath; //Whether full path from MF
+ kal_uint16 EfId; //Used when IsFullPath = False
+ UimDFIndexT DfIndex; //Used when IsFullPath = False
+ kal_uint8 FullPathLen; //Used when IsFullPath = True
+ kal_uint8 FullPath[8]; //Used when IsFullPath = True
+ kal_uint8 RecordIndex;
+} UimReadRecordMsgT;
+
+/* Define UIM update record msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_bool IsFullPath; //Whether full path from MF
+ kal_uint16 EfId; //Used when IsFullPath = False
+ UimDFIndexT DfIndex; //Used when IsFullPath = False
+ kal_uint8 FullPathLen; //Used when IsFullPath = True
+ kal_uint8 FullPath[8]; //Used when IsFullPath = True
+ kal_uint8 RecordIndex;
+ kal_uint8 Len;
+ kal_uint8 Data[CUIM_APDU_REQ_BODY_MAX_LEN];
+} UimUpdateRecordMsgT;
+
+/* Define UIM search record msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_bool IsFullPath; //Whether full path from MF
+ kal_uint16 EfId; //Used when IsFullPath = False
+ UimDFIndexT DfIndex; //Used when IsFullPath = False
+ kal_uint8 FullPathLen; //Used when IsFullPath = True
+ kal_uint8 FullPath[8]; //Used when IsFullPath = True
+ kal_uint8 RecordIndex;
+ kal_uint8 Mode;
+ kal_uint8 Len;
+ kal_uint8 Data[CUIM_APDU_REQ_BODY_MAX_LEN];
+} UimSearchRecordMsgT;
+
+/* Define UIM read binary msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_bool IsFullPath; //Whether full path from MF
+ kal_uint16 EfId; //Used when IsFullPath = False
+ UimDFIndexT DfIndex; //Used when IsFullPath = False
+ kal_uint8 FullPathLen; //Used when IsFullPath = True
+ kal_uint8 FullPath[8]; //Used when IsFullPath = True
+ kal_uint16 Offset;
+ kal_uint8 Len;
+} UimReadBinaryMsgT;
+
+/* Define UIM update binary msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_bool IsFullPath; //Whether full path from MF
+ kal_uint16 EfId; //Used when IsFullPath = False
+ UimDFIndexT DfIndex; //Used when IsFullPath = False
+ kal_uint8 FullPathLen; //Used when IsFullPath = True
+ kal_uint8 FullPath[8]; //Used when IsFullPath = True
+ kal_uint16 Offset;
+ kal_uint8 Len;
+ kal_uint8 Data[CUIM_APDU_REQ_BODY_MAX_LEN];
+} UimUpdateBinaryMsgT;
+
+/************************************
+ CHV command message definition
+ ************************************/
+/* verify CHV msg */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 ChvId; /* Specify the CHV */
+ kal_uint8 ChvLen;
+ kal_uint8 ChvVal[8]; /* CHV value */
+} UimVerifyCHVMsgT;
+
+/* change CHV msg */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 ChvId; /* Specify the CHV */
+ kal_uint8 OldChvLen;
+ kal_uint8 OldChvVal[8]; /* Old CHV value */
+ kal_uint8 NewChvLen;
+ kal_uint8 NewChvVal[8]; /* New CHV value */
+} UimChangeCHVMsgT;
+
+/* Disable CHV Msg */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 ChvLen;
+ kal_uint8 Chv1Val[8]; /* CHV1 value */
+} UimDisableCHVMsgT;
+
+/* Enable CHV Msg*/
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 ChvLen;
+ kal_uint8 Chv1Val[8]; /* CHV1 value */
+} UimEnableCHVMsgT;
+
+/* Unblock CHV Msg */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 ChvId; /* Specify the CHV */
+ kal_uint8 UblkChvLen;
+ kal_uint8 UblkChvVal[8]; /* Unblock CHV value */
+ kal_uint8 NewChvLen;
+ kal_uint8 NewChvVal[8]; /* New CHV value */
+} UimUnblockCHVMsgT;
+
+/***********************************************
+ UTK Commands
+************************************************/
+/* UIM Terminal Profile command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Profile[TERM_PROFILE_LEN]; /* The list of UIM Application Toolkit
+ facilities that are supported by the ME */
+} UimTermProfileMsgT;
+
+/* Define UIM Terminal Response command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Len; /* Length of response data */
+ kal_uint8 Data[CUIM_APDU_REQ_BODY_MAX_LEN]; /* Response data */
+ kal_uint16 CmdId;
+} UimTermRspMsgT;
+
+/* Define UIM Envelope command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Len; /* Length of envelope data */
+ kal_uint8 Data[CUIM_APDU_REQ_BODY_MAX_LEN];/* Envelope data */
+} UimEnvelopeMsgT;
+/***********************************************
+ based OTASP\OPAPA Commands
+ ***********************************************/
+typedef enum
+{
+ BCMCS_TYPE_RETRIEVE_SK = 0x00,
+ BCMCS_TYPE_UPDATE_BAK,
+ BCMCS_TYPE_DELETE_BAK,
+ BCMCS_TYPE_RETRIEVE_SRTP_SK,
+ BCMCS_TYPE_GEN_AUTH_SIGNATURE,
+ BCMCS_TYPE_BCMCS_AUTH,
+ BCMCS_TYPE_INVALID = 0xFF
+} BcmcsTypeT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 RANDSeed[20];
+ kal_uint8 A_KEY_P_REV;
+ kal_uint8 PLen;
+ kal_uint8 GLen;
+ kal_uint8 PARAM_P[UIM_PARAM_P_LEN];
+ kal_uint8 PARAM_G[UIM_PARAM_G_LEN];
+} UimMSKeyMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Len;
+ kal_uint8 Result[UIM_MAX_BS_RESULT_LEN];
+} UimKeyGenMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+} UimCommitMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Block;
+ kal_uint8 Len;
+ kal_uint8 Data[UIM_MAX_PARAM_SIZE];
+} UimValidateMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Block;
+} UimConfigurationMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Block;
+ kal_uint8 Len;
+ kal_uint8 Data[UIM_MAX_PARAM_SIZE];
+} UimDownloadMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Block;
+ kal_uint16 ReqOffset;
+ kal_uint8 ReqMax;
+} UimSSPRConfigurationMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Block;
+ kal_uint8 Len;
+ kal_uint8 Data[UIM_MAX_OTA_DATA_BURST_SIZE];
+} UimSSPRDownloadMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Block;
+} Uim3gpdConfigurationRequestMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Block;
+ kal_uint8 Len;
+ kal_uint8 Data[UIM_MAX_OTA_DATA_BURST_SIZE];
+} Uim3gpdDownloadRequestMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 StartStop;
+ kal_uint32 RANDSeed;
+ kal_uint8 Esn[7];
+} UimOTAPAMsgT;
+
+/***********************************************
+ ANSI-41-based Security-Related Commands
+ ***********************************************/
+/* Base station challenge msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint32 RandSeed; /* A random number generated by ME */
+ kal_uint8 RandSSD[7]; /* A random number generated by BS, received
+ in Update SSD message */
+ kal_uint8 ProcessCtrl; /* Process control */
+ kal_uint32 Esn; /* Electronic Serial Number */
+} UimBSChallengeMsgT;
+
+/* confirm SSD msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint32 AuthBS; /* Value of AUTHBS received in Base Station
+ Challenge Confirmation Order */
+} UimConfirmSSDMsgT;
+
+/* Run Cave msg command */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 RandType; /* Type of RandVal */
+ kal_uint32 RandVal; /* A random number generated by BS ,
+ Global random challenge or Unique random challenge */
+ kal_uint8 DigLen; /* Length of digit */
+ kal_uint8 Digit[3]; /* A subset of (coded) dialed digits*/
+ kal_uint8 ProcessCtrl; /* Process control */
+ kal_uint32 Esn; /* Electronic Serial Number */
+ kal_uint8 CaveSeqId;
+ kal_uint16 CaveMsgId;
+} UimRunCaveMsgT;
+
+/* Generate Key/VPM msg command */
+typedef struct
+{
+ kal_uint8 VPMFirst; /* First octet of VPM to be output */
+ kal_uint8 VPMLast; /* Last octet of VPM to be output */
+ kal_uint8* KeyDataP; /* the pointer to key buffer */
+ kal_uint8* VPMDataP; /* the pointer to vpm buffer */
+} UimGenerateKeyVPMMsgT;
+
+/* Store ESN_ME */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Len;
+ kal_uint8 Esn[7];
+ kal_bool UsageInd;
+} UimStoreEsnMeMsgT;
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+/* Store ESN_ME for SMS REG */
+typedef struct
+{
+ kal_uint8 Esn[8];
+} UimSmsStoreEsnMeMsgT;
+#endif
+/*******************Related NAM data message************************/
+/* Get Nam data from UIM card */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+} UimGetNamDataMsgT;
+
+/* Define Cst and EST sevice list index */
+typedef enum
+{
+ CHV_DISABLE_INDEX = 0, /*CHV disable function*/
+ ADN_INDEX, /*Abbreviated Dialing Numbers*/
+ FDN_INDEX, /*Fixed Dialing Numbers*/
+ SDN_INDEX, /*Service Dialing Numbers (SDN)*/
+ SMS_INDEX, /*Short Message Storage (SMS)*/
+ SMP_INDEX, /*Short Message Storage parameters*/
+ HRPD_INDEX, /*HRPD*/
+ SMSBROADCAST_INDEX,/*Data Download via SMS Broadcast*/
+ SMSPP_INDEX, /*Data Download via SMS-PP*/
+ EUIMID_INDEX, /*SF_EUIMID-based EUIMID*/
+ MEID_INDEX, /*MEID, only used in RUIM*/
+ CALL_CONTROL_INDEX, /*Call Control*/
+ SIP_INDEX, /*3GPD-SIP*/
+ MIP_INDEX, /*3GPD-MIP*/
+ AKA_INDEX, /*AKA*/
+ OCI_INDEX, /*Outgoing Call Information (OCI)*/
+ ICI_INDEX, /*Incoming Call Information (ICI)*/
+ EST_INDEX, /*Enabled Services Table*/
+ OMH_INDEX,
+ IPV6_INDEX, /* IPv6 */
+ MESSAGE_3GPD_EXT_INDEX, /* message and 3GPD extensions */
+ EXT2_INDEX,
+ GID1_INDEX,
+ GID2_INDEX,
+ ECST_MAX_NUM
+}UimECstIndexT;
+
+/* NAM structure in UIM */
+typedef struct
+{
+ kal_uint8 COUNTsp; /* Call Count */
+ kal_bool IMSI_M_Valid; /* IMSI_M */
+ IMSIType IMSI_Mp;
+ kal_bool IMSI_T_Valid; /* IMSI_T */
+ IMSIType IMSI_Tp;
+ kal_uint8 ASSIGNING_TMSI_ZONE_LENsp; /* TMSI */
+ kal_uint8 ASSIGNING_TMSI_ZONEsp[ CP_MAX_TMSI_ZONE_LEN ];
+ kal_uint32 TMSI_CODEsp;
+ kal_uint32 TMSI_EXP_TIMEsp;
+ kal_uint16 HOME_SIDp; /* Analog Home SID */
+ kal_uint8 EXp; /* Analog Operational Parameters */
+ kal_uint32 NXTREGsp; /* Analog Location and Registration Indicators */
+ kal_uint16 SIDsp;
+ kal_uint16 LOCAIDsp;
+ kal_bool PUREGsp;
+ kal_uint16 SIDp[MAX_POSITIVE_SIDS]; /* CDMA Home SID, NID */
+ kal_uint16 NIDp[MAX_POSITIVE_SIDS];
+ kal_uint8 NUM_POSITIVE_SID_NIDp;
+ ZoneList ZONE_LISTsp; /* CDMA Zone-Based Registration Indicators */
+ SidNidList SID_NID_LISTsp; /* CDMA System/Network Registration Indicators */
+ kal_int32 BASE_LAT_REGsp; /* CDMA Distance-Based Registration Indicators */
+ kal_int32 BASE_LONG_REGsp;
+ kal_uint16 REG_DIST_REGsp;
+ kal_uint8 ACCOLCp; /* access overload class */
+ kal_uint8 MOB_TERM_HOMEp;/* Call Termination Mode Preferences */
+ kal_uint8 MOB_TERM_SIDp;
+ kal_uint8 MOB_TERM_NIDp;
+ kal_uint8 SLOT_CYCLE_INDEXp;/* Suggested Slot Cycle Index */
+ kal_uint16 FIRSTCHPp; /* Analog Channel Preferences */
+ kal_uint16 FCCA;
+ kal_uint16 FCCB;
+ kal_uint8 NUM_FCC_SCAN;
+ kal_bool ALLOW_OTAPA; /* OTAPA/SPC_Enable */
+ kal_bool NAM_LOCKp; /* NAM_LOCK */
+ kal_uint8 MDN_NUM_DIGITS; /* EF Mobile Directory Number */
+ kal_uint8 Mdn[16];
+ kal_uint32 UimId; /* UIMID */
+ kal_uint8 ECST[ECST_MAX_NUM]; /*bit 0: allocated or not,bit 1: service activated or not*/
+ kal_bool SF_EUIMID_UsageInd;
+ kal_uint8 SF_EUIMID[C2K_EF_SF_EUIMID_SIZE];
+ kal_bool UIM_ID_UsageInd;
+ kal_uint8 PREF_SERV_BAND0p;/* Service Preferences */
+ kal_uint8 SPC_Status;
+} UimNamT;
+
+/* Response data structure of MSG_ID_UIM_GET_NAM_DATA_MSG */
+typedef struct
+{
+ UimNamT UimNam; /* Nam data in UIM */
+} UimGetNamDataRspMsgT;
+
+/* Request the update of NAM */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimNamT UimNam;
+} UimUpdateNamDataMsgT;
+
+/* Response of the update of NAM */
+typedef struct
+{
+ kal_bool Ack;
+} UimUpdateNamDataRspMsgT;
+
+typedef struct
+{
+ kal_uint16 Sw; /* status word, 0x9000 denotes ACK, 0x0000 denotes FAULT, other value see GSM11.11 */
+ kal_uint16 Len;
+ kal_uint8 CST[ECST_MAX_NUM]; /* Refer to UimECstIndexT for each Service Option */
+ kal_bool IsCardReady;
+ kal_uint16 IsCSIMCard; /* 0 for UIM, 1 for CSIM */
+} UimGetCstRspMsgT;
+
+/*****************************************************************************
+ * Phonebook
+ ****************************************************************************/
+typedef enum
+{
+ PHB_STOR_LND = 0x6f44, /*EFLND (Last number dialled)*/
+ PHB_STOR_ADN = 0x6f3a, /*EFADN (Abbreviated dialling numbers)*/
+ PHB_STOR_FDN = 0x6f3b, /*EFFDN (Fixed dialling numbers)*/
+ PHB_STOR_SDN = 0x6f49, /*EFSDN (Service Dialling Numbers)*/
+ PHB_STORE_EXT2 = 0x6f7a,
+ PHB_STORE_EXT2_UIM = 0x6f4b,
+ PHB_STOR_FILE_COUNT
+} UimPhbStorFileT; /* phonebook storage */
+
+typedef enum /* phonebook storage */
+{
+ PHB_GLOBAL = 0, /*global phb*/
+ PHB_CSIM = 1, /*Csim phb*/
+ PHB_USIM = 2, /*Usim phb*/
+ PHB_ISIM = 3, /*Isim phb*/
+ PHB_MAX_LEVEL
+} UimPhbLevelT;
+
+/* Request phone book records Params*/
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimPhbStorFileT FileType;
+ UimPhbLevelT PhbLevel;
+} UimGetPhbRecParamsMsgT;
+
+/* Response data structure of MSG_ID_UIM_GET_PHB_REC_PARAMS_MSG */
+typedef struct
+{
+ kal_bool Ack;
+ UimPhbStorFileT FileType;
+ kal_uint16 PhbRecCount;
+ kal_uint8 PhbPerRecSize;
+#ifdef MTK_CBP
+ kal_bool FdnEnabled;
+ kal_uint8 FdnRecCount;
+ kal_uint8 FdnRecSize;
+#endif
+} UimGetPhbRecParamsRspMsgT;
+
+/* Request a record of phone book */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimPhbStorFileT FileType;
+ kal_uint8 RecordIndex;
+ UimPhbLevelT PhbLevel;
+} UimGetPhoneRecMsgT;
+
+/*Response data structure of MSG_ID_UIM_GET_PHB_REC_MSG */
+typedef struct
+{
+ kal_bool Ack;
+ UimPhbStorFileT FileType;
+ kal_bool IsFree;
+ kal_uint8 RecordIndex;
+ kal_uint8 AlphaIdentifier[MAXALPHALENGTH];
+ kal_uint8 PhoneNumber[MAX_NUMBER_BCD_LEN];
+ kal_uint8 TON;
+ kal_uint8 NPI;
+} UimGetPhoneRecRspMsgT;
+
+
+ /* Request the update of a record of phone book */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimPhbStorFileT FileType;
+ kal_uint8 RecordIndex;
+ kal_uint8 AlphaIdentifier[MAXALPHALENGTH];
+ kal_uint8 PhoneNumber[MAX_NUMBER_BCD_LEN];
+ kal_uint8 TON;
+ kal_uint8 NPI;
+ UimPhbLevelT PhbLevel;
+} UimUpdatePhoneRecMsgT;
+
+
+/* Response data of MSG_ID_UIM_UPDATE_PHB_REC_MSG */
+typedef struct
+{
+ kal_bool Ack;
+ UimPhbStorFileT FileType;
+ kal_uint8 RecordIndex;
+} UimUpdatePhoneRecRspMsgT;
+
+/*Request to erase a record of phone book */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimPhbStorFileT FileType;
+ kal_uint8 RecordIndex;
+ UimPhbLevelT PhbLevel;
+} UimErasePhoneRecMsgT;
+
+/* Response data of MSG_ID_UIM_ERASE_PHB_REC_MSG */
+typedef struct
+{
+ kal_bool Ack;
+ UimPhbStorFileT FileType;
+ kal_uint8 RecordIndex;
+} UimErasePhoneRecRspMsgT;
+
+
+/* Request SMS(EFSMS) records sum*/
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+} UimGetSmsRecParamsMsgT;
+
+/* Response data structure of UIM_GET_SMS_REC_ PARAMS _MSG */
+typedef struct
+{
+ kal_bool Ack;
+ kal_uint8 SmsRecCount;
+ kal_uint8 SmsPerRecSize;
+ kal_uint8 SmsNullRecLen;
+ kal_uint8 SmsNullRec[CUIM_APDU_RSP_MAX_LEN]; /*pointer to record status*/
+} UimGetSmsRecParamsRspMsgT;
+
+/* Request a record of SMS */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 RecordIndex;
+} UimGetSmsRecMsgT;
+
+/*Response data structure of MSG_ID_UIM_GET_SMS_REC_MSG*/
+typedef struct
+{
+ kal_bool Ack;
+ kal_uint8 RecordIndex;
+ kal_uint8 Status;
+ kal_uint8 MsgLen;
+ kal_uint8 MsgData[CUIM_APDU_RSP_MAX_LEN];
+} UimGetSmsRecRspMsgT;
+
+ /* Request the update of SMS record */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 RecordIndex;
+ kal_uint8 Status;
+ kal_uint8 MsgLen;
+ kal_uint8 MsgData[CUIM_APDU_REQ_BODY_MAX_LEN];
+} UimUpdateSmsRecMsgT;
+
+ /* Response data of MSG_ID_UIM_UPDATE_SMS_REC_MSG*/
+typedef struct
+{
+ kal_bool Ack;
+ kal_uint8 RecordIndex;
+} UimUpdateSmsRecRspMsgT;
+
+ /* Request Erase SMS record */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 RecordIndex;
+} UimEraseSmsRecMsgT;
+
+ /* Response data of MSG_ID_UIM_ERASE_SMS_REC_MSG*/
+typedef struct
+{
+ kal_bool Ack;
+ kal_uint8 RecordIndex;
+} UimEraseSmsRecRspMsgT;
+
+#ifdef MTK_CBP
+/* Request the capability of SMS */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+} UimGetSmsCapMsgT;
+
+/*Response data structure of MSG_ID_UIM_GET_SMS_CAP_MSG */
+typedef struct
+{
+ kal_uint8 RetryPeriod;
+ kal_uint8 RetryInterval;
+ kal_uint8 Flags;
+ kal_uint8 PrefSO;
+} UimGetSmsCapRspMsgT;
+#endif
+
+/***************End of APP API about PhoneBook and SMS***************/
+
+#ifdef MTK_DEV_C2K_IRAT
+/*****************************************
+ define the types for UIM Bluetooth SAP
+******************************************/
+typedef enum
+{
+ BTSAP_PRO_TYPE_0 = 0x00, /*Transport protocol type T=0*/
+ BTSAP_PRO_TYPE_1 = 0x01, /*Transport protocol type T=1*/
+ BTSAP_PRO_TYPE_0_1 = 0x02, /*Transport protocol type T=0 and T=1*/
+ BTSAP_PRO_TYPE_INVALID = 0xFF, /* Invalid transport protocol type*/
+}BtsapProTypeT;
+
+/******************Bluetooth SAP related msg************************/
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+} UimBtsapConnectMsgT,
+ UimBtsapDisconnectMsgT,
+ UimBtsapPowerOffMsgT;
+
+typedef struct
+{
+ kal_uint16 result;
+} UimBtsapDisconnectRspMsgT,
+ UimBtsapPowerOffRspMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ BtsapProTypeT transport_protocol_type;
+} UimBtsapPowerOnMsgT,
+ UimBtsapResetMsgT;
+
+typedef struct
+{
+ kal_uint16 result;
+ BtsapProTypeT current_transport_protocol_type;
+ kal_uint16 atr_len;
+ kal_uint8 atr[40];
+} UimBtsapPowerOnRspMsgT,
+ UimBtsapResetRspMsgT;
+
+typedef struct
+{
+ kal_uint16 result;
+ BtsapProTypeT current_transport_protocol_type;
+ BtsapProTypeT supported_transport_protocol_type_capability;
+ kal_uint16 atr_len;
+ kal_uint8 atr[40];
+} UimBtsapConnectRspMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ BtsapProTypeT transport_protocol_type;
+ kal_uint16 apdu_req_len;
+ kal_uint8 apdu_req[APDU_REQ_MAX_LEN];
+} UimBtsapTransferApduMsgT;
+
+typedef struct
+{
+ kal_uint16 result;
+ kal_uint16 apdu_rsp_len;
+ kal_uint8 apdu_rsp[APDU_RSP_MAX_LEN];
+} UimBtsapTransferApduRspMsgT;
+/***************End of bluetooth SAP related msg***************/
+#endif
+
+
+/*********************************
+Get Uim Card status
+*********************************/
+#define NO_CARD 0x00
+#define UIM_CARD 0x01
+#define SIM_CARD 0x02
+#define UIM_SIM_CARD (UIM_CARD|SIM_CARD)
+#define UICC_CARD 0x04
+#define CSIM_CARD 0x10
+#define USIM_CARD 0x20
+#define ISIM_CARD 0x40
+#define UNKNOWN_CARD 0x80
+
+#define SIM_SWITCH_NO_RESET 0xa0
+#define UIM_INIT_BUSY 0xb0
+#define UIM_CARD_TYPE_CHANGE 0xc0
+
+#ifdef MTK_CBP
+#define CSIM_USIM_CARD (UICC_CARD|CSIM_CARD|USIM_CARD)
+#define USIM_ISIM_CARD (UICC_CARD|USIM_CARD|ISIM_CARD)
+#define CSIM_USIM_ISIM_CARD (UICC_CARD|CSIM_CARD|USIM_CARD|ISIM_CARD)
+#endif
+#define CARD_NOT_READY 0x100
+#define CT_CARD 0x400
+#define CT_UIM_CARD (CT_CARD|UIM_CARD)
+#define CT_UIM_SIM_CARD (CT_CARD|UIM_SIM_CARD)
+#define CT_UICC_CARD (CT_CARD|UICC_CARD)
+#ifdef MTK_CBP
+#define CT_CSIM_CARD (CT_UICC_CARD|CSIM_CARD)
+#define CT_CSIM_USIM_CARD (CT_UICC_CARD|CSIM_USIM_CARD)
+#define CT_CSIM_USIM_ISIM_CARD (CT_UICC_CARD|CSIM_USIM_ISIM_CARD)
+#endif
+
+/*Can not get card type because of PIN status(CHV1_ENABLED_NOT_VERIFIED or CHV1_BLOCKED or CHV1_DEADLOCKED).
+ Application needs check CHV status to decide next step(input PIN/input PUK/deadcard) . */
+#define NEED_PIN_CARD 0x1000
+#ifdef MTK_DEV_C2K_IRAT
+#define MD1_PIN_NEEDED_CARD 0x2000
+#define MD1_CARD_LOCKED 0x5000
+#endif
+
+#ifdef __CARRIER_RESTRICTION__
+#define UML_LOCKED_CARD 0x8000
+#define UML_CARD_REBOOT 0x8080
+#endif
+
+typedef kal_uint16 UimCardTypeT;
+/*CardStatus is compatible with the current design,but need different process to support new card type*/
+typedef kal_uint16 CardStatusT;
+
+typedef enum
+{
+ UICC_NOT_INITIALIZED = 0, /* Initial state after powerup */
+ UICC_BOOTUP, /* UICC driver is trying to establish initial link */
+ UICC_READY, /* UICC link established and nominal */
+ UICC_NOT_READY, /* UICC link never established. Could be no UICC card */
+ UICC_LINK_FAILURE, /* Initialization completed but lost UICC link afterwards */
+} UiccCardStatusType;
+
+typedef enum{
+ CHV1_DISABLED,
+ CHV1_ENABLED_NOT_VERIFIED,/*Waiting for correct chv1 entry*/
+ CHV1_ENABLED_VERIFIED, /* chv is enabled and verified */
+ CHV1_BLOCKED, /*Waiting for UNBLOCK1 entry and new PIN1 code*/
+ CHV1_DEADLOCKED, /* card is deadlocked */
+#ifdef __CARRIER_RESTRICTION__
+ CHV1_DISABLED_EXT_UML, /*chv disabled and locked by uml*/
+ CHV1_ENABLED_VERIFIED_EXT_UML, /*chv verified and locked by uml*/
+#endif
+ CHV1_STATUS_ENUM_MAX,
+} ChvStatusT;
+
+#ifdef MTK_CBP
+/* Indicates whether UIC is OMH card type */
+typedef enum{
+ UIM_IS_NOT_OMH_CARD = 0,
+ UIM_IS_OMH_CARD = 1,
+ UIM_OMH_CARD_UNKNOWN
+} UimOmhCardTypeT;
+
+/* Indicates whether IMSI_M is programmed in UIM*/
+typedef enum{
+ IMSI_M_NOT_PROGRAMMED = 0,
+ IMSI_M_PROGRAMMED = 1,
+ IMSI_M_PROGRAM_STATE_UNKNOWN,
+} UimImsiMProgramStateT;
+
+#ifdef __CARRIER_RESTRICTION__
+typedef struct
+{
+ kal_uint8 len_of_gid1;
+ kal_uint8 gid1[MAX_NUM_OF_GID];
+ kal_uint8 len_of_gid2;
+ kal_uint8 gid2[MAX_NUM_OF_GID];
+}uim_gid_struct;
+#endif
+
+/* Define IMSI_M state ind message Struct */
+typedef struct
+{
+ UimImsiMProgramStateT UimImsiMProgramState;
+} UimImsimProgramStateIndMsgT;
+#endif
+
+typedef struct
+{
+ kal_uint8 atChannel;
+ kal_uint8 sim_index;
+} ValAtCmdInfoT;
+/* Request uim card status */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ ValAtCmdInfoT atInfo;
+} UimCardStatusRecMsgT;
+
+ /* Response to uim card status*/
+typedef struct
+{
+ CardStatusT CardStatus;
+ ChvStatusT ChvStatus;
+#ifdef MTK_DEV_C2K_IRAT
+ kal_bool UsimAppExisted;
+ kal_bool RemoteSimSwtichStart;/* dynamic remote sim switch happen or not */
+#endif
+ kal_uint8 Pin1Count;
+ kal_uint8 Pin2Count;
+ kal_uint8 Puk1Count;
+ kal_uint8 Puk2Count;
+ ValAtCmdInfoT atInfo;
+#ifdef __CARRIER_RESTRICTION__
+ kal_uint8 SlotId;
+#endif
+} UimCardStatusRspMsgT;
+
+/************************************
+ APP CHV message definition
+ ************************************/
+typedef enum
+{
+ UIM_CHV_1 = 1,
+ UIM_CHV_2
+} UimChvIdT;
+
+/* verify CHV msg */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimChvIdT ChvId; /* Specify the CHV */
+ kal_uint8 ChvLen;
+ kal_uint8 ChvVal[8]; /* CHV value */
+#ifdef MTK_DEV_C2K_IRAT
+ kal_bool LocalPin; /* Whether use local PIN from NV */
+#endif
+ ValAtCmdInfoT atInfo;
+} UimAppVerifyCHVMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimChvIdT ChvId; /* Specify the CHV */
+ kal_uint8 OldChvLen;
+ kal_uint8 OldChvVal[8]; /* Old CHV value */
+ kal_uint8 NewChvLen;
+ kal_uint8 NewChvVal[8]; /* New CHV value */
+ ValAtCmdInfoT atInfo;
+} UimAppChangeCHVMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Chv1Len;
+ kal_uint8 Chv1Val[8]; /* CHV1 value */
+ ValAtCmdInfoT atInfo;
+} UimAppDisableCHVMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Chv1Len;
+ kal_uint8 Chv1Val[8]; /* CHV1 value */
+ ValAtCmdInfoT atInfo;
+} UimAppEnableCHVMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimChvIdT ChvId; /* Specify the CHV */
+ kal_uint8 UblkChvLen;
+ kal_uint8 UblkChvVal[8]; /* Unblock CHV value */
+ kal_uint8 NewChvLen;
+ kal_uint8 NewChvVal[8]; /* New CHV value */
+ ValAtCmdInfoT atInfo;
+} UimAppUnblockCHVMsgT;
+
+/* Define CHV operation response result */
+typedef enum
+{
+ UIM_CHV_SUCCESS =0,
+ UIM_CHV_NOT_INITIALIZE, /* no CHV initialized */
+ UIM_CHV_FAILURE_AND_PERMIT_ATTEMPT, /* unsuccessful CHV/UNBLOCK CHV verification, at least one attempt left */
+ UIM_CHV_CONTRADICTION_WITH_CHV_STATUS, /* in contradiction with CHV status */
+ UIM_CHV_CONTRADICTION_WITH_INVALIDATION_STATE, /* in contradiction with invalidation status */
+ UIM_CHV_FAILURE_AND_NO_ATTEMPT, /*unsuccessful CHV/UNBLOCK CHV verification, no attempt left;CHV/UNBLOCK CHV blocked*/
+ UIM_CHV_FAILURE_RECOVERY, /*fast recovery during CHV process*/
+ UIM_CHV_FAILURE_INSUFFICIENT_MEMORY, /* UICC returns 9210 for CHV command*/
+ UIM_CHV_FAILURE
+}UimChvResultT;
+
+/* APP CHV operation response message */
+typedef struct
+{
+ UimChvResultT Result;
+ kal_uint16 SW;
+ ValAtCmdInfoT atInfo;
+ CardStatusT CardStatus;
+ ChvStatusT ChvStatus;
+ kal_uint8 Pin1Count;
+ kal_uint8 Pin2Count;
+ kal_uint8 Puk1Count;
+ kal_uint8 Puk2Count;
+} UimAppChvRspMsgT;
+
+/************************************
+ UIM_MNG_MSG_CLASS message definition
+ ************************************/
+
+/* Register/Deregister the notify message of UIM status changed */
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_bool Register;
+} UimNotifyRegisterMsgT;
+
+/* Uim notify message */
+typedef struct
+{
+ UiccCardStatusType Status;
+ kal_bool RemoteSimSwtichStart;/* dynamic remote sim switch happen or not */
+ CardStatusT CardStatus; /* notify card status directly only when card is not ready */
+ ChvStatusT ChvStatus;
+ UimNamT namData;
+ kal_bool nam_valid;
+ kal_uint8 ef_ota_len;
+ kal_uint8 ef_ota_data[255];
+ kal_uint8 pin1_count;
+ kal_uint8 puk1_count;
+ kal_uint8 pin2_count;
+ kal_uint8 puk2_count;
+ kal_bool iccid_valid;
+ kal_uint8 iccid[10];
+
+ uim_access_option_enum sim_index;
+ kal_bool is_uicc_card;
+ kal_bool is_omh_card;
+ kal_bool is_utk_refresh;
+ kal_bool is_fdn_enabled;
+ kal_bool is_gsm_imsi_valid;
+ kal_uint8 gsm_imsi[9];
+ kal_uint8 utk_refresh_qualifier;
+#ifdef __CARRIER_RESTRICTION__
+ kal_bool is_cdma_only_card;
+ kal_bool spn_valid;
+ kal_uint8 ef_spn_data[UIM_EF_SPN_LENGTH];
+ uim_gid_struct gid_info;
+ kal_uint8 sim_slot_id;
+#endif
+} UimNotifyMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 ChapId;
+ kal_uint8 NAIEntryId;
+ kal_uint8 ChallengeLen;
+ kal_uint8 *pChallengeData;
+} Uim3GSipChapReqMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 NAIEntryId;
+ kal_uint16 RRQLen;
+ kal_uint8 *pRRQData;
+} Uim3GMipMNHAAuthReqMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+ kal_uint16 PreRRQLen;
+ /*including Preceding Mobile IP data ||MN AAA Extension Header(Type, Subtype, Length, SPI), can be programmed into Lc already*/
+ kal_uint8 *pPreRRQData;
+} Uim3GMipRRQHashReqMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+ kal_uint8 NAIEntryId;
+ kal_uint16 ChallengeLen;
+ kal_uint8 *pChallengeData;
+} Uim3GMipMNAAAAuthReqMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+ kal_uint8 RandLen;
+ kal_uint8* Rand; /*RANDA*/
+ kal_uint8 AutnLen; /* Length of AUTN (L1) */
+ kal_uint8* Autn; /* AUTN*/
+} Uim3GAkaAuthReqMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+ kal_uint8 ChapId;
+ kal_uint8 ChallengeLen;
+ kal_uint8 *pChallengeData;
+ kal_bool bFallbackCave;
+ /*Indicate the type of Username is a complete NAI or MDN, if MDN, HLP will generate NAI based on it*/
+ kal_bool *bNAI;
+ kal_uint8 *UserNameLen;
+ kal_uint8 *UserName;
+} UimHlpAccessChapReqMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDOPCGetMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+ kal_uint8 opMode;
+} Uim3GPDOPCUpdateMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDOPMGetMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+ kal_uint8 opMode;
+} Uim3GPDOPMUpdateMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDSIPCapGetMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDMIPCapGetMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDSIPUPPGetMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDMIPUPPGetMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDSIPSPGetMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+ kal_uint8 ActNAIEntryIndex;
+} Uim3GPDSIPSPUpdateMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDMIPSPGetMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDIMSIGetMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDADGetMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+ kal_uint8 ActNAIEntryIndex;
+ kal_uint8 NumAddActNAI;
+ kal_uint8 AddActNaiEntryIndex[UIM_MAX_NAI_NUM];
+} Uim3GPDMIPSPUpdateMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDSIPPAPSSGetMsgT;
+
+#ifdef MTK_CBP
+typedef struct {
+ UimRspInfoT UimRspInfo;
+} Uim3GPDUppExtGetMsgT;
+#endif
+
+typedef struct {
+ kal_uint8 NAIEntryIndex;
+ kal_uint8 SSLen;
+ kal_uint8 SS[72];
+} SipPapSST;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+ kal_uint8 NumNAI;
+ SipPapSST SipPapSSRec[UIM_MAX_NAI_NUM];
+} Uim3GPDSIPPAPSSUpdateMsgT;
+
+typedef struct {
+ UimRspInfoT UimRspInfo;
+ kal_uint16 FileSize;
+} UimUsimFileDataGetMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint16 EfId;
+ UimDFIndexT DfIndex;
+} UimGetEFPropertyMsgT;
+
+typedef enum
+{
+ UIM_FILE_TRANSPARENT = 0,
+ UIM_FILE_FIXED = 1,
+ UIM_FILE_CYCLIC = 3,
+ UIM_FILE_UNKNWON_STRUCT
+}UimEfStructureT;
+
+typedef struct
+{
+ kal_bool Ack;
+ kal_uint16 FileId;
+ kal_uint16 FileSize;
+ UimEfStructureT EFStructure;
+ kal_uint8 RecordLen;
+} UimGetEFPropertyRspMsgT;
+
+typedef struct
+{
+ kal_uint16 TimeInterval; /* uint is "s", if =0: polling off */
+} UimProactivePollingMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 ChapId;
+ kal_uint8 ChallengeLen;
+ kal_uint8 pChallengeData[CUIM_APDU_REQ_BODY_MAX_LEN];
+} UimHrpdMD5AuthMsgT;
+
+typedef enum
+{
+ UICC_PARM_SET_FACTORY_MODE,
+ UICC_PARM_GET_FACTORY_MODE,
+ UICC_PARM_OPERATION_ID_END_LIST
+} UiccParmOperationId;
+
+typedef enum
+{
+ UICC_PARM_MIN_VALUE,
+ UICC_PARM_MAX_VALUE,
+ UICC_PARM_DEFAULT_VALUE,
+ UICC_PARM_CUSTOM_VALUE,
+ UICC_PARM_OP_TYPE_LIST_END
+} UiccParmOperationType;
+
+typedef enum
+{
+ UICC_PARM_OPERATION_SUCCESS,
+ UICC_PARM_OPERATION_FAIL_READ_NOT_ALLOWED,
+ UICC_PARM_OPERATION_FAIL_WRITE_NOT_ALLOWED,
+ UICC_PARM_OPERATION_PARAMETER_NOT_SUPPORTED,
+ UICC_PARM_OPERATION_INTERFACE_NOT_SUPPORTED,
+ UICC_PARM_OPERATION_FAIL_VALUE_OUT_OF_RANGE
+} UiccParmAccessResultCode;
+
+typedef struct
+{
+ kal_bool Mode;
+} UiccFactoryMode_APIStruct;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 OperMode; /*1: init; 0:terminate*/
+ kal_uint8 Aid[16];
+} UimAppInitTermMsgT;
+
+typedef enum
+{
+ Info_ATRGet =0,
+ Info_Max
+} UimExtInfoId;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimExtInfoId infoid;
+} UimExtSimInfoGetT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Aid_len;
+ kal_uint8 Aid[16];
+} UiccLogicChanOpenT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 Sessionid;
+} UiccLogicChanCloseT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_uint8 RecordIndex;
+} UimGetSimMdnRecMsgT;
+
+typedef struct
+{
+ kal_bool Ack;
+ kal_uint8 RecordIndex;
+ kal_uint8 MdnLen;
+ kal_uint8 Mdn[MAX_NUMBER_BCD_LEN+1]; /* First byte is TON|NPI. */
+} UimGetSimMdnRecRspMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+} UimResetMsgT;
+
+#ifdef MTK_DEV_C2K_IRAT
+typedef enum
+{
+ UIM_REFRESH_CSIM_INIT,
+ UIM_REFRESH_CARD_RESET,
+ UIM_REFRESH_FILE_CHANGE,
+ UIM_REFRESH_SESSION_RESET
+}UimRefreshTypeT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimRefreshTypeT RefreshType;
+} UimUtkRefreshMsgT;
+
+typedef struct
+{
+ kal_bool Success;
+} UimUtkRefreshRspMsgT;
+#endif
+
+typedef struct
+{
+ kal_bool Ack;
+} UimResetRspMsgT;
+
+#ifdef MTK_CBP
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_bool ActiveFdn;
+ UimChvIdT ChvId; /* Specify the CHV */
+ kal_uint8 ChvLen;
+ kal_uint8 ChvVal[8]; /* CHV value */
+} UimSetFdnStatusMsgT;
+
+typedef enum
+{
+ UIM_FDN_SET_OK,
+ UIM_FDN_SET_PIN2_REQUIRED,
+ UIM_FDN_SET_PIN2_PUK,
+ UIM_FDN_SET_CARD_NOT_SUPPORTED,
+ UIM_FDN_VERIFY_PIN2_FAIL,
+ UIM_FDN_OPEATION_NOT_ALLOWED,
+ UIM_FDN_UNKNOWN
+}UimFdnSetCauseT;
+
+typedef struct
+{
+ UimFdnSetCauseT SetCause;
+ kal_bool FdnEnabled;
+ kal_bool Pin2Updated;
+ kal_uint8 Pin2Count;
+ kal_uint8 Puk2Count;
+} UimSetFdnStatusRspMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+} UimGetFdnStatusMsgT;
+
+typedef struct
+{
+ kal_bool FdnEnabled;
+} UimGetFdnStatusRspMsgT;
+
+/*Response data structure of MSG_ID_UIM_GET_FDN_REC_MSG */
+typedef struct
+{
+ kal_bool Ack;
+ UimPhbStorFileT FileType;
+ kal_bool IsFree;
+ kal_uint8 RecordIndex;
+ kal_uint8 AlphaIdentifier[MAXALPHALENGTH];
+ kal_uint8 PhoneNumber[MAX_NUMBER_FDN_BCD_LEN];
+ kal_uint8 TON;
+ kal_uint8 NPI;
+} UimGetFdnRecRspMsgT;
+
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ UimPhbStorFileT FileType;
+ kal_uint8 RecordIndex;
+ kal_uint8 AlphaIdentifier[MAXALPHALENGTH];
+ kal_uint8 PhoneNumber[MAX_NUMBER_FDN_BCD_LEN];
+ kal_uint8 TON;
+ kal_uint8 NPI;
+ UimPhbLevelT PhbLevel;
+} UimUpdateFdnRecMsgT;
+
+typedef struct
+{
+ kal_bool Ack;
+ UimPhbStorFileT FileType;
+ kal_uint8 RecordIndex;
+} UimUpdateFdnRecRspMsgT;
+
+typedef struct
+{
+ kal_uint8 NumOfEccList;
+ UimEccContactT EccList[MAX_ECC_LIST];
+} UimEccListIndMsgT;
+#endif
+
+#ifdef MTK_DEV_C2K_IRAT
+typedef struct
+{
+ UimRspInfoT UimRspInfo;
+ kal_bool ChangeSuccess;
+} UimFileChangeRspMsgT;
+
+typedef struct
+{
+ uim_access_option_enum SimAccessOption;
+ kal_bool UnlockTestSim;
+ kal_bool ClearLocalPin;
+}UimSimAccessOptionMsgT;
+
+#endif
+
+#ifndef __CARRIER_RESTRICTION__
+typedef struct
+{
+ kal_uint8 len_of_gid1;
+ kal_uint8 gid1[MAX_NUM_OF_GID];
+ kal_uint8 len_of_gid2;
+ kal_uint8 gid2[MAX_NUM_OF_GID];
+}uim_gid_struct;
+#endif
+
+typedef enum
+{
+ C2K_UIM_CARD_INSIDE,
+ C2K_UICC_CSIM_INSIDE
+} C2kCardtypeT;
+
+typedef struct
+{
+ C2kCardtypeT VsimcardType; /* uicc_card_type_enum, 0: Not init, 1:SIM, 2:USIM for now */
+} c2kVsimProfileT;
+
+/* c2k vsim data length */
+#define EF_META_SIZE 32
+#define EF_DATA_SIZE 32
+
+#define MAX_VSIM_PROFILE_NUM 2
+#define DF_META_DATA_LEN 23
+#define EF_META_DATA_LEN 15
+#define EF_FILE_DATA_START sizeof(UimVsimFileMetaT)
+
+typedef struct
+{
+ kal_uint8 fcp_length;
+ kal_uint8 fcp_tmp[31];
+}UimVsimFileMetaT;
+
+typedef struct
+{
+ UimVsimFileMetaT meta_data;
+ kal_uint8 current_file_idx[2];
+ kal_uint8 sim_status[DF_META_DATA_LEN]; /* Store SIM status of current DF */
+}VsimUimCardContextT;
+
+typedef struct
+{
+ /* The first 32 bytes */
+ kal_uint8 fcp_length;
+ kal_uint8 fcp_tmp[95];
+ /* ------32 bytes ------ */
+}CsimVsimFileMetaT;
+
+typedef struct
+{
+ CsimVsimFileMetaT meta_data;
+ kal_uint8 aid_len;
+ kal_uint8 aid[16];
+ kal_uint8 csim_status_len; /* Store USIM status len*/
+ kal_uint8 csim_status[95]; /* Store USIM status*/
+}VsimCsimCardContextT;
+
+typedef struct
+{
+ kal_bool vsimIsOn;
+ kal_uint8 usedProfileIdx;
+ c2kVsimProfileT profile[MAX_VSIM_PROFILE_NUM];
+ VsimUimCardContextT uimCardInfo;
+ VsimCsimCardContextT csimCardInfo;
+}UimVsimContextT;
+
+typedef struct
+{
+ kal_bool is_imsi_valid;
+ kal_uint8 imsi[9];
+ kal_bool is_ad_valid;
+ kal_uint8 ad[4];
+}uim_gsm_file_info_struct;
+
+typedef enum
+{
+ UIM_CARD_MTS = 1,
+ UIM_CARD_TATA,
+ UIM_CARD_RELIANCE,
+ UIM_CARD_CARRIER_INVALID
+}UimCarrierT;
+
+
+extern UimCardTypeT UimGetCardType(void);
+extern UimCarrierT UimGetCardCaiier(void);
+extern kal_uint8* UimGetCsimAid(void);
+extern kal_bool UimIsOmhCard(void);
+extern kal_bool UimNeedUnlockTestSim(void);
+
+#ifdef MTK_PLT_ON_PC
+extern void UimSetCardType(UimCardTypeT type);
+#endif
+
+extern kal_bool cuim_is_dual_sim_mode(void);
+
+#define CARD_IS_UICC() ((sbp_query_md_feature_data_for_c2k(SBP_DATA_RUIM) != SBP_RUIM_DISABLED) && ((UimGetCardType() & (UICC_CARD)) == UICC_CARD))
+#define CARD4CDMA_IS_UICC() ((sbp_query_md_feature_data_for_c2k(SBP_DATA_RUIM) != SBP_RUIM_DISABLED) && ((UimGetCardType() & (UICC_CARD)) == UICC_CARD))
+#define CARD_IS_OMH() (UimIsOmhCard() == KAL_TRUE)
+#define IsUsimCard ((UimGetCardType() & (USIM_CARD)) == USIM_CARD)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define UiccDbmIsUimModeDisabled() UimDbmIsUimModeDisabled()
+extern kal_bool UimDbmIsUimModeDisabled(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* UIMAPI_H */
+/**Log information: \main\4 2012-04-06 05:34:47 GMT pzhang
+** modify contact uim interface**/
+/**Log information: \main\SMART\1 2013-04-22 02:37:48 GMT shirleyli
+** HREF#22159:add function UimGetCSTValueByIndex into INC file for CSS access**/
+/**Log information: \main\Trophy\Trophy_mwang_href22200\1 2013-05-09 02:54:33 GMT mwang
+** HREF#22200:Add the support for CT UICC card.**/
+/**Log information: \main\Trophy\2 2013-05-09 03:14:40 GMT cshen
+** href#22200**/
+/**Log information: \main\Trophy\Trophy_xjyang_href22322\1 2013-12-03 07:25:53 GMT xjyang
+** href#22322 Ôö¼ÓUICCÀàÐÍ**/
+/**Log information: \main\Trophy\3 2013-12-03 07:33:28 GMT cshen
+** href#22322**/
+/**Log information: \main\Trophy\Trophy_yzhang_href22324\1 2013-12-05 09:30:45 GMT yzhang
+** HREF#22324:India MTS/TATA ESN Tracking SMS requirement**/
+/**Log information: \main\Trophy\4 2013-12-06 02:32:21 GMT cshen
+** href#22324**/
+/**Log information: \main\Trophy\Trophy_xding_href22331\1 2013-12-10 07:18:06 GMT xding
+** HREF#22331, ºÏ²¢MMCÏà¹Ø¹¦Äܵ½Trophy baselineÉÏ**/
+/**Log information: \main\Trophy\5 2013-12-10 08:33:44 GMT jzwang
+** href#22331:Merge MMC latest implementation from Qilian branch.**/
+/**Log information: \main\Trophy\Trophy_xjyang_href22336\1 2013-12-23 02:32:17 GMT xjyang
+** HREF#22336**/
+/**Log information: \main\Trophy\6 2013-12-23 02:48:23 GMT cshen
+** href#22336**/
+/**Log information: \main\Trophy\9 2014-01-17 10:10:39 GMT xxing
+** HREF#22414**/
+
diff --git a/mcu/interface/protocol/l4_c2k/val_msg_struct.h b/mcu/interface/protocol/l4_c2k/val_msg_struct.h
new file mode 100644
index 0000000..47fe2ef
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/val_msg_struct.h
@@ -0,0 +1,3802 @@
+/*************************************************************
+*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*****************************************************************************
+*
+* FILE NAME :val_msg_struct.h
+*
+* DESCRIPTION :
+*
+*
+* HISTORY :
+* See Log at end of file
+*
+*****************************************************************************/
+/*----------------------------------------------------------------------------
+ Include Files
+----------------------------------------------------------------------------*/
+#ifndef _VAL_MSG_STRUCT_H
+#define _VAL_MSG_STRUCT_H
+#include "valhlpapi.h"
+#include "valsmsapi.h"
+#include "valpswapi.h"
+#include "valat.h"
+#include "valgpsrpccomm.h"
+#include "valiratapi.h"
+#include "valsmsapi.h"
+#include "valatcdefs.h"
+#include "val_trace_parse.h"
+#include "do_clcapi.h"
+#include "valdbmapi.h"
+#include "valsmsdandcn.h"
+#include "uim_msg_struct.h"
+#include "valmpcapi.h"
+
+/* VAL Messages */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPowerupStatusMsgT msg;
+} val_clc_power_ev_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValStatPeekRspMsgT msg;
+} val_stat_peek_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValClcCellInfoMsgT msg;
+} val_clc_cell_info_msg_struct;
+
+#ifdef MTK_DEV_C2K_IRAT
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValClcNbrFreqsRptMsgT msg;
+} val_clc_nbr_freqs_rpt_msg_struct;
+#endif
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValClcDoParaChangedIndMsgT msg;
+} val_clc_do_para_changed_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimNotifyMsgT msg;
+} val_uim_notify_register_msg_struct;
+
+/* MSG_ID_VAL_UIM_ECC_LIST_IND_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimEccListIndMsgT msg;
+} val_uim_ecc_list_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimCardStatusRspMsgT msg;
+} val_chv_get_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+} val_uim_get_esn_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+} val_uim_get_cst_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetNamDataRspMsgT msg;
+} val_uim_get_nam_data_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetPhoneRecRspMsgT msg;
+} val_uim_get_phb_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimUpdatePhoneRecRspMsgT msg;
+} val_uim_update_phb_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_proactive_cmd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_at_crsm_ack_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uicc_logi_chan_open_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uicc_logi_chan_close_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uicc_generic_access_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetPhbRecParamsRspMsgT msg;
+}val_uim_get_phb_rec_params_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+} val_utk_call_control_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+} val_utk_mt_call_evt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+} val_utk_call_conn_evt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+} val_utk_call_disc_evt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+} val_utk_loc_status_evt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+} val_utk_sms_pp_download_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRptCpEventMsgT msg;
+} val_nwk_rpt_cp_event_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValClcATStatusMsgT msg;
+} val_clc_at_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHrpdNtwkAcqdMsgT msg;
+} val_hrpd_ntwk_acqd_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNetPingRspMsgT msg;
+} val_net_ping_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptInfoMsgT msg;
+} val_nwk_rpt_alert_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptInfoMsgT msg;
+} val_nwk_rpt_flash_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptInfoMsgT msg;
+} val_nwk_rpt_feature_notification_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptAddInfoT msg;
+} val_nwk_rpt_alert_more_info_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptAddInfoT msg;
+} val_nwk_rpt_flash_more_info_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptAddInfoT msg;
+} val_nwk_rpt_feat_notif_more_info_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptBurstDtmfMsgT msg;
+} val_nwk_rpt_burst_dtmf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRptSvcConfigMsgT msg;
+} val_nwk_rpt_service_config_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptDataSvcStatusWordMsgT msg;
+}val_nwk_rpt_data_svc_status_word_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRoamIndicationMsgT msg;
+} val_roam_indication_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValCssPrlIndMsgT msg;
+} val_css_prl_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssDoChanChangedIndMsgT msg;
+} val_hrpd_chan_change_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssDoChanChangedIndMsgT msg;
+} val_hrpd_chan_change_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValEmergencyModeMsgT msg;
+} val_psw_e911_mode_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswVsRelIndMsgT msg;
+} val_psw_vs_rel_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_psw_vs_conn_rel_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValOrigFinishedMsgT msg;
+} val_orig_finished_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRptCpStatusMsgT msg;
+} val_nwk_rpt_cp_status_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 msg;
+} val_nwk_rpt_lock_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 msg;
+} val_nwk_rpt_unlock_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValIOTARspMsgT msg;
+} val_iota_683_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValIOTAPRLRspMsgT msg;
+} val_iota_prl_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 msg;
+} val_otasp_rx_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 msg;
+} val_otasp_tx_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 msg;
+} val_otasp_conn_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 msg;
+} val_otasp_disconn_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 msg;
+} val_otasp_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 msg;
+} val_otasp_premature_term_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 msg;
+} val_otasp_start_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 msg;
+} val_otasp_stop_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint32 msg;
+} val_otasp_system_error_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptSystemTimeMsgT msg;
+} val_nwk_rpt_system_time_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValL1dRssiRptMsgT msg;
+} val_l1d_rssi_rpt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValBSCoOrdMsgT msg;
+} val_bs_co_ord_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNamMsgT msg;
+} val_nam_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswGetActiveNamResponseMsgT msg;
+} val_nam_rpt_active_nam_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSelectActiveNamResponseMsgT msg;
+} val_active_nam_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptCpResponseMsgT msg;
+} val_nwk_rpt_cp_response_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptHandoffMsgT msg;
+} val_nwk_rpt_handoff_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 msg;
+} val_nwk_rpt_maintenance_required_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptRegistrationAcceptMsgT msg;
+} val_nwk_rpt_registration_accept_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPrlInfoMsgT msg;
+} val_prl_info_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSetMobileIDMsgT msg;
+} val_set_mobile_id_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNetworkInfo msg;
+} val_nwk_rpt_mcc_mnc_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNetworkPrevAndPrevInUseMsgT msg;
+} val_nwk_rpt_prev_previnuse_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSetDefaultSOMsgT msg;
+} val_set_default_so_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswPowerMsgT msg;
+} val_psw_cp_pwr_ctrl_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswGetMobileIDRspMsgT msg;
+} val_get_mobile_id_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericSetParmRspMsgT msg;
+} val_set_psw_parm_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericGetParmRspMsgT msg;
+} val_get_psw_parm_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericSetParmRspMsgT msg;
+} val_do_parm_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericGetParmRspMsgT msg;
+} val_do_parm_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericSetParmRspMsgT msg;
+} val_set_ui_parm_rsp_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericSetParmRspMsgT msg;
+} val_set_uicc_parm_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericGetParmRspMsgT msg;
+} val_get_uicc_parm_rsp_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericSetParmRspMsgT msg;
+} val_set_css_parm_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericGetParmRspMsgT msg;
+} val_get_css_parm_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsPRMeasRpcT msg;
+} val_gps_rpc_rev_pseudorange_meas_rpt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsAassistReqRpcT msg;
+} val_gps_rpc_rev_assist_data_req_msb_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ stop_gps_fix msg;
+} val_gps_rpc_rev_stop_ack_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsNIPositionRequestCmdT msg;
+} val_gps_rpc_rev_ni_pos_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsRatModeSettingMsgT msg;
+} val_gps_rpc_rev_rat_mode_setting_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsRatmodeRspMsgT msg;
+} val_gps_rpc_rev_rat_mode_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsSocketCreateRspMsgT msg;
+} val_gps_rpc_rev_socket_create_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsSocketCloseRspMsgT msg;
+} val_gps_rpc_rev_socket_close_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsTcpbDataSendRspMsgT msg;
+} val_gps_rpc_rev_tcp_data_send_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsTcpbDataRecvMsgT msg;
+} val_gps_rpc_rev_tcp_data_recv_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsConnectionStatusMsgT msg;
+} val_gps_rpc_rev_data_conn_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsPowerOnRpcT msg;
+} val_gps_rpc_rev_power_on_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ stop_gps_fix msg;
+} val_gps_rpc_rev_stop_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsCpLocRespRpcT msg;
+} val_gps_rpc_fwd_parsed_pos_rpt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ gps_rpc_report_status_t msg;
+} val_gps_rpc_fwd_status_rpt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsLocRpcT msg;
+} val_gps_rpc_fwd_aflt_loc_rpt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsEphPrnRpcT msg;
+} val_gps_rpc_fwd_assist_eph_rpt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsAlmPrnRpcT msg;
+} val_gps_rpc_fwd_assist_alm_rpt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsIonRpcT msg;
+} val_gps_rpc_fwd_assist_ion_rpt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsAssistDataDoneRpcT msg;
+} val_gps_rpc_fwd_assist_data_done_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsAADataRpcT msg;
+} val_gps_rpc_fwd_inject_assist_data_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsPowerOnRpcT msg;
+} val_gps_rpc_fwd_power_on_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ gps_rpc_data_call_evt_t msg;
+} val_gps_rpc_fwd_data_call_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsFrameSyncRpcT msg;
+} val_gps_rpc_fwd_frame_sync_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsNIPositionRequestIndT msg;
+} val_gps_rpc_fwd_ni_pos_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ stop_gps_fix msg;
+} val_gps_rpc_fwd_stop_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsSocketCreateMsgT msg;
+} val_gps_rpc_fwd_socket_create_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsSocketCloseMsgT msg;
+} val_gps_rpc_fwd_socket_close_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsTcpbSendDataMsgT msg;
+} val_gps_rpc_fwd_tcp_data_send_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsTcpbRecvRspMsgT msg;
+} val_gps_rpc_fwd_tcp_data_recv_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ stop_gps_fix msg;
+} val_gps_rpc_fwd_stop_ack_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsEventRpcT msg;
+} val_gps_rpc_fwd_evt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IratPSTypeT msg;
+} val_gps_rpc_fwd_get_nt_type_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ OperationModeT msg;
+} val_gps_rpc_fwd_get_op_mode_msg;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ GpsSuplCellInformationRspMsgT msg;
+} val_gps_rpc_fwd_get_cell_info_msg;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsPowerOnMsgT msg;
+} val_ap_gps_device_power_on_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsFrameSyncMsgT msg;
+} val_ap_gps_precise_time_aiding_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsAADataMsgT msg;
+} val_ap_gps_assistacquist_data_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsQosDataMsgT msg;
+} val_ap_gps_qos_data_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsLocMsgT msg;
+} val_ap_gps_set_refloc_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsIonMsgT msg;
+} val_ap_gps_setion_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsEphPrnMsgT msg;
+} val_ap_gps_seteph_prn_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsAlmPrnMsgT msg;
+} val_ap_gps_setalm_prn_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsStopAckMsgT msg;
+} val_ap_gps_stop_ack_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswLocRespMsgT msg;
+} val_loc_resp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswIs801SessDoneMsgT msg;
+} val_loc_done_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswIs801TcpConnReqMsgT msg;
+} val_loc_tcp_conn_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswSessActiveIndMsgT msg;
+} val_loc_active_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswMpcConnReqMsgT msg;
+} val_loc_mpc_conn_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsStartFixMsgT msg;
+} val_gps_start_fix_ets_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsStopFixMsgT msg;
+} val_gps_stop_fix_ets_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsFixModeConfigMsgT msg;
+} val_gps_config_fix_mode_set_ets_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsFixRateConfigMsgT msg;
+} val_gps_config_fix_rate_set_ets_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsQosConfigMsgT msg;
+} val_gps_config_qos_set_ets_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsEnableSecurityMsgT msg;
+} val_gps_enable_security_ets_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsTestModeSetT msg;
+} val_gps_test_mode_set_msg_struct;
+
+/* MSG_ID_VAL_GPS_POWER_DOWN_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_gps_power_down_msg_struct;
+
+/* MSG_ID_VAL_GPS_POWER_UP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_gps_power_up_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpPppCloseStatusMsgT msg;
+} val_hlp_ppp_close_status_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpSocketCreateStatusMsgT msg;
+} val_hlp_socket_create_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpSocketConnStatusMsgT msg;
+} val_hlp_socket_conn_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpSocketListenStatusMsgT msg;
+} val_hlp_socket_listen_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpSocketBindStatusMsgT msg;
+} val_hlp_socket_bind_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpSocketOptStatusMsgT msg;
+} val_hlp_socket_opt_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpSocketShutDownStatusMsgT msg;
+} val_hlp_socket_shut_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpSocketConnStatusMsgT msg;
+} val_hlp_socket_close_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpSocketLingerStatusMsgT msg;
+} val_hlp_socket_linger_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValTcpbDataSendRspMsgT msg;
+} val_tcpb_data_send_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValTcpbDataRecvMsgT msg;
+} val_tcpb_data_recv_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsTcpbSendDataMsgT msg;
+} val_gps_tcpb_send_data_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_int16 RxPower;
+} val_get_rssi_ack_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpPppConnStatusMsgT msg;
+} val_hlp_ppp_conn_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpDataStateMsgT msg;
+}val_hlp_data_state_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpConnStatusMsgT msg;
+}val_hrpd_conn_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpMtuUrcMsgT msg;
+}val_hlp_mtu_urc_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValCtaUpdateMsgT msg;
+}val_hlp_cta_update_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHrpdSessStartMsg msg;
+}val_hlp_sess_active_msg_struct;
+
+//MSG_ID_VAL_NET_PING_EXPIRY_MSG
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_net_ping_expiry_msg_struct;
+
+//MSG_ID_VAL_HLP_IP_DNS_ADDR_GET_MSG
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpIpDnsAddrGetMsgT msg;
+} val_hlp_ip_dns_addr_get_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ImsAppConnReqMsgT msg;
+} val_ims_app_setup_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_ims_conn_setup_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ImsAppConnRelMsgT msg;
+} val_ims_app_release_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_ims_conn_release_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} app_ims_netwk_rel_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} app_ims_ppp_conn_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRxTxPwrInfoMsgT msg;
+} val_hwd_rx_tx_power_info_data_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswPilotPwrRptMsgT msg;
+} val_psw_pilot_pwr_rpt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDoRxTxPwrInfoMsgT msg;
+} val_do_rx_tx_power_info_data_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValCl1tstRxTxPwrDetectMsgT msg;
+}val_cl1tst_rx_tx_power_detector_msg_struct;
+
+
+#ifdef __RF_SCAN_FOR_DESENSE_TEST__
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValCl1tstRxScanRspMsgT msg;
+}val_cl1tst_rx_scan_rsp_msg_struct;
+#endif
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValCl1tstGetAntInfoCfgMsgT msg;
+}val_cl1tst_get_ant_info_cfg_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValCl1tstGetAntInfoIndMsgT msg;
+}val_cl1tst_get_ant_info_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValL1dTasForceAntQueryMsgT msg;
+}val_l1d_tas_rpt_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AppImsNetwkConnRspMsgT msg;
+} app_ims_netwk_conn_rsp_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AppImsReleaseIndMsgT msg;
+} app_ims_rel_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AppImsReleaseRspMsgT msg;
+} app_ims_rel_rsp_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AppImsNetwkRelRspMsgT msg;
+} app_ims_netwk_end_rsp_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmMsgT msg;
+} val_do_parm_set_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiGetParmMsgT msg;
+} val_do_parm_get_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmMsgT msg;
+} val_uicc_parm_set_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiGetParmMsgT msg;
+} val_uicc_parm_get_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AtcSendAtMsgT msg;
+} val_enhanced_cmd_buffer_ack_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AtcSendAtMsgT msg;
+} val_enhanced_at_cmd_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDoParmSetSucMsgT msg;
+} val_do_parm_set_suc_msg_struct;
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswEngineTestModeGetCnfMsgT msg;
+} val_psw_engine_test_mode_get_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswGetServiceConfigCnfMsgT msg;
+} val_psw_get_service_config_cnf_msg_struct;
+#endif
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmRspMsgT msg;
+} val_at_set_psw_parm_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiGetParmRspMsgT msg;
+} val_at_get_psw_parm_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmRspMsgT msg;
+} val_at_set_css_parm_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiGetParmRspMsgT msg;
+} val_at_get_css_parm_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSetMobileIDResponseMsgT msg;
+} val_at_set_mobile_id_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmMsgT msg;
+} val_set_psw_parm_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiGetParmMsgT msg;
+} val_get_psw_parm_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswMDNUpdatedMsgT msg;
+} val_psw_mdn_updated_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswESNUpdatedMsgT msg;
+} val_psw_esn_updated_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValAllDataInitMsgT msg;
+} val_all_data_init_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGetAlertStatusMsgT msg;
+} val_get_alert_status_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmSysSetParmETSMsgT msg;
+} val_set_sys_parm_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmSysGetParmETSMsgT msg;
+} val_get_sys_parm_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmMsgT msg;
+} val_set_css_parm_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiGetParmMsgT msg;
+} val_get_css_parm_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValCssCpPwrCtrlMsgT msg;
+} val_css_cp_pwr_ctrl_msg_struct;
+
+#ifdef MTK_DEV_C2K_IRAT
+/* VAL_RPT_C2K_RSVAS_EVENT_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRptC2kRsvasEventMsgT msg;
+} val_rpt_c2k_rsvas_event_msg_struct;
+#endif
+
+#ifdef MTK_PLT_ON_PC_UT
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRevTxReqMsgUtT msg;
+} val_rev_tx_req_msg_struct;
+#else
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRevTxReqMsgT msg;
+} val_rev_tx_req_msg_struct;
+#endif
+
+#ifdef MTK_PLT_ON_PC_UT
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSendTxIndMsgT msg;
+} val_send_tx_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValUtGlobalValSetMsgT msg;
+} val_ut_global_val_set_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValIpDataSendReqMsgT msg;
+} val_ip_data_send_req_msg_struct;
+#endif
+#ifdef MTK_PLT_ON_PC_IT
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValIpDataSendCnfMsgT msg;
+} val_ip_data_send_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValIpDataRecvIndMsgT msg;
+} val_ip_data_recv_ind_msg_struct;
+#endif
+
+
+#ifdef MTK_DEV_C2K_IRAT
+/* MSG_ID_VAL_CSS_NETWORK_STATE_CHANGE_IND */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IratEventNetwkStateChangeNotifyT msg;
+} val_irat_evt_netwk_state_change_notify_struct,
+val_css_network_state_change_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IratEventDataStateIndT msg;
+} val_irat_evt_cdma_data_state_ind_struct;
+
+/* MSG_ID_VAL_CSS_PS_STATUS_CHANGE_NOTIFY */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IratPsStatusChangeNotifyT msg;
+} val_irat_evt_ps_status_change_notify_struct,
+val_css_ps_status_change_notify_struct;
+
+/* VAL_CSS_CS_REG_STATUS_NOTIFY_IND_MSG,*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValCssCsRegStatusNotifyIndMsgT msg;
+} val_css_cs_reg_status_notify_ind_msg_struct;
+
+/*VAL_UIM_BTSAP_CONNECT_MSG,*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimBtsapConnectRspMsgT msg;
+} val_uim_btsap_connect_msg_struct;
+
+/*VAL_UIM_BTSAP_DISCONNECT_MSG,*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimBtsapDisconnectRspMsgT msg;
+} val_uim_btsap_disconnect_msg_struct;
+
+/* VAL_UIM_BTSAP_POWER_ON_MSG,*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimBtsapPowerOnRspMsgT msg;
+} val_uim_btsap_power_on_msg_struct;
+
+/* VAL_UIM_BTSAP_POWER_OFF_MSG,*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimBtsapPowerOffRspMsgT msg;
+} val_uim_btsap_power_off_msg_struct;
+
+/* VAL_UIM_BTSAP_RESET_MSG,*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimBtsapResetRspMsgT msg;
+} val_uim_btsap_reset_msg_struct;
+
+/* VAL_UIM_BTSAP_TRANSFER_APDU_MSG,*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimBtsapTransferApduRspMsgT msg;
+} val_uim_btsap_transfer_apdu_msg_struct;
+
+/* VAL_UIM_EMDSTATUS_UPDATE_IND_MSG,*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValUimEmdstatusUpdateIndMsgT msg;
+} val_uim_emdstatus_update_ind_msg_struct;
+
+/* VAL_UIM_PRE_STORED_CARD_ESNME_IND_MSG,*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValUimPreStoredCardEsnmeIndMsgT msg;
+} val_uim_pre_stored_card_esnme_ind_msg_struct;
+#endif /* MTK_DEV_C2K_IRAT */
+
+#ifdef MTK_CBP
+/* VAL_UIM_IMSI_M_PROGRAM_STATE_IND_MSG,*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimImsimProgramStateIndMsgT msg;
+} val_uim_imsi_m_program_state_ind_msg_struct;
+#endif /* MTK_CBP */
+
+/** VAL SMS MSG **/
+/* VAL_SMS_BCAST_ERROR_MSG null structure */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_sms_bcast_error_msg_struct;
+
+/* VAL_SMS_BCAST_IND_PARMS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsDeliverIndMsgT msg;
+} val_sms_bcast_ind_parms_msg_struct;
+
+/* MSG_ID_VAL_SMS_CAUSE_CODE_STATUS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsCauseCodeStatusMsgT msg;
+} val_sms_cause_code_status_msg_struct;
+
+/* VAL_SMS_DELIVER_IND_DATA_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsUserDataMsgT msg;
+} val_sms_deliver_ind_data_msg_struct;
+
+/* VAL_SMS_DELIVER_IND_PARMS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsDeliverIndMsgT msg;
+} val_sms_deliver_ind_parms_msg_struct;
+
+/* VAL_SMS_ERROR_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsErrorMsgT msg;
+} val_sms_error_msg_struct;
+
+/* VAL_SMS_RX_IND_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsRxIndMsgT msg;
+} val_sms_rx_ind_msg_struct;
+
+/* VAL_SMS_TX_RSP_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTxRspMsgT msg;
+} val_sms_tx_rsp_msg_struct;
+
+/* VAL_SMS_CAUSE_CODE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsCauseCodeT msg;
+} val_sms_cause_code_msg_struct;
+
+/* VAL_SMS_ACK_L2_ACKED_MSG null structure */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_sms_ack_l2_acked_msg_struct;
+
+/* VAL_SMS_TST_CONNECT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTstConnectMsgT msg;
+} val_sms_tst_connect_msg_struct;
+
+/* VAL_SMS_TST_BCAST_CONNECT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTstBCastParmsMsgT msg;
+} val_sms_tst_bcast_connect_msg_struct;
+
+/* VAL_SMS_TST_BCAST_DISCONNECT_MSG null structure */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_sms_tst_bcast_disconnect_msg_struct;
+
+
+/* VAL_SMS_TST_BCAST_PREF_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTstBCastParmsMsgT msg;
+} val_sms_tst_bcast_pref_msg_struct;
+
+/* VAL_SMS_TST_CANCEL_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTstCancelMsgT msg;
+} val_sms_tst_cancel_msg_struct;
+
+/* VAL_SMS_TST_CAUSE_CODE_STATUS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsCauseCodeStatusMsgT msg;
+} val_sms_tst_cause_code_status_msg_struct;
+
+/* VAL_SMS_TST_DISCONNECT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTstDisconnectMsgT msg;
+} val_sms_tst_disconnect_msg_struct;
+
+/* VAL_SMS_TST_PREF_SRV_OPT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTstPrefSrvOptMsgT msg;
+} val_sms_tst_pref_srv_opt_msg_struct;
+
+/* VAL_SMS_TST_SUBMIT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTstSubmitMsgT msg;
+} val_sms_tst_submit_msg_struct;
+
+/* VAL_SMS_TST_TERM_STATUS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTstTermStatusMsgT msg;
+} val_sms_tst_term_status_msg_struct;
+
+/* VAL_SMS_TST_USER_ACK_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTstUserAckMsgT msg;
+} val_sms_tst_user_ack_msg_struct;
+
+/* VAL_SMS_TST_RETX_AMOUNT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsTstRetxAmountMsgT msg;
+} val_sms_tst_retx_amount_msg_struct;
+
+/* VAL_SMS_TST_CAUSE_CODE_MSG null structure */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_sms_tst_cause_code_msg_struct;
+
+/* VAL_SMS_GET_COUNT_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsEtsGetCountMsgT msg;
+} val_sms_get_count_msg_struct;
+
+/* VAL_SMS_GET_FIRST_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsEtsGetFirstMsgT msg;
+} val_sms_get_first_msg_struct;
+
+/* VAL_SMS_GET_NEXT_MSG null structure */
+typedef struct
+{ LOCAL_PARA_HDR
+} val_sms_get_next_msg_struct;
+
+/* VAL_SMS_WRITE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsEtsWriteMsgT msg;
+} val_sms_write_msg_struct;
+
+/* VAL_SMS_DEL_ALL_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsEtsDelAllMsgT msg;
+} val_sms_del_all_msg_struct;
+
+/* VAL_SMS_DEL_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsEtsDelMsgT msg;
+} val_sms_del_msg_struct;
+
+/* VAL_SMS_SEND_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsEtsSendMsgT msg;
+} val_sms_send_msg_struct;
+
+/* VAL_SMS_SEND_INDEX_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsEtsSendIndexMsgT msg;
+} val_sms_send_index_msg_struct;
+
+/* VAL_SMS_SET_STATUS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsEtsSetStatusMsgT msg;
+} val_sms_set_status_msg_struct;
+
+#if defined(LGT_EXTENSIONS)
+/* VAL_SMS_UNKNOWN_ERROR_MSG null structure */
+
+/* VAL_SMS_UNKNOWN_IND_PARMS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValSmsDeliverIndMsgT msg;
+} val_sms_unknown_ind_parms_msg_struct;
+#endif
+
+/*MSG_ID_VAL_SMS_MEMORY_STATUS_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsMemStatMsgT msg;
+}val_sms_memory_status_msg_struct;
+
+
+/* VAL_UIM_GET_SMS_REC_PARAMS_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetSmsRecParamsRspMsgT msg;
+} val_uim_get_sms_rec_params_msg_struct;
+
+/* VAL_UIM_GET_SMS_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimGetSmsRecRspMsgT msg;
+} val_uim_get_sms_rec_msg_struct;
+
+/* VAL_UIM_UPDATE_SMS_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimUpdateSmsRecRspMsgT msg;
+} val_uim_update_sms_rec_msg_struct;
+
+/* VAL_UIM_ERASE_SMS_REC_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ UimEraseSmsRecRspMsgT msg;
+} val_uim_erase_sms_rec_msg_struct;
+
+/* VAL_RPT_CQA_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValReportCQAMsgT msg;
+} val_rpt_cqa_msg_struct;
+
+/* VAL_RPT_DATA_PREARRANGE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ ValRptDataPrearrangeMsgT msg;
+} val_rpt_data_prearrange_msg_struct;
+
+/* VAL_NWK_RPT_SERVICE_NEGOTIATION_MODE_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ kal_bool msg;
+} val_nwk_rpt_service_negotiation_mode_msg_struct;
+
+/* VAL_NWK_RPT_START_CONTINUOUS_DTMF_MSG */
+typedef struct
+{ LOCAL_PARA_HDR
+ char msg;
+} val_nwk_rpt_start_continuous_dtmf_msg_struct;
+
+#ifdef MTK_DEV_C2K_IRAT
+
+/* MSG_ID_VAL_IRAT_EVT_RAT_MODE_NOTIFY*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IratEventRatModeNotifyT msg;
+} val_irat_evt_rat_mode_notify_struct;
+
+/* MSG_ID_VAL_CSS_L2C_RESEL_CNF */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IratEventReselCnfT msg;
+} val_irat_evt_resel_cnf_struct,
+val_css_l2c_resel_cnf_struct;
+
+/* MSG_ID_VAL_CSS_L2C_REDIRECT_CNF */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IratEventRedirectCnfT msg;
+} val_irat_evt_redirect_cnf_struct,
+val_css_l2c_redirect_cnf_struct;
+
+/* MSG_ID_VAL_CSS_L2C_CMP_CNF */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IratCssCpsdmRatChangeCmpCnfT msg;
+}val_css_l2c_cmp_cnf_struct;
+
+/* MSG_ID_VAL_CSS_C2L_RESEL_IND */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IratEventReselToLteIndT msg;
+} val_irat_evt_resel_to_lte_ind_struct,
+val_css_c2l_resel_ind_struct;
+
+/* MSG_ID_VAL_CSS_DATA_DEACTIVATE_IND */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} css_data_deactivate_ind_struct;
+
+/* MSG_ID_VAL_CSS_C2L_3GPP_NORMAL_SERVICE_IND */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_css_c2l_3gpp_normal_service_ind_struct;
+
+/* MSG_ID_VAL_CSS_LOCAL_DETACH_IND */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_css_local_detach_ind_struct;
+#endif
+
+/* MSG_ID_VAL_DANDCN_SEND_DCN_REQ */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_dandcn_send_dcn_req_struct;
+
+/* MSG_ID_VAL_DANDCN_SEND_START_RSP */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsDanDcnStartRspT msg;
+} val_dandcn_send_start_rsp_struct;
+
+/* MSG_ID_VAL_DANDCN_IMS_REG_STATUS_IND */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsDanDcnImsRegIndT msg;
+} val_dandcn_ims_reg_status_ind_struct;
+
+/* MSG_ID_VAL_IRAT_EVT_ABORT_C2L_RESEL_IND_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_irat_evt_abort_c2l_resel_ind_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ AtcL1dRssiMsgT msg;
+}val_at_l1d_rssi_msg_struct;
+
+
+typedef struct {
+ LOCAL_PARA_HDR
+ ValDialNumCheckRegMsgT msg;
+}val_at_dial_num_check_reg_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValCpSmsRegTriggerReqMsgT msg;
+}val_cp_smsreg_trigger_req_msg_struct;
+
+
+typedef struct {
+ LOCAL_PARA_HDR
+ RlpQueryStatIndMsgT msg;
+}val_rlp_rpt_stat_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ ValL1DTstGetPhoneStatusMsgT msg;
+}val_l1d_tst_get_phone_status_msg_struct;
+typedef struct {
+ LOCAL_PARA_HDR
+ ValHrpdSessionStatusMsgT msg;
+}val_hrpd_session_status_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+}val_css_power_down_done_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+}val_css_prl_read_finished_msg_struct;
+typedef struct {
+ LOCAL_PARA_HDR
+ PswSmsDisconnectMsgT msg;
+}val_psw_sms_disconnect_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ PswSmsBCastParmsMsgT msg;
+}val_psw_sms_bcast_parms_msg_struct;
+
+#if defined(LGT_EXTENSIONS)
+typedef struct {
+ LOCAL_PARA_HDR
+ PswSmsUnknownParmsMsgT msg;
+}val_psw_sms_unknown_parms_msg_struct;
+#endif
+
+typedef struct {
+ LOCAL_PARA_HDR
+ PswSmsConnectMsgT msg;
+}val_psw_sms_connect_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ PswSmsTerminalStatusMsgT msg;
+}val_psw_sms_terminal_status_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ PswSmsPrefSrvOptMsgT msg;
+}val_psw_sms_pref_srv_opt_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ PswSmsReplyTlAckMsgT msg;
+}val_psw_sms_reply_tl_ack_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ ValSmsUserDataMsgT msg;
+}val_psw_sms_user_data_msg_struct;
+typedef struct {
+ LOCAL_PARA_HDR
+ ValSmsMemStatMsgT msg;
+}val_sms_mem_stat_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ PswSmsCbsInfoT msg;
+}val_psw_sms_cbs_info_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AtcTimerExpiredMsgT msg;
+}val_timer_expired_msg_struct;
+
+/*VAL_TCPIP_RECV_DATA_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValFwdTxReqMsgT msg;
+}val_tcpip_recv_data_msg_struct;
+
+/*VAL_TCPIP_SOCKET_EVT_MSG*/
+#ifdef TCPIP_ATC
+typedef struct
+{
+ LOCAL_PARA_HDR
+ TcpModuleEventT msg;
+}val_tcpip_socket_evt_msg_struct;
+#endif
+
+/*VAL_SET_QNC_DIAL_STR_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AtcSetQNCDialStrMsgT msg;
+}val_set_qnc_dial_str_msg_struct;
+
+
+#ifdef MTK_DEV_ENGINEER_MODE
+/*RCP_RF_TST_POWER_CONTROL_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ RcpRfTstPowerControlMsgT msg;
+}val_rcp_rf_tst_power_control_msg_struct;
+#endif /*MTK_DEV_ENGINEER_MODE*/
+
+typedef struct {
+ LOCAL_PARA_HDR
+ ValUpbRecvDataMsgT msg;
+}val_upb_recv_data_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ ValUdpbSentDataRspMsgT msg;
+}val_upb_sent_data_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ ValHrpdA12AuthStatusMsgT msg;
+}val_hrpd_a12_auth_status_msg_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ ValHrpdA12AuthStatusMsgT msg;
+}val_hrpd_a12_status_msg_struct;
+
+#ifdef MTK_DEV_C2K_IRAT
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValUtkTimerExpiryMsgT msg;
+}val_uim_utk_timer_expired_msg_struct;
+#endif
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimResetRspMsgT msg;
+}val_uim_reset_response_msg_struct;
+
+#ifdef MTK_DEV_C2K_IRAT
+/*VAL_UIM_UTK_REFRESH_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimUtkRefreshRspMsgT msg;
+} val_uim_utk_refresh_rsp_msg_struct;
+#endif
+#ifdef MTK_PLT_ON_PC_UT
+/*MSG_ID_VAL_UT_CONFIGURE_REQ_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValConfigureReqMsgT msg;
+} val_ut_configure_req_msg_struct;
+#endif /*#ifdef MTK_PLT_ON_PC_UT*/
+
+/*MSG_ID_VAL_AT_VERIFY_SPC_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValVerifySPCResponseMsgT msg;
+} val_at_verify_spc_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AppImsSetupRspMsgT msg;
+}app_ims_setup_rsp_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AppImsSetupRspMsgT msg;
+}app_ims_setup_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHlpPcmtParaRspMsgT msg;
+}val_hlp_pcmt_para_rsp_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValFwdTxRspMsgT msg;
+}val_fwd_tx_rsp_msg_struct;
+
+/* VAL_NWK_EXISTENCE_INFO_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkExistenceInfoMsg msg;
+} val_nwk_existence_info_msg_struct;
+
+#ifdef MTK_CBP_ENCRYPT_VOICE
+/* MSG_ID_VAL_PSW_ENCRYPT_VOICE_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValEncryptVoiceRspMsgT msg;
+} val_psw_encrypt_voice_rsp_msg_struct;
+#endif
+
+/* MSG_ID_VAL_DATA_ROAMING_CHG_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDataRoamingChgMsgT msg;
+} val_data_roaming_info_chg_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswRptServiceOptionMsgT msg;
+} val_psw_rpt_service_option_msg_struct;
+
+#ifdef MTK_CBP_REL_OPTIMIZE
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValPswVsRelIndMsgT msg;
+}val_vs_rel_ind_msg_struct;
+#endif
+
+/* MSG_ID_VAL_RMC_DO_RX_TX_TIME_INFO_DATA_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDoRxTxtimeInfoRspMsgT msg;
+}val_rmc_do_rx_tx_time_info_data_rsp_msg_struct;
+
+/* MSG_ID_VAL_L1D_RX_TX_TIME_INFO_DATA_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValL1dRxTxtimeInfoRspMsgT msg;
+}val_l1d_rx_tx_time_info_data_rsp_msg_struct;
+
+/* MSG_ID_VAL_RMC_DO_DAT_CFG_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRmcRfcDatSarCfgRspMsgT msg;
+}val_rmc_do_dat_cfg_rsp_msg_struct;
+
+/* MSG_ID_VAL_L1D_1X_DAT_CFG_RSP_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValL1dRfDatSarCfgRspMsgT msg;
+}val_l1d_1x_dat_cfg_rsp_msg_struct;
+
+/* MSG_ID_VAL_CSS_DATA_DEACTIVATE_IND */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ css_deactivate_cause_enum DeactCause;
+ kal_bool NeedLocalReset; /* Indicate if need locally reset connection context, including PPP context, PDN context and Um context */
+} val_css_data_deactivate_ind_struct;
+
+/*-----------------------------------------------------------------
+* Silent Logging
+*----------------------------------------------------------------*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSilentLogCfgCreateMsgT msg;
+}val_silent_log_cfg_create_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSilentLogSetParmsMsgT msg;
+}val_silent_log_parms_set_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSilentLogGetParmsMsgT msg;
+}val_silent_log_parms_get_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSilentLogGetDataInfoMsgT msg;
+}val_silent_log_data_info_get_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_silent_log_pause_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_silent_log_resume_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSilentLogUpdateParmsMsgT msg;
+}val_silent_log_parms_update_msg_struct;
+
+
+/*-----------------------------------------------------------------
+* DBM Handler
+*----------------------------------------------------------------*/
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_flush_ack_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_flush_rf_ack_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_nv_msg_ack_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValL1DTstGetPhoneStatusMsgT msg;
+}val_l1dtst_getphonestatus_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_get_eri_version_msg_struct;
+
+
+/* PHB Msg */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimErasePhoneRecMsgT msg;
+}val_uim_erase_phb_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetPhbRecParamsRspMsgT msg;
+}val_uim_get_sdn_rec_params_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetPhoneRecRspMsgT msg;
+}val_uim_get_sdn_rec_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimErasePhoneRecRspMsgT msg;
+}val_at_uim_erase_phb_rec_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimUpdatePhoneRecRspMsgT msg;
+}val_at_uim_update_phb_rec_msg_struct;
+
+
+/* Sms Msg */
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_utk_proavtive_cmd_at_utc_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetFdnRecRspMsgT msg;
+}val_uim_get_fdn_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetFdnStatusRspMsgT msg;
+}val_uim_get_fdn_status_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimSetFdnStatusRspMsgT msg;
+}val_at_uim_set_fdn_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimErasePhoneRecRspMsgT msg;
+}val_at_uim_erase_fdn_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimUpdateFdnRecRspMsgT msg;
+}val_at_uim_update_fdn_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimUpdateFdnRecRspMsgT msg;
+}val_uim_update_fdn_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimErasePhoneRecRspMsgT msg;
+}val_uim_erase_fdn_rec_msg_struct;
+
+/* Chv Msg */
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimAppChvRspMsgT msg;
+}val_chv_change_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimAppChvRspMsgT msg;
+}val_chv_disable_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimAppChvRspMsgT msg;
+}val_chv_unblock_msg_sturct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_chv_status_change_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_chv_local_verify_msg_struct;
+
+
+/*Utk Msg */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_utk_terminal_profile_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_utk_menu_selection_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_utk_terminal_response_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_utk_request_uimver_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_utk_request_img_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_utk_requset_img_data_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_utk_proavtive_cmd_msg_struct;
+
+/* Event download Msg */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_utk_data_available_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_utk_acctech_change_evt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_utk_app_init_term_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValImsRegStatusUpdateIndMsgT msg;
+}val_utk_ims_reg_status_update_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_utk_ims_timer_expired_msg_struct;
+
+
+/* Utk test */
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_utk_tst_get_input_done_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_utk_tst_select_item_done_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_utk_tst_common_done_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_utk_tst_select_menu_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_utk_tst_init_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_utk_tst_sms_down_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_utk_tst_exit_msg_struct;
+
+
+/* VAL UIM MDN messages */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_get_mdn_rec_num_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_read_mdn_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_update_mdn_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_del_mdn_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_get_sp_name_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_uim_in_call_detect_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_uim_get_gsm_imsi_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_get_smsvp_rec_num_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_read_smsvp_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_update_smsvp_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_get_pref_lang_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_get_uim_card_id_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_get_provider_name_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_store_esn_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_get_est_msg_struct;
+
+/* VAL UIM Detect message*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_uim_card_removed_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_sms_pp_download_rsp_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ SdmValC2kSmsSendReqT msg;
+} val_sms_over_c2k_send_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ImcValC2kSmsSendReqT msg;
+} val_sms_over_ims_send_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ImcValC2kSmsSendReqT msg;
+} val_sms_imcsms_send_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValC2kSmsRspT msg;
+} val_sms_sdm_send_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_vs_cntd_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_uim_hlp_file_change_completed_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_hlp_power_down_done_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValBatteryReadDataMsgT msg;
+} val_hwd_battery_read_data_msg_struct;
+/*MSG_ID_VAL_GET_DEBUG_INFO_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswDebugScrnResponseT msg;
+}val_get_debug_info_msg_struct;
+
+/*MSG_ID_VAL_ASYNC_ALERT_IND_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_async_alert_ind_msg_struct;
+
+/*MSG_ID_VAL_EIA617_BREAK_REQ_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_eia617_break_req_msg_struct;
+
+/*MSG_ID_VAL_C108_IND_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValC108IndMsgT msg;
+}val_c108_ind_msg_struct;
+
+/*MSG_ID_VAL_FWD_TX_REQ_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValFwdTxReqMsgT msg;
+}val_fwd_tx_req_msg_struct;
+
+/*MSG_ID_VAL_AT_UIM_RUN_CAVE_ACK_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_at_uim_run_cave_ack_msg_struct;
+
+/*MSG_ID_VAL_AT_CSIM_ACK_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_at_csim_ack_msg_struct;
+
+/*MSG_ID_VAL_IOP_MUX_EVEVT_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValIopMuxEvtT msg;
+}val_iop_mux_event_msg_struct;
+
+/*MSG_ID_VAL_HLP_PARM_SET_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericSetParmRspMsgT msg;
+} val_hlp_parm_set_rsp_msg_struct;
+
+/*MSG_ID_VAL_HLP_PARM_GET_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGenericGetParmRspMsgT msg;
+}val_hlp_parm_get_rsp_msg_struct;
+
+/*MSG_ID_VAL_AT_UTK_SMS_PP_DOWNLOAD_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_at_utk_sms_pp_download_rs_msg_struct;
+
+/*MSG_ID_VAL_AT_CHAN_CTRL_ETS*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValATChanCtrlMsgT msg;
+}val_at_chan_ctrl_ets_struct;
+
+/*MSG_ID_VAL_AT_REV_TX_REQ_ETS*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValATRevTxReqMsgT msg;
+}val_at_rev_tx_req_ets_struct;
+
+/*MSG_ID_VAL_AT_UIM_CAVE_RSP*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspToPsMsgT msg;
+}val_at_uim_cave_rsp_struct;
+
+/*MSG_ID_VAL_AT_UIM_SSDUPD_RSP*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspToPsMsgT msg;
+}val_at_uim_ssdupd_rsp_struct;
+
+/*MSG_ID_VAL_AT_UIM_SSDUPDCFM_RSP*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspToPsMsgT msg;
+}val_at_uim_ssdupdcfm_rsp_struct;
+
+/*MSG_ID_VAL_AT_UIM_MD5_RSP*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_at_uim_md5_rsp_struct;
+
+/*MSG_ID_VAL_IOP_ETS_RPC_CMD*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ExeRspMsgT msg;
+}val_iop_ets_rpc_cmd_struct;
+
+/*MSG_ID_VAL_RPC_GPS_RX_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValRpcRxMsgT msg;
+}val_rpc_gps_rx_msg_struct;
+
+/*MSG_ID_VAL_TCPIP_RECV_RSP_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_tcpip_recv_rsp_msg_struct;
+
+/*MSG_ID_VAL_TCPIP_C108LOW_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_tcpip_c108low_msg_struct;
+
+/*MSG_ID_VAL_IOP_DATAMGR_INIT_DONE_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_iop_datamgr_init_done_msg_struct;
+
+/*MSG_ID_VAL_AT_TURN_OFF_DTMF_SOUND_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_at_turn_off_dtmf_sound_msg_struct;
+
+/*MSG_ID_VAL_AT_CRING_CALLBACK_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_at_cring_callback_msg_struct;
+
+/*MSG_ID_VAL_AT_CNMA_RP_ERROR_CALLBACK_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_at_cnma_rp_error_callback_msg_struct;
+
+/*MSG_ID_VAL_AT_VSER_CALLBACK_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_at_vser_callback_msg_struct;
+
+/*MSG_ID_VAL_AT_GET_DEBUG_INFO_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswDebugScrnResponseT msg;
+}val_at_get_debug_info_msg_struct;
+
+/*MSG_ID_VAL_AT_NAM_WRITE_ACK_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_at_nam_write_ack_msg_struct;
+
+/*MSG_ID_VAL_PPP_A12_AUTH_NOT_FAIL_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_ppp_a12_auth_not_fail_msg_struct;
+
+/*MSG_ID_VAL_PPP_A12_AUTH_FAIL_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_ppp_a12_auth_fail_msg_struct;
+
+/*MSG_ID_VAL_ATC_C109_IND_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ AtcValC109IndMsgT msg;
+}val_atc_c109_ind_msg_struct;
+
+/*MSG_ID_VAL_AT_SUSPEND_CALLBACK_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_at_suspend_callback_msg_struct;
+
+/*MSG_ID_VAL_AT_1X_MRU_WRITE_ACK_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_at_1x_mru_write_ack_msg_struct;
+
+/*MSG_ID_VAL_AT_DO_MRU_WRITE_ACK_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_at_do_mru_write_ack_msg_struct;
+
+
+/*MSG_ID_VAL_UIM_GET_UIMID_EUIMID_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetNamDataRspMsgT msg;
+}val_uim_get_uimid_euimid_msg_struct;
+
+/*MSG_ID_VAL_AT_VECIOURC_CALLBACK_MSG*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_at_veciourc_callback_msg_struct;
+
+/*MSG_ID_VAL_REV_TX_REQ_PPP_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_rev_tx_req_ppp_signal_struct;
+
+/*MSG_ID_VAL_FWD_TX_RSP_PPP_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_fwd_tx_rsp_ppp_signal_struct;
+
+
+/*MSG_ID_VAL_REV_TX_REQ_AT_1_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_rev_tx_req_at_1_signal_struct;
+
+/*MSG_ID_VAL_FWD_TX_RSP_AT_1_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_fwd_tx_rsp_at_1_signal_struct;
+
+/*MSG_ID_VAL_REV_TX_REQ_AT_2_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_rev_tx_req_at_2_signal_struct;
+
+/*MSG_ID_VAL_FWD_TX_RSP_AT_2_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_fwd_tx_rsp_at_2_signal_struct;
+
+
+/*MSG_ID_VAL_REV_TX_REQ_AT_3_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_rev_tx_req_at_3_signal_struct;
+
+/*MSG_ID_VAL_FWD_TX_RSP_AT_3_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_fwd_tx_rsp_at_3_signal_struct;
+
+/*MSG_ID_VAL_REV_TX_REQ_AT_4_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_rev_tx_req_at_4_signal_struct;
+
+/*MSG_ID_VAL_FWD_TX_RSP_AT_4_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_fwd_tx_rsp_at_4_signal_struct;
+
+/*MSG_ID_VAL_REV_TX_REQ_AT_5_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_rev_tx_req_at_5_signal_struct;
+
+/*MSG_ID_VAL_FWD_TX_RSP_AT_5_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_fwd_tx_rsp_at_5_signal_struct;
+
+/*MSG_ID_VAL_REV_TX_REQ_AT_6_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_rev_tx_req_at_6_signal_struct;
+
+/*MSG_ID_VAL_FWD_TX_RSP_AT_6_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_fwd_tx_rsp_at_6_signal_struct;
+
+/*MSG_ID_VAL_REV_TX_REQ_AT_7_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_rev_tx_req_at_7_signal_struct;
+
+/*MSG_ID_VAL_FWD_TX_RSP_AT_7_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_fwd_tx_rsp_at_7_signal_struct;
+
+/*MSG_ID_VAL_REV_TX_REQ_AT_8_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_rev_tx_req_at_8_signal_struct;
+
+/*MSG_ID_VAL_FWD_TX_RSP_AT_8_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_fwd_tx_rsp_at_8_signal_struct;
+
+/*MSG_ID_VAL_FWD_TX_RSP_AT_ETS_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_fwd_tx_rsp_at_ets_signal_struct;
+
+/*MSG_ID_VAL_CSS_READY_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_css_ready_signal_struct;
+
+/*MSG_ID_VAL_REV_TX_REQ_IP_SIGNAL*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_rev_tx_req_ip_signal_struct;
+
+/*MSG_ID_L4C_C2K_POWER_OFF_REQ
+typedef struct
+{
+ LOCAL_PARA_HDR
+}l4c_c2k_power_off_req_struct;*/
+
+/*MSG_ID_L4C_C2K_RF_OFF_REQ*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}l4c_c2k_rf_off_req_struct;
+
+/*MSG_ID_L4C_C2K_POWER_OFF_CNF
+typedef struct
+{
+ LOCAL_PARA_HDR
+}l4c_c2k_power_off_cnf_struct;*/
+
+/*MSG_ID_L4C_C2K_RF_OFF_CNF*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+}l4c_c2k_rf_off_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValTempInfoDataMsgT msg;
+} val_hwd_temperature_read_data_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_hwd_rx_tx_power_detector_msg_struct;
+
+#if defined(MTK_CBP) && (!defined(MTK_PLT_ON_PC))
+typedef struct
+{
+ LOCAL_PARA_HDR
+} rmc_val_do_rx_tx_time_info_data_req_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_l1d_rx_tx_time_info_data_req_msg_struct;
+
+#endif
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValEmergencyModeTestingMsgT msg;
+} val_emergency_mode_test_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValHrpdRssiRptMsgT msg;
+} val_hrpd_rssi_rpt_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDatacardGetNetworkInfoMsgT msg;
+} val_datacard_get_network_info_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDataCardOTAActivateMsgT msg;
+} val_datacard_ota_activate_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDataCardSetDevParamMsgT msg;
+} val_datacard_set_dev_param_ets_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDataCardGetDevParamMsgT msg;
+} val_datacard_get_dev_param_ets_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDatacardGetConnInfoMsgT msg;
+} val_datacard_get_conn_info_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDataCardGetNtwkErrStrMsgT msg;
+} val_datacard_get_ntwk_err_str_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmMsgT msg;
+} val_hspd_hlp_parm_set_ets_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiGetParmMsgT msg;
+} val_hspd_hlp_parm_get_ets_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_ui_parm_set_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_ui_parm_get_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_set_ui_lock_code_rsp_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_sleepover_indicator_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswGetTransmitInfoRspMsgT msg;
+} val_get_transmit_info_rsp_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_auto_power_up_set_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_auto_power_up_get_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmRspMsgT msg;
+} val_hlp_hspd_seg_init_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_hlp_hspd_seg_profile_init_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmMsgT msg;
+} val_do_parm_set_ets_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiGetParmMsgT msg;
+} val_do_parm_get_ets_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiGetParmRspMsgT msg;
+}val_dbm_get_ehrpd_mode_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSetSecureDataRspMsgT msg;
+}val_akey_change_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptDataBurstMsgT msg;
+}val_nwk_rpt_data_burst_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptServiceReadyMsgT msg;
+}val_nwk_rpt_service_ready_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptPktStateMsgT msg;
+}val_nwk_rpt_pkt_state_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValNwkRptPktDormTmrMsgT msg;
+}val_nwk_rpt_pkt_dorm_tmr_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswCheckLockingFeatureRptT msg;
+}val_lock_feature_check_err_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ CssMarkSystemMsgT msg;
+}val_css_mark_current_1x_system_as_negative_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmRspMsgT msg;
+}val_at_hlp_parm_set_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiGetParmRspMsgT msg;
+}val_at_get_do_parm_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_ext_info_get_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uicc_restric_access_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValDbmApiSetParmRspMsgT msg;
+}val_at_ccss_ack_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_access_max_capsule_size_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_change_akey_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_nwk_retrieve_channel_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_set_mip_password_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_nwk_rpt_order_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_nwk_rpt_stop_continuous_dtmf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_pll_channel_config_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_psw_cp_pwr_cycle_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_eng_info_rpt_timer_expired_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_deepsleep_callback_expired_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_uim_no_service_expired_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_eswla_timer_expired_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ IratCssValPowerCtrlCnfT msg;
+}val_css_irat_power_ctrl_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_dandcn_hystmr_expr_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_uim_ota_update_nam_data_msg_struct;
+
+/*********************gps**********************/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsWriteServerConfigRspMsgT msg;
+}val_gps_write_server_config_rsp_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ValGpsFixModeGetRspMsgT msg;
+}val_gps_fix_mode_get_rsp_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ValGpsSessionOpenRspMsgT msg;
+}val_gps_session_open_rsp_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_user_mode_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_test_mode_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_ap_mode_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ValGpsSuplCellInformationRspMsgT msg;
+}val_gps_supl_cell_info_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ValGpsRfDelayMsgT msg;
+}val_gps_rf_delay_set_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ValGpsTimeIndMsgT msg;
+}val_ap_gps_time_ind_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ValGpsFakePowerOnMsgT msg;
+}val_ap_gps_fake_power_on_req_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+ValGpsEmergencyCallIndMsgT msg;
+}val_ap_gps_emergency_call_ind_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_gps_rpc_rev_time_aiding_req_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_gps_rpc_rev_assist_data_req_msa_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_gps_rpc_rev_power_on_ack_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_gps_rpc_rev_supl_tcp_data_send_rsp_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_gps_rpc_rev_supl_tcp_data_recv_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_gps_rpc_rev_supl_cell_id_req_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_gps_rpc_rev_supl_get_network_type_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_gps_rpc_rev_supl_get_network_mode_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_gps_rpc_fwd_delete_assist_data_req_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_gps_rpc_fwd_power_on_ack_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+} val_gps_rpc_fwd_query_rat_mode_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+OperationModeT msg;
+} val_gps_rpc_fwd_get_op_mode_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+GpsSuplCellInformationRspMsgT msg;
+} val_gps_rpc_fwd_get_cell_info_msg_struct;
+typedef struct
+{
+ LOCAL_PARA_HDR
+GpsAfltMeasurementMsgT msg;
+} val_gps_rpc_fwd_ppm_rpt_msg_struct;
+
+
+/* SIM_UIM and SIM_UIM_2 messages */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_mdn_cnf_struct msg;
+}val_uim_get_mdn_cnf_msg_struct;
+
+typedef val_uim_get_mdn_cnf_msg_struct val_uim1_get_mdn_cnf_msg_struct;
+typedef val_uim_get_mdn_cnf_msg_struct val_uim2_get_mdn_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpPppConnectCnfMsgT msg;
+} val_hlp_ppp_connect_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpPppDisconnectCnfMsgT msg;
+} val_hlp_ppp_disconnect_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim1_update_mdn_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpPppDisconnectIndMsgT msg;
+} val_hlp_ppp_disconnect_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim2_update_mdn_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpPppModifyIndMsgT msg;
+} val_hlp_ppp_modify_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim1_del_mdn_rec_msg_struct;
+
+typedef struct
+{
+ kal_bool card_inserted;
+ sim_error_cause_enum error_cause;
+}valUimCardErrorIndT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ valUimCardErrorIndT msg;
+}val_uim_at_card_error_ind_struct;
+
+typedef val_uim_at_card_error_ind_struct val_uim1_at_card_error_ind_msg_struct;
+typedef val_uim_at_card_error_ind_struct val_uim2_at_card_error_ind_msg_struct;
+
+typedef struct
+{
+ kal_uint8 card_type;
+ kal_bool is_ct3g_card;
+}valUimCardTypeInfoT;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ valUimCardTypeInfoT msg;
+}val_uim_at_card_type_ind_struct;
+
+typedef val_uim_at_card_type_ind_struct val_uim1_at_card_type_ind_msg_struct;
+typedef val_uim_at_card_type_ind_struct val_uim2_at_card_type_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_card_pin_info_ind_struct msg;
+}val_uim_pin_info_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_card_app_info_ind_struct msg;
+}val_uim_card_app_info_ind_msg_struct;
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimApduStatusWordNotifyMsgT msg;
+}val_uim_apdu_status_word_notify_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRefreshNotiIndMsgT msg;
+}val_uim_refresh_noti_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRefreshIndMsgT msg;
+}val_uim_refresh_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_terminal_response_rsp_msg_struct;
+#endif
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpEhrpdBearerConnCnfMsgT msg;
+} val_hlp_ehrpd_bearer_connect_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim2_del_mdn_rec_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpEhrpdBearerDisconCnfMsgT msg;
+} val_hlp_ehrpd_bearer_disconnect_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_home_sid_nid_cnf_struct msg;
+}val_uim_get_home_sid_nid_cnf_msg_struct;
+
+typedef val_uim_get_home_sid_nid_cnf_msg_struct val_uim1_get_home_sid_nid_cnf_msg_struct;
+typedef val_uim_get_home_sid_nid_cnf_msg_struct val_uim2_get_home_sid_nid_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpEhrpdBearerDisconIndMsgT msg;
+} val_hlp_ehrpd_bearer_disconnect_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpEhrpdBearerModifyIndMsgT msg;
+} val_hlp_ehrpd_bearer_modify_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ HlpValNetwkRelRspMsgT msg;
+} val_hlp_network_rel_rsp_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_imsi_cnf_struct msg;
+}val_uim1_get_imsi_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_imsi_cnf_struct msg;
+}val_uim2_get_imsi_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_imsi_cnf_struct msg;
+}val_uim1_get_min_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_imsi_cnf_struct msg;
+}val_uim2_get_min_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimCardStatusRspMsgT msg;
+}val_uim1_get_chv_status_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimCardStatusRspMsgT msg;
+}val_uim2_get_chv_status_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimAppChvRspMsgT msg;
+}val_uim1_verify_chv_cnf_msg_struct,
+ val_uim2_verify_chv_cnf_msg_struct,
+ val_uim1_change_chv_cnf_msg_struct,
+ val_uim2_change_chv_cnf_msg_struct,
+ val_uim1_unblock_chv_cnf_msg_struct,
+ val_uim2_unblock_chv_cnf_msg_struct,
+ val_uim1_enable_chv_cnf_msg_struct,
+ val_uim2_enable_chv_cnf_msg_struct,
+ val_uim1_disable_chv_cnf_msg_struct,
+ val_uim2_disable_chv_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim1_get_crsm_ack_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim2_get_crsm_ack_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim1_uicc_restric_access_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim2_uicc_restric_access_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim1_uicc_generic_access_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim2_uicc_generic_access_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_iccid_cnf_struct msg;
+}val_uim_get_iccid_msg_struct;
+
+typedef val_uim_get_iccid_msg_struct val_uim1_get_iccid_msg_struct;
+typedef val_uim_get_iccid_msg_struct val_uim2_get_iccid_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_card_app_info_cnf_struct msg;
+}val_uim_get_app_info_rsp_msg_struct;
+
+typedef val_uim_get_app_info_rsp_msg_struct val_uim1_get_app_info_rsp_msg_struct;
+typedef val_uim_get_app_info_rsp_msg_struct val_uim2_get_app_info_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uimUtkFileChangedIndMsgT msg;
+} val_uim_utk_file_changed_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_bool IMSI_M_Valid; /* IMSI_M */
+ IMSIType IMSI_Mp;
+ kal_bool IMSI_T_Valid; /* IMSI_T */
+ IMSIType IMSI_Tp;
+ kal_uint8 hrpd_NAI[C2K_HRPD_NAI_LEN];
+ kal_uint8 hrpd_NAI_len;
+ uim_gid_struct gid_info;
+}val_uim_me_lock_info_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim_at_envelope_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_uimid_cnf_struct msg;
+}val_uim_get_uimid_cnf_msg_struct;
+
+typedef val_uim_get_uimid_cnf_msg_struct val_uim1_get_uimid_cnf_msg_struct;
+typedef val_uim_get_uimid_cnf_msg_struct val_uim2_get_uimid_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_imsi_cnf_struct msg;
+}val_uim1_get_cimi_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_get_imsi_cnf_struct msg;
+}val_uim2_get_cimi_cnf_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimGetCstRspMsgT msg;
+}val_uim_get_cst_info_rsp_msg_struct;
+
+typedef val_uim_get_cst_info_rsp_msg_struct val_uim1_get_cst_info_rsp_msg_struct;
+typedef val_uim_get_cst_info_rsp_msg_struct val_uim2_get_cst_info_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim1_uicc_logi_chan_open_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim2_uicc_logi_chan_open_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim1_uicc_logi_chan_close_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim2_uicc_logi_chan_close_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim1_at_envelope_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ UimRspMsgT msg;
+}val_uim2_at_envelope_rsp_msg_struct;
+
+/* MSG_ID_VAL_AP_GPS_CP_LOCATION_RESPONSE_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValGpsCpLocRespMsgT msg;
+}val_ap_gps_cp_location_response_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_cache_fcp_info_ind_struct msg;
+}val_uim_cache_fcp_info_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_cache_binary_info_ind_struct msg;
+}val_uim_cache_binary_info_ind_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_cache_record_info_ind_struct msg;
+}val_uim_cache_record_info_ind_msg_struct;
+
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ cuim_mdn_ef_data_struct msg;
+ kal_uint8 protocol_id;
+}val_uim_cache_mdn_rec_ind_msg_struct;
+
+#if defined(MTK_DEV_SLT)
+typedef struct
+{
+ LOCAL_PARA_HDR
+ OperationModeT prefmode;
+}val_slt_set_rat_mode_ind_struct;
+#endif
+
+#ifdef __CARRIER_RESTRICTION__
+typedef struct
+{
+ LOCAL_PARA_HDR
+ uim_cval_card_error_ind_struct msg;
+}uim_cval_card_error_ind_msg_struct;
+#endif
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+typedef struct
+{
+ kal_bool factory_mode;
+}val_uim_get_factory_mode_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+}val_uim_set_factory_mode_rsp_msg_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ val_uim_get_factory_mode_struct msg;
+}val_uim_get_factory_mode_rsp_msg_struct;
+/* MSG_ID_VAL_SET_AUTOREG_INFO_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ PswSetAutoRegInfoMsgT msg;
+}val_set_autoreg_info_msg_struct;
+
+/* VAL_SMS_POWER_STATUS_MSG */
+typedef struct
+{
+ LOCAL_PARA_HDR
+ ValSmsPowerStatusMsgT msg;
+} val_sms_power_status_msg_struct;
+#endif
+#endif
diff --git a/mcu/interface/protocol/l4_c2k/val_nvram.h b/mcu/interface/protocol/l4_c2k/val_nvram.h
new file mode 100644
index 0000000..bb4a513
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/val_nvram.h
@@ -0,0 +1,614 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 CONSKAL_TRUED 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 _VAL_NVRAM_H_
+
+#define _VAL_NVRAM_H_ 1
+
+/*****************************************************************************
+ * Includes
+ ****************************************************************************/
+#include "kal_general_types.h"
+#include "valattune.h"
+
+#define NUM_BASESSD 16
+#define SSD_DATA_SIZE 1000 /* Total size of scrambling alogrithm contents */
+#define VAL_SMS_CBS_CHA_MAX 4
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+#define VAL_ERI_MAX_SIZE 4096 /* Assuming 30 ERI Table entries */
+#endif
+
+typedef enum
+{
+ CP_VAL_GPS_PRIVACY_SETTING_VALUE_UNKNOWN = 0,
+ CP_VAL_GPS_PRIVACY_SETTING_VALUE_E911_ONLY,
+ CP_VAL_GPS_PRIVACY_SETTING_VALUE_LOCATION_ON,
+ CP_VAL_GPS_PRIVACY_SETTING_VALUE_LOCATION_MI_ONLY,
+ CP_VAL_GPS_PRIVACY_SETTING_VALUE_LOCATION_MT_ONLY
+}ValGpsPrivacySettingT;
+typedef struct
+{
+ kal_uint16 Year;
+ kal_uint16 Month;
+ kal_uint16 DayOfWeek;
+ kal_uint16 Day;
+ kal_uint16 Hour;
+ kal_uint16 Minute;
+ kal_uint16 Second;
+ kal_uint16 Milliseconds;
+
+ /*; GPS week as the number of whole weeks since GPS time zero*/
+ kal_uint32 GPSweek;
+ /*; GPS time of week in milliseconds*/
+ kal_uint32 GPSTimeOfWeek;
+} ValGpsSystemTimeT;
+
+typedef enum
+{
+ CP_VAL_GPS_SECURITY_DISABLE,
+ CP_VAL_GPS_SECURITY_ENABLE
+}ValGpsSecOperE;
+typedef struct {
+
+ kal_int32 delay1X;
+ kal_int32 delayDO;
+}ValGpsRfDelayStruct;
+
+typedef struct {
+ ValGpsPrivacySettingT LocationMode;
+
+ kal_uint8 BaseSSD[NUM_BASESSD];
+ /*kal_uint8 SSD[NUM_BASESSD];*/
+ ValGpsSystemTimeT UTCTime; /*The timestamp indicates when the BaseSSD was created. The timestamp will be in UTC time*/
+
+ /*kal_uint32 ScramblingCode;*/
+ kal_bool bAddrValid;
+ kal_bool IPType; /*0: IPV4; 1: IPV6*/
+ kal_uint32 Ipv4Addr;
+ kal_uint32 Ipv6Addr[4];
+
+ kal_bool bURLValid;
+ kal_uint8 URLAddr[256];
+
+ kal_uint32 PortNum;
+
+ kal_uint32 EphUpdateTime;
+ kal_uint32 AlmUpdateTime;
+ kal_uint8 ssdData[SSD_DATA_SIZE];
+
+ ValGpsSecOperE Status;
+
+ kal_uint32 ValMpcAddr;
+ kal_uint16 ValMpcPort;
+
+ kal_uint8 SIP_NAI[72];
+ kal_uint8 SIP_PASSWORD[16];
+
+ ValGpsRfDelayStruct RfDelay[5];
+}GpsDbmDataParms;
+
+/* atc mod */
+#define ATC_MAX_CFG_STR_SIZE 249 /* MAX_CFG_LEN in Ai_data.h */
+#define ATC_MAX_FDL_STR_SIZE 95 /* Sect 4.4.3 IS-707-A.3 */
+#define ATC_MAX_GCAP_STR_SIZE 64 /* Ai_cmd is using 65535 bytes!! */
+#define ATC_MAX_FLI_STR_SIZE 21 /* MAX_FLI_LEN in Ai_data.h */
+#define ATC_MAX_FPA_STR_SIZE 21 /* MAX_FPA_LEN in Ai_data.h */
+#define ATC_MAX_FPI_STR_SIZE 21 /* MAX_FPI_LEN in Ai_data.h */
+#define ATC_MAX_FPW_STR_SIZE 21 /* MAX_FPW_LEN in Ai_data.h */
+#define ATC_MAX_FSA_STR_SIZE 21 /* MAX_FSA_LEN in Ai_data.h */
+#define ATC_MAX_GMI_STR_SIZE 64 /* Sect 4.1.1 IS-131 says 2048 */
+#define ATC_MAX_GMM_STR_SIZE 64 /* Sect 4.1.2 IS-131 says 2048 */
+#define ATC_MAX_GMR_STR_SIZE 64 /* Sect 4.1.3 IS-131 says 2048 */
+#define ATC_MAX_HWV_STR_SIZE 64
+#define ATC_MAX_GOI_STR_SIZE 64 /* Sect 4.1.4 IS-131 says 2048 */
+#define ATC_MAX_GSN_STR_SIZE 64 /* Sect 4.1.5 IS-131 says 2048 */
+
+#define ATC_MAX_FIF_LEN 90
+
+#define DEFAULT_FCC_VR 0
+#define DEFAULT_FCC_BR 0
+#define DEFAULT_FCC_WD 0
+#define DEFAULT_FCC_LN 0
+#define DEFAULT_FCC_DF 0
+#define DEFAULT_FCC_EC 0
+#define DEFAULT_FCC_BF 0
+#define DEFAULT_FCC_ST 0
+
+#define DEFAULT_FCR 0
+
+#define DEFAULT_FFC_VRC 0
+#define DEFAULT_FFC_DFC 0
+#define DEFAULT_FFC_LNC 0
+#define DEFAULT_FFC_WDC 0
+
+#define DEFAULT_FRQ_PGL 0
+#define DEFAULT_FRQ_CBL 0
+
+#define DEFAULT_MS_CARRIER CR_V34
+#define DEFAULT_MS_AUTOMODE KAL_FALSE
+
+
+#if (AT_DPD_AUTOBAUD_RATES == BR_NONE)
+ #ifndef AT_DEFAULT_IPR
+ #error "AT_DEFAULT_IPR not defined"
+ #endif
+
+ #if ((AT_DEFAULT_IPR == 0) || ((AT_DEFAULT_IPR & AT_DPD_FIXED_RATES) == 0))
+ #error "AT_DEFAULT_IPR definition error"
+ #endif
+
+ #if (AT_DEFAULT_IPR == BR_300)
+ #define IPR_DEFAULT 300
+ #elif (AT_DEFAULT_IPR == BR_1200)
+ #define IPR_DEFAULT 1200
+ #elif (AT_DEFAULT_IPR == BR_2400)
+ #define IPR_DEFAULT 2400
+ #elif (AT_DEFAULT_IPR == BR_4800)
+ #define IPR_DEFAULT 4800
+ #elif (AT_DEFAULT_IPR == BR_9600)
+ #define IPR_DEFAULT 9600
+ #elif (AT_DEFAULT_IPR == BR_19200)
+ #define IPR_DEFAULT 19200
+ #elif (AT_DEFAULT_IPR == BR_38400)
+ #define IPR_DEFAULT 38400
+ #elif (AT_DEFAULT_IPR == BR_57600)
+ #define IPR_DEFAULT 57600
+ #elif (AT_DEFAULT_IPR == BR_115200)
+ #define IPR_DEFAULT 115200UL
+ #elif (AT_DEFAULT_IPR == BR_230400)
+ #define IPR_DEFAULT 230400UL
+ #else
+ #error "AT_DEFAULT_IPR definition error"
+ #endif
+
+#else /* (AT_DPD_AUTOBAUD_RATES != BR_NONE) */
+#define IPR_DEFAULT 0
+#endif
+
+
+#ifdef MTK_CBP
+#define ATC_MAX_REG_TYPE_NUM 7
+#endif
+
+typedef struct
+{
+ kal_uint8 bcs;
+ kal_uint8 bcl;
+} AtcCbc;
+
+
+typedef struct
+{
+ kal_uint8 direction;
+ kal_bool compressionNegotiation;
+ kal_uint16 maxDict;
+ kal_uint8 maxString;
+} AtcDs;
+
+typedef struct
+{
+ kal_uint8 sqm;
+ kal_uint8 fer;
+} AtcCsq;
+
+typedef enum
+{
+ ATC_ABC_Unknown,
+ ATC_ABC_800MHz,
+ ATC_ABC_1900MHz,
+ ATC_NUM_ABCs
+} AtcBandClass;
+
+typedef struct
+{
+ AtcBandClass bandClass;
+ kal_char band;
+ kal_uint16 sid;
+} AtcCss;
+
+typedef struct
+{
+ kal_uint8 breakSelection;
+ kal_bool timed;
+ kal_uint8 defaultLen;
+} AtcEb;
+
+typedef struct
+{
+ kal_uint8 origRqst;
+ kal_uint8 origFbk;
+ kal_uint8 ansFbk;
+} AtcEs;
+
+typedef struct
+{
+ kal_uint8 pendingTd;
+ kal_uint8 pendingRd;
+ kal_uint8 timer;
+} AtcEtbm;
+
+typedef struct
+{
+ kal_bool sub;
+ kal_bool sep;
+ kal_bool pwd;
+} AtcFap;
+
+typedef struct
+{
+ kal_bool vr;
+ kal_uint8 br;
+ kal_uint8 wd;
+ kal_uint8 ln;
+ kal_uint8 df;
+ kal_bool ec;
+ kal_bool bf;
+ kal_uint8 st;
+} AtcFcc;
+
+typedef struct
+{
+ kal_uint8 rq;
+ kal_uint8 tq;
+} AtcFcq;
+
+typedef struct
+{
+ kal_uint8 vrc;
+ kal_uint8 dfc;
+ kal_uint8 lnc;
+ kal_uint8 wdc;
+} AtcFfc;
+
+typedef struct
+{
+ kal_bool rpr;
+ kal_bool tpr;
+ kal_bool idr;
+ kal_bool nsr;
+} AtcFnr;
+
+typedef struct
+{
+ kal_uint8 buf[ATC_MAX_FIF_LEN];
+ kal_uint8 len;
+} AtcFif;
+
+typedef struct
+{
+ kal_uint8 pgl;
+ kal_uint8 cbl;
+} AtcFrq;
+
+typedef struct
+{
+ kal_uint8 format;
+ kal_uint8 parity;
+} AtcIcf;
+
+typedef struct
+{
+ kal_uint8 dceByDte;
+ kal_uint8 dteByDce;
+} AtcIfc;
+typedef struct
+{
+ kal_uint8 carrier;
+ kal_bool automode;
+ kal_uint16 minRate;
+ kal_uint16 maxRate;
+ kal_uint16 minRxRate;
+ kal_uint16 maxRxRate;
+} AtcMs;
+
+typedef struct
+{
+ kal_uint8 mode;
+ kal_uint8 dfltAnsMode;
+ kal_bool fbkTimeEnable;
+} AtcMv18s;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_CFG_STR_SIZE];
+} AtcDbmCfgStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_FDL_STR_SIZE];
+} AtcDbmFdlStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_FLI_STR_SIZE];
+} AtcDbmFliStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_FPA_STR_SIZE];
+} AtcDbmFpaStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_FPI_STR_SIZE];
+} AtcDbmFpiStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_FPW_STR_SIZE];
+} AtcDbmFpwStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_FSA_STR_SIZE];
+} AtcDbmFsaStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_GCAP_STR_SIZE];
+} AtcDbmGcapStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_GMI_STR_SIZE];
+} AtcDbmGmiStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_GMM_STR_SIZE];
+} AtcDbmGmmStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_GMR_STR_SIZE];
+} AtcDbmGmrStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_HWV_STR_SIZE];
+} AtcDbmHwvStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_GOI_STR_SIZE];
+} AtcDbmGoiStrT;
+
+typedef struct
+{
+ kal_uint8 StrChar[ATC_MAX_GSN_STR_SIZE];
+} AtcDbmGsnStrT;
+
+typedef struct
+{
+ kal_uint8 Carrier[8];
+} AtcDbmMaT;
+
+typedef struct
+{
+ kal_uint32 ValActivedBandMask;
+} AtcValActivedBandDataT;
+
+#ifdef MTK_CBP
+typedef struct
+{
+ kal_bool regTypeArray[ATC_MAX_REG_TYPE_NUM];
+} AtcValRegtypeDataT;
+
+#endif
+
+
+typedef struct
+{
+ kal_bool ParamSetFlag;
+ kal_uint8 C109Parameter;
+ kal_uint8 CADParameter;
+ AtcCbc CBCParameter;
+ kal_uint32 CBIPParameter;
+ kal_bool CDRParameter;
+ AtcDs CDSParameter;
+ kal_uint8 CFCParameter;
+ kal_uint32 CMIPParameter;
+ kal_uint8 CMUXParameter;
+ kal_bool CPERParameter;
+ kal_uint16 CPSParameter;
+ kal_bool CPSRParameter;
+ kal_uint8 CQDParameter;
+ kal_bool CRCParameter;
+ kal_uint8 CRMParameter;
+ AtcCsq CSQParameter;
+ AtcCss CSSParameter;
+ kal_uint8 CTAParameter;
+ kal_bool CXTParameter;
+ kal_uint8 C108Parameter;
+ kal_uint8 DParameter;
+ kal_bool DialTypeParameter;
+ kal_bool DRParameter;
+ AtcDs DSParameter;
+ kal_bool EParameter[AT_CHAN_NUM];
+ AtcEb EBParameter;
+ kal_uint8 EFCSParameter;
+ kal_bool ERParameter;
+ AtcEs ESParameter;
+ kal_uint8 ESRParameter;
+ AtcEtbm ETBMParameter;
+ kal_bool FAAParameter;
+ AtcFap FAPParameter;
+ kal_uint8 FBOParameter;
+ kal_bool FBUParameter;
+ AtcFcc FCCParameter;
+ kal_uint8 FCLASSParameter;
+ AtcFcq FCQParameter;
+ kal_bool FCRParameter;
+ kal_uint8 FCTParameter;
+ kal_bool FEAParameter;
+ AtcFfc FFCParameter;
+ kal_uint8 FHSParameter;
+ kal_bool FIEParameter;
+ AtcFcc FISParameter;
+ kal_uint8 FLOParameter;
+ kal_bool FLPParameter;
+ kal_uint8 FMSParameter;
+ AtcFnr FNRParameter;
+ AtcFif FNSParameter;
+ kal_bool FPPParameter;
+ kal_uint8 FPRParameter;
+ kal_uint8 FPSParameter;
+ AtcFrq FRQParameter;
+ kal_uint8 FRYParameter;
+ kal_bool FSPParameter;
+ kal_bool IBCParameter;
+ AtcIcf ICFParameter;
+ AtcIfc IFCParameter;
+ kal_bool ILRRParameter;
+ kal_uint32 IPRParameter;
+ kal_uint8 LParameter;
+ kal_uint8 MParameter;
+ kal_bool MRParameter;
+ AtcMs MSParameter;
+ kal_bool MV18RParameter;
+ AtcMv18s MV18SParameter;
+ kal_bool QParameter[AT_CHAN_NUM];
+ kal_uint8 S0Parameter;
+ kal_uint8 S3Parameter;
+ kal_uint8 S4Parameter;
+ kal_uint8 S5Parameter;
+ kal_uint8 S6Parameter;
+ kal_uint8 S7Parameter;
+ kal_uint8 S8Parameter;
+ kal_uint8 S9Parameter;
+ kal_uint8 S10Parameter;
+ kal_uint8 S11Parameter;
+ kal_bool VParameter[AT_CHAN_NUM];
+ kal_uint8 XParameter;
+ kal_uint8 DMUVParameter;
+ kal_uint8 QCMIPParameter;
+
+ kal_bool QCQNCParameter;
+ kal_uint8 QCMDRParameter;
+
+ AtcDbmCfgStrT CfgStr;
+ AtcDbmFdlStrT FdlStr;
+ AtcDbmFliStrT FliStr;
+ AtcDbmFpaStrT FpaStr;
+ AtcDbmFpiStrT FpiStr;
+ AtcDbmFpwStrT FpwStr;
+ AtcDbmFsaStrT FsaStr;
+ AtcDbmGcapStrT GcapStr;
+ AtcDbmGmiStrT GmiStr;
+ AtcDbmGmmStrT GmmStr;
+ AtcDbmGmrStrT GmrStr;
+ AtcDbmGoiStrT GoiStr;
+ AtcDbmGsnStrT GsnStr;
+ AtcDbmMaT MaTbl;
+ AtcDbmHwvStrT HwvStr;
+ kal_uint8 CMEEParameter;
+#ifdef MTK_DEV_ENGINEER_MODE
+ kal_uint8 EctmMode;
+#ifdef MTK_DEV_C2K_IRAT
+ kal_uint8 EclscMode;
+#endif
+#endif
+#ifdef MTK_CBP
+ kal_bool VPMode; /* voice privacy mode */
+#if !(defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__))
+ AtcValActivedBandDataT ActivedBand;
+#endif
+ AtcValRegtypeDataT stRegTypeTbl; /*saved value, if enable the registration type
+ RegTypeArray[0], timer based
+ RegTypeArray[1], Power up
+ RegTypeArray[2], Zoned based
+ RegTypeArray[3], Power down
+ RegTypeArray[4], Parameter change
+ RegTypeArray[5], order
+ RegTypeArray[6], distanc based
+ TRUE,enalbe the reg type*/
+
+
+ kal_uint16 uPrefSo;
+ kal_uint8 uPrefRc;
+ kal_bool bEvrcCap;
+ kal_bool bEvrcbSupport; /*True,the EvrcB(SO68) is enable, False, it is disable*/
+ kal_bool bEvrcSupport; /*True,the EVRC(SO3) is enable, False, it is disable*/
+
+#endif
+ kal_uint8 PrefMode; /*for mode switch optimization*/
+ kal_bool bSmsAckOff; /*True,UE does not send SMS Ack, False, UE sends SMS Ack as normal */
+} AtcDbmBinDataT;
+
+typedef struct {
+#define VAL_SMS_DANDCN_MAX_VDNADDR_LEN (32)
+ kal_bool isDanStopShallBeSend;
+ kal_uint8 aucVdnAddr[VAL_SMS_DANDCN_MAX_VDNADDR_LEN+1];
+} ValSmsDanDcnInfoT;
+typedef struct
+{
+#ifdef __TC10_IPC_CDMA_SUPPORT__
+ kal_uint8 AutoRegResult;
+ kal_uint8 AutoRegFlag;
+ kal_uint8 GsmImsi[9];
+ kal_bool IsGsmImsiValid;
+#else
+ kal_uint8 AutoReg;
+ kal_uint16 RegMask;
+#endif
+} ValCustomizedParmDataT;
+
+typedef struct {
+ kal_bool CbsState; /* FALSE, CBS off; TRUE, CBS on */
+ kal_uint32 LanMask; /* lanuage bitmap */
+ kal_uint32 ChaMask[VAL_SMS_CBS_CHA_MAX]; /* channels bitmap */
+ kal_uint32 CmasMask; /* cmas bitmap */
+} ValSmsCbsInfoT;
+
+typedef struct {
+ kal_uint8 mem1;
+} ValMem1ValT;
+
+typedef struct {
+ kal_uint8 vp;
+} ValVpValT;
+
+typedef struct {
+ kal_uint8 enableCnir;
+} ValCnirDataT;
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+typedef struct
+{
+ kal_uint8 data[VAL_ERI_MAX_SIZE];
+}ValEriTableT;
+#endif
+#endif/* _VAL_NVRAM_H_ */
+
diff --git a/mcu/interface/protocol/l4_c2k/valapi.h b/mcu/interface/protocol/l4_c2k/valapi.h
new file mode 100644
index 0000000..b9af198
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valapi.h
@@ -0,0 +1,5304 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2005-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+/*****************************************************************************
+
+ FILE NAME: valapi.h
+
+ DESCRIPTION:
+
+ This file contains all constants and typedefs needed to interface
+ with the VAL unit via the Exe mail service routines.
+
+
+*****************************************************************************/
+#ifndef VALAPI_H
+#define VALAPI_H
+
+#include "sysdefs.h"
+#include "pswnam.h"
+#include "hlpapi.h"
+#include "valatdata.h"
+#include "cpbuf.h"
+#include "pswapi.h"
+#include "pswvalapi.h"
+
+
+#ifdef MTK_PLT_ON_PC
+#include "valatcdefs.h"
+#include "valattune.h"
+#include "sbp_public_utility.h"
+#endif /* MTK_PLT_ON_PC */
+
+
+#include "module_msg_range.h"
+#include "val_nvram.h"
+#include "l4_msgid.h"
+#include "ps_public_l4_msgid.h"
+#include "ps_public_struct.h"
+
+
+#ifndef VAL_MAX_SIZE_DATA
+#define VAL_MAX_SIZE_DATA 64
+#define VAL_MAX_MON_SPY_LEN 64
+
+#define VAL_MAX_CFG_STR_SIZE 249 /* MAX_CFG_LEN in Ai_data.h */
+#define VAL_MAX_BRSWR_DGT_SIZE (32 +1)
+ /* NULL-terminated. */
+#define VAL_MAX_FDL_STR_SIZE 95 /* Sect 4.4.3 IS-707-A.3 */
+#define VAL_MAX_GCAP_STR_SIZE 64 /* Ai_cmd is using 65535 bytes!! */
+#define VAL_MAX_FLI_STR_SIZE 21 /* MAX_FLI_LEN in Ai_data.h */
+#define VAL_MAX_FPA_STR_SIZE 21 /* MAX_FPA_LEN in Ai_data.h */
+#define VAL_MAX_FPI_STR_SIZE 21 /* MAX_FPI_LEN in Ai_data.h */
+#define VAL_MAX_FPW_STR_SIZE 21 /* MAX_FPW_LEN in Ai_data.h */
+#define VAL_MAX_FSA_STR_SIZE 21 /* MAX_FSA_LEN in Ai_data.h */
+#define VAL_MAX_GMI_STR_SIZE 64 /* Sect 4.1.1 IS-131 says 2048 */
+#define VAL_MAX_GMM_STR_SIZE 64 /* Sect 4.1.2 IS-131 says 2048 */
+#define VAL_MAX_GMR_STR_SIZE 64 /* Sect 4.1.3 IS-131 says 2048 */
+#define VAL_MAX_GOI_STR_SIZE 64 /* Sect 4.1.4 IS-131 says 2048 */
+#define VAL_MAX_GSN_STR_SIZE 64 /* Sect 4.1.5 IS-131 says 2048 */
+#ifdef SYS_OPTION_ATCMD_CH_3
+#define VAL_MAX_NUMBER_OF_TIMERS 40 /* 27 timers for all AT channels (4*6+3)*/
+#else
+#define VAL_MAX_NUMBER_OF_TIMERS 20
+#endif
+#define VAL_MAX_USRID_LEN HLP_MAX_USRID_LEN
+#define VAL_MAX_PSWD_LEN HLP_MAX_PSWD_LEN
+#define VAL_MAX_FIF_LEN 90
+#define VAL_MAX_NUM_LINE_IN_RSP ATC_MAX_NUM_LINE_IN_RSP
+#define VAL_MAX_ATPARMS 8
+#define VAL_MAX_COMMAND_BODY_LEN 16
+#ifdef SYS_OPTION_ENHANCEDAT
+#define VAL_ENHANCED_AT_CMD_LEN ATC_ENHANCED_AT_CMD_LEN
+#endif
+#endif
+
+#ifdef MTK_CBP
+#define CT_MCC 460
+#define MCC_WILDCARD_AI 0x3FF /* 10bit all '1's */
+#define MNC_WILDCARD_AI 0x7F /* 7bit all '1's */
+#define GPS_MAX_SECURITY_DATA 16
+extern kal_uint8 FakePowerOnInProgess;
+#endif
+
+#define VAL_MAX_AT_CMD_DATA_LEN 2000 /*For EXCGLA*/
+#define VAL_WILD_CHAR '?'
+
+/*------------------------------------------------------------------------
+ * Define constants used in VAL API
+ *------------------------------------------------------------------------*/
+
+/* undefined troublesome consts */
+#undef KAL_TRUE
+#undef KAL_FALSE
+
+typedef enum
+{
+ VAL_MEM_POOL_SYS,
+ VAL_MEM_POOL_NOHALT
+}ValMemPoolTypeT;
+
+#define NUM_UI_LOCK_CODE_DIGITS 7
+//#undef FEATURE_UTK
+
+
+/* other signals are defined in valdefs.h, and start from _11 up */
+
+/* VAL command mailbox id */
+#define VAL_MAILBOX EXE_MAILBOX_1_ID
+#define VAL_MAILBOX_WAIT_ID EXE_MAILBOX_1
+
+#define VAL_HAL_MAILBOX EXE_MAILBOX_2_ID
+#define VAL_HAL_MAILBOX_WAIT_ID EXE_MAILBOX_2
+
+#define VAL_STORAGE_MAILBOX EXE_MAILBOX_3_ID
+#define VAL_STORAGE_MAILBOX_WAIT_ID EXE_MAILBOX_3
+
+#define VAL_ATC_MAILBOX EXE_MAILBOX_4_ID
+#define VAL_ATC_MAILBOX_WAIT_ID EXE_MAILBOX_4
+
+#define VAL_CUST_MAILBOX EXE_MAILBOX_5_ID
+#define VAL_CUST_MAILBOX_WAIT_ID EXE_MAILBOX_5
+
+
+/* macros */
+#define VAL_MAKE_RECID(Index,DevType) ((Index) | (DevType))
+#define VAL_GET_INDEX_FROM_RECID(PhyAddress) ((PhyAddress) & (0x0FFF))
+#define VAL_GET_DEVTYPE_FROM_RECID(PhyAddress) ((PhyAddress) & (0xF000))
+
+#define VAL_MISC_MAX_REG_TASK (5)
+
+/* timer for L1d/RMC RSSI reports */
+#define VAL_RSSI_REPORT_TIMER (HWD_CLK_FREQ_32KHZ/10) /* 100 ms */
+
+/*-----------------------------------------------------------------
+ * uistate.cpp interface
+ *----------------------------------------------------------------*/
+#define POWER_DOWN_WAIT 1000 /* msec */
+
+
+/*------------------------------------------------------------------------
+ * VAL message data structures (grouped like and in the same order of messages)
+ *------------------------------------------------------------------------*/
+/*------------------------------------------------------------------------
+ * VAL message ids, grouped by originator
+ *
+ * When adding/removing/modifying VAL messages:
+ * - add (or remove) associated data structure; put new structures in the
+ * same section as the message id, and in the same relative order within
+ * its section
+ * - update the VAL section in msg_id.txt for ETS if the message should be
+ * usable from ETS (VAL-subsections on ETS are the same as the ones in
+ * VALapi.h). Try to keep the msg name and ETS command as similar as
+ * possible.
+ * - always update the enum VAL MsgIds in val\val_msg.txt on ETS; the enum is used
+ * to display incoming VAL messages, and should always be kept in synch
+ * with ValMsgIdT.
+ * - update val_msg.txt with the data structure associated with the new
+ * message (optiona; do it only if ETS is supposed to send this message)
+ *
+ *------------------------------------------------------------------------*/
+
+#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 !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#if defined(MTK_CBP) && (!defined(MTK_PLT_ON_PC))
+/* 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 !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* 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 !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#ifdef MTK_CBP
+/* 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 !*/
+#ifdef MTK_CBP
+/* 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 !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* 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 !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* 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 !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* 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 !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* 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 !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#ifdef MTK_DEV_C2K_IRAT
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/* under construction !*/
+/* under construction !*/
+#endif
+#ifdef SYS_OPTION_MORE_AT_CHANNEL
+#define VAL_ALL_ATC_SIGNALS(msgid) ((msgid == MSG_ID_VAL_REV_TX_REQ_AT_1_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_1_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_2_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_2_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_3_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_3_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_4_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_4_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_5_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_5_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_6_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_6_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_7_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_7_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_8_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_8_SIGNAL))
+#elif defined(SYS_OPTION_ATCMD_CH_3)
+#ifdef SYS_OPTION_ATCMD_CH_4
+#define VAL_ALL_ATC_SIGNALS(msgid) ((msgid == MSG_ID_VAL_REV_TX_REQ_AT_1_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_1_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_2_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_2_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_3_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_3_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_4_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_4_SIGNAL))
+#else
+#define VAL_ALL_ATC_SIGNALS(msgid) ((msgid == MSG_ID_VAL_REV_TX_REQ_AT_1_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_1_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_2_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_2_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_3_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_3_SIGNAL))
+#endif
+#else
+#define VAL_ALL_ATC_SIGNALS(msgid) ((msgid == MSG_ID_VAL_REV_TX_REQ_AT_1_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_1_SIGNAL) | \
+ (msgid == MSG_ID_VAL_REV_TX_REQ_AT_2_SIGNAL) | \
+ (msgid == MSG_ID_VAL_FWD_TX_RSP_AT_2_SIGNAL))
+#endif /* SYS_OPTION_MORE_AT_CHANNEL*/
+
+
+typedef struct {
+ kal_bool C109On; /* status of C109, active high */
+ kal_uint8 chan;
+} AtcValC109IndMsgT;
+
+
+typedef enum
+{
+ VAL_PSW_CKECK_Locking_Feature_OK = 0x00,
+ VAL_PSW_CKECK_MIN_ERROR,
+ VAL_PSW_CKECK_DefaultMIN_OK,
+ VAL_PSW_CKECK_SID_ERROR,
+ VAL_PSW_CKECK_MCC_ERROR,
+ VAL_PSW_CKECK_FOR_RELIANCE_PrefNO_ERROR,
+ VAL_PSW_CKECK_MIN_ERROR_OVER_MAX_RETRY_TIMES,
+ VAL_PSW_CKECK_Locking_Feature_NUM
+}PswCheckForMinLockStateT;
+
+/* Generic ETS Message
+ */
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint32 RegId;
+} ValGenericMsgT;
+
+/*-----------------------------------------------------------------
+ * HLPHandler
+ *----------------------------------------------------------------*/
+
+typedef enum
+{
+ VAL_HLP_CONN_SUCCESS, /* success */
+ VAL_HLP_CONN_FAIL, /* fail */
+ VAL_HLP_CONN_DISCONNECT, /* disconnect */
+ VAL_HLP_CONN_DORMANT, /* dormant */
+ VAL_HLP_CONN_RECONNECT, /* reconnect */
+ VAL_HLP_CONN_STATUS_MAX_NUM
+} HlpConnStatusT;
+
+
+typedef struct
+{
+ HlpConnStatusT status;
+ kal_uint32 LocalIPAddr;
+ kal_uint32 RemoteIPAddr;
+ kal_uint32 PriDNSAddr;
+ kal_uint32 SecDNSAddr;
+} ValHlpPppConnStatusMsgT; /* for Um interface only. */
+
+#ifdef MTK_CBP /*MTK_DEV_C2K_IRAT*/
+typedef struct
+{
+ kal_uint16 Mtu;
+} ValHlpMtuUrcMsgT;
+#endif /* MTK_DEV_C2K_IRAT */
+
+typedef struct
+{
+ HlpConnStatusT status;
+} ValHlpPppCloseStatusMsgT;
+
+typedef struct
+{
+ kal_int16 socketId;
+ kal_uint8 sap;
+ ValSocketStatusT status;
+} ValHlpSocketCreateStatusMsgT;
+
+typedef struct
+{
+ kal_uint8 sap;
+ ValSocketStatusT status;
+} ValHlpSocketBindStatusMsgT;
+
+typedef struct
+{
+ kal_uint8 sap;
+ ValSocketStatusT status;
+ kal_uint32 srcIP;
+ kal_uint32 destIP;
+ kal_uint16 srcPort;
+ kal_uint16 dstPort;
+} ValHlpSocketConnStatusMsgT;
+
+typedef struct
+{
+ kal_int16 SockListenfd;
+ kal_uint8 SocketNum;
+ kal_int16 sockfd[5];
+ kal_uint8 sap[5];
+} ValHlpSocketListenStatusMsgT;
+
+typedef struct
+{
+ kal_uint8 sap;
+ kal_uint8 opt_type;
+ kal_uint16 size;
+ ValSocketStatusT status;
+} ValHlpSocketOptStatusMsgT;
+
+typedef struct
+{
+ kal_uint8 sap;
+ ValSocketStatusT status;
+ kal_int8 how;
+} ValHlpSocketShutDownStatusMsgT;
+
+typedef struct
+{
+ kal_uint8 sap;
+ kal_bool lingerOnOff;
+ kal_uint32 lingerTime;
+ ValSocketStatusT status;
+} ValHlpSocketLingerStatusMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+} ValHlpIpDnsAddrGetMsgT;
+
+typedef struct
+{
+ kal_uint32 LocalIPAddr;
+ kal_uint32 PriDNSAddr;
+ kal_uint32 SecDNSAddr;
+} ValHlpIpDnsAddrGetRspMsgT;
+/*-----------------------------------------------------------------
+ * OTASPHandler
+ *----------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------
+ * LocHandler
+ *----------------------------------------------------------------*/
+
+/* Refer to PswPosAfltMeasurementMsgT in pswapi.h */
+ /*-----------------------------------------------------------------
+ * PSWAmpsHandler
+ *----------------------------------------------------------------*/
+
+/* VAL_AMPS_EXT_PROTO_MSG */
+typedef enum
+{
+ VAL_AMPS_MST_VMAIL,
+ VAL_AMPS_MST_CLI,
+ VAL_AMPS_MST_SMS
+} ValAmpsExtProtoType;
+
+typedef struct
+{
+ ValAmpsExtProtoType ExtProtoType;
+ kal_bool SoundAudibleAlertFlag;
+ kal_uint16 MsgLen;
+ kal_uint8 MsgData[1];
+} ValAmpsExtProtoMsgT;
+
+
+typedef enum
+{
+ CSFB_TST_CDMA_PARM,
+ CSFB_TST_SIB8,
+ CSFB_TST_REDIR
+} ValCsfbTstBuffType;
+
+typedef struct
+{
+ ValCsfbTstBuffType buffID;
+ kal_uint8 size;
+ kal_uint8 buff[255];
+} ValCsfbTstSetBufferMsgT;
+
+typedef struct
+{
+ kal_bool inclRand;
+ kal_uint32 Rand;
+ kal_bool inclMobParms;
+} ValCsfbTstParmRspMsgT;
+
+typedef struct
+{
+ kal_bool inclRand;
+ kal_uint32 Rand;
+ kal_bool inclMobParms;
+} ValCsfbTstHOEutraPrepMsgT;
+
+typedef struct
+{
+ kal_bool sysTimeIncl;
+ kal_uint8 sysTime[5];
+} ValCsfbTstMobFromEutraMsgT;
+
+/* VAL_NWK_RPT_PREV_PREVINUSE_MSG */
+typedef struct
+{
+ kal_uint8 PRev;
+ kal_uint8 PRevInUse;
+} ValNetworkPrevAndPrevInUseMsgT;
+
+
+/* VAL_DO_RX_TX_POWER_INFO_DATA_MSG */
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+ kal_int16 MainRxPowerDbmQ6;
+ kal_int16 DivRxPowerDbmQ6;
+ kal_uint16 MainRxGainState;
+ kal_uint16 DivRxGainState;
+ kal_int16 TxPowerDbmQ6;
+ kal_uint16 TxGainState;
+ kal_int16 TxClosedLoopAdjQ6;
+ kal_int16 TxAnt;
+#ifdef MTK_DEV_C2K_IRAT
+ kal_int16 EcIo;
+ kal_uint16 SINR; /* uint:Linear, convert it to dB = 10*lg(SINR/512) */
+#endif
+ kal_bool IsValTriggerItself;
+} ValDoRxTxPwrInfoMsgT;
+
+/* VAL_MISC_RX_TX_PWR_INFO_EVT - this typedef is for UI callback only */
+typedef struct
+{
+ kal_int16 RxPowerDbmQ6;
+ kal_int16 DivRxPowerDbmQ6;
+ kal_int16 TxPowerDbmQ6;
+ kal_uint16 RxGainState;
+ kal_uint16 DivRxGainState;
+ kal_uint16 TxGainState;
+ kal_int16 AvgActiveEcIoQ6;
+#ifdef MTK_CBP
+ kal_int16 LastAvgActiveEcIoQ6_1;
+ kal_int16 LastAvgActiveEcIoQ6_2;
+#endif
+ kal_uint16 TxAgcPdmRep;
+ kal_int16 TxClosedLoopAdjQ6;
+ kal_int16 RxGainIntegral;
+ kal_int16 RxGainCoarse;
+ kal_int16 RxGainFine;
+ kal_int16 RxGainPdmQ3;
+ kal_int16 TxConstPowerOffsetQ6;
+#ifdef MTK_CBP
+ kal_int16 TxAnt;
+#endif
+} ValUiRxTxPowerDataT;
+
+#define ELEVATOR_RSSI_NUMBER 7
+
+typedef struct
+{
+ kal_int32 RxPowerDbmQ6[ELEVATOR_RSSI_NUMBER];
+ kal_int32 RssiSumA;
+ kal_int32 RssiSumB;
+ kal_int16 index;
+ kal_int16 rssiWinsize;
+ kal_int16 rssi_diff_between_elevator_mode;
+ kal_int16 GoodSignal_counter;
+ kal_int16 BadSignal_counter;
+} ValC2kRxTxPowerDataT;
+
+#ifdef MTK_CBP
+/*Tx power level of <5, <10, <15, <20, <25*/
+#define VAL_NUM_TX_POWER_LEVELS 5
+#define VAL_RCV_DO_RX_TX_TIME_INFO_RSP 0X01
+#define VAL_RCV_L1D_RX_TX_TIME_INFO_RSP 0X02
+
+#if 1
+/* VAL_RMC_DO_RX_TX_TIME_INFO_DATA_RSP_MSG */
+typedef struct
+{
+ /*period(in ms) for which Tx is active*/
+ kal_uint32 do_tx_time_ms[VAL_NUM_TX_POWER_LEVELS];
+ /*period (in ms) for which Rx is active*/
+ kal_uint32 do_rx_time_ms;
+}ValDoRxTxtimeInfoRspMsgT;
+#endif
+/* VAL_L1D_RX_TX_TIME_INFO_DATA_RSP_MSG */
+typedef struct
+{
+ /*period(in ms) for which Tx is activ*/
+ kal_uint32 L1D_tx_time_ms[VAL_NUM_TX_POWER_LEVELS];
+ kal_uint32 L1D_rx_time_ms;
+}ValL1dRxTxtimeInfoRspMsgT;
+
+typedef enum
+{
+ VAL_Cl1TST_START_TX_TRANSMIT = 0,
+ VAL_CL1TST_STOP_TX_TRANSMIT,
+ VAL_CL1TST_START_RX_MEASURE,
+ VAL_CL1TST_TX_POWER_QUERY,
+ VAL_CL1TST_START_TX_POWER_MODU_SIGNAL,
+ VAL_CL1TST_STOP_TX_POWER_MODU_SIGNAL,
+ VAL_CL1TST_DETECT_RX_POWER_DBM_UNIT,
+ VAL_CL1TST_POWER_REDUCTION_LEVEL,
+ VAL_CL1TST_POWER_REDUCTION_LEVEL_BY_BAND
+}ValCl1tstReqModeT;
+
+typedef enum
+{
+ VAL_CL1TST_SIG_TX_TONE = 0,
+ VAL_CL1TST_SIG_TX_MODU,
+ VAL_CL1TST_SIG_INVALID = 255
+}ValCl1tstTxSigTypeT;
+
+typedef struct
+{
+ ValCl1tstReqModeT mode;
+ kal_int16 TxPower; /* Need to convert from Q5 to Q3 */
+ kal_int16 MainRxPower;/* Need to convert from Q7 to Q3 */
+ kal_int16 DivRxPower; /* Need to convert from Q7 to Q3 */
+}ValCl1tstRxTxPwrDetectMsgT;
+
+#ifdef __RF_SCAN_FOR_DESENSE_TEST__
+
+typedef struct
+{
+ kal_uint8 RatType;
+ kal_int16 MainRxPower;/* Need to convert from Q7 to Q3 */
+ kal_int16 DivRxPower; /* Need to convert from Q7 to Q3 */
+}ValCl1tstRxScanRspMsgT;
+#endif
+
+
+typedef struct
+{
+ kal_uint8 RatType;
+ kal_uint8 AntennaIdex;
+}ValCl1tstGetAntInfoCfgMsgT;
+
+typedef struct
+{
+ kal_uint8 RatType;
+ kal_uint8 AntennaIdex;
+}ValCl1tstGetAntInfoIndMsgT;
+
+typedef struct
+{
+ kal_uint8 ForceTxAntState;
+ kal_bool EnableForceTas;
+ kal_bool QueryByBand;
+}ValL1dTasForceAntQueryMsgT;
+
+
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+typedef enum
+{
+ VAL_L1D_TX_PWR_REDUCTION = 0,
+ VAL_L1D_TX_PWR_REDUCTION_BY_BAND
+}ValTxPwrReducModeT;
+
+ typedef struct
+ {
+ kal_int16 FeatureIndex;
+ kal_bool DoDatSarCfgRsp; /*TRUE:DO SUCESS CFG RF Fail:DO do not CFG RF */
+ kal_int16 SeqNum;
+ }ValRmcRfcDatSarCfgRspMsgT;
+
+typedef struct
+{
+ kal_int16 SeqNum;
+ kal_int16 featureIndex;
+ kal_bool L1dDatSarCfgRsp; /*TRUE:1x SUCESS CFG RF Fail:1x do not CFG RF */
+}ValL1dRfDatSarCfgRspMsgT;
+#endif
+
+
+ /*-----------------------------------------------------------------
+ * MULTIMEDIA APPLICATION Handler
+ *----------------------------------------------------------------*/
+
+/* Status & Error codes used for VAL Apps callback functions (Music, JPEG) */
+typedef enum
+{
+ VAL_APP_OK = 0,
+ VAL_APP_FILE_FORMAT_INVALID,
+ VAL_APP_FILE_IO_ERROR,
+ VAL_APP_FAILED_ERROR,
+ VAL_APP_WRONG_PLAY_FORMAT,
+ VAL_APP_CONFLICT,
+ VAL_APP_MALLOC_ERROR,
+ VAL_APP_DATA_SIZE_INVALID,
+ VAL_APP_TONE_ID_INVALID,
+
+ VAL_APP_IMAGE_TYPE_INVALID,
+ VAL_APP_IMAGE_CONTEXT_NOT_INIT,
+ VAL_APP_IMAGE_WIDTH_INVALID,
+ VAL_APP_IMAGE_ACTUAL_SIZE_UNKNOWN,
+
+ VAL_APP_VMEMO_WRONG_STATE_ERR,
+ VAL_APP_VMEMO_INVALID_REC_TYPE,
+ VAL_APP_VMEMO_RECORD_DEVICE_FULL,
+ VAL_APP_VMEMO_INVALID_NUM_PKTS,
+ VAL_APP_VMEMO_INVALID_SRVC_OPT,
+ VAL_APP_VMEMO_SRVC_OPT_MISMATCH,
+ VAL_APP_VMEMO_WRONG_REC_WHILE_ON_TRAFFIC,
+ VAL_APP_VMEMO_INTERNAL_ERR,
+ VAL_APP_VMEMO_INVAL_TYPE_FOR_FILE_REC,
+ VAL_APP_VMEMO_INVAL_PLAYBACK_PARMS,
+ VAL_APP_VMEMO_INVAL_PACKET_RATE,
+
+ VAL_APP_A2DP_STREAM_OPERATION_ERR,
+ VAL_APP_MUSIC_NOT_SUPPORTED_ERR,
+ VAL_APP_CMD_NOT_SUPPORTED_ERR,
+ VAP_APP_SAMPLING_RATE_INVALID,
+ VAL_APP_NUM_CHANS_INVALID,
+ VAL_APP_WRONG_RECORD_FORMAT
+} ValAppStatusT;
+
+/* VAL audio sampling rates, used in Music and Voice Memo API's */
+typedef enum
+{
+ VAL_SAMP_RATE_8000,
+ VAL_SAMP_RATE_11025,
+ VAL_SAMP_RATE_12000,
+ VAL_SAMP_RATE_16000,
+ VAL_SAMP_RATE_22050,
+ VAL_SAMP_RATE_24000,
+ VAL_SAMP_RATE_32000,
+ VAL_SAMP_RATE_44100,
+ VAL_SAMP_RATE_48000,
+ VAL_NUM_SAMPLING_RATES
+} ValSamplingRatesT;
+
+/*-----------------------------------------------------------------
+* VSTRM Handler
+*----------------------------------------------------------------*/
+/* Used by Vstrm, but could be used for generic passing of CpBuff */
+typedef struct
+{
+ CpBufferT* pCpBuf;
+ kal_uint16 offset;
+ kal_uint16 Len;
+} ValCpBuffMsgT;
+
+
+/*-----------------------------------------------------------------
+* MISC Handler
+*----------------------------------------------------------------*/
+
+/* VAL_L1DTST_GETPHONESTATUS; rspmsg data structure defined by L1D */
+typedef ExeRspMsgT ValL1DTstGetPhoneStatusMsgT;
+
+/* VAL_HRPD_RSSI_RPT_MSG */
+typedef struct
+{
+ kal_int16 Rssi;
+} ValHrpdRssiRptMsgT;
+
+/* typedef for expressing time in user format */
+typedef struct
+{
+ kal_uint8 Secs, Mins, Hours; /* 00:00:00 to 23:59:59 */
+ kal_uint8 Day, Month; /* 1...31, 1...12 */
+ kal_uint8 DoW; /* 0 (Sun)...6 (Sat) */
+ kal_uint16 Year; /* 1980...2043 */
+ kal_uint16 MilliSecs;
+} ValCalendarTimeT;
+
+/*-----------------------------------------------------------------
+ * ETS Handler
+ *----------------------------------------------------------------*/
+
+/* VAL_SEND_DATA_BURST_MSG */
+/* ??? how about going to a header + data dual structure */
+#define VAL_CP_MAX_DATA_BURST_CHAR 249 /* 255 - Data Burst Header */
+typedef struct
+{
+ kal_uint8 MsgNumber;
+ kal_uint8 BurstType;
+ kal_uint8 NumMsgs;
+ kal_uint8 NumFields;
+ kal_uint8 Data[249]; /* ??? */
+ kal_bool Encoded;
+ kal_bool DigitMode;
+ kal_uint8 NumDigits;
+ kal_uint8 Digits[30]; /* ??? */
+} ValSendDataBurstMsgT;
+
+typedef struct
+{
+ kal_bool Mode; /* KAL_TRUE: disabled */
+} ValKPadDisabledMsgT;
+
+/* VAL_EMERGENCY_MODE_TEST_MSG */
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_bool value;
+} ValEmergencyModeTestingMsgT;
+
+typedef struct
+{
+ kal_bool mode;
+} ValEmergencyModeTestingResponseMsgT;
+
+typedef enum
+{
+ VAL_DEV_NONE = 0x0000,
+ VAL_DEV_UIM = 0x1000,
+ VAL_DEV_RAM = 0x2000,
+ VAL_DEV_FLASH = 0x3000,
+ VAL_DEV_UIM_FLASH = 0x4000,
+ VAL_DEV_FLASH_UIM = 0x5000
+#ifdef MTK_CBP
+ ,VAL_DEV_UIM_FDN = 0x6000,
+ VAL_DEV_UIM_ADN_FDN = 0x7000
+#endif
+} ValDeviceT;
+
+ /* VAL Event typedefs */
+typedef kal_int16 RegIdT;
+typedef void (*ValEventFunc) ( RegIdT RegId,
+ kal_uint32 MsgId,
+ void* MsgBufferP );
+
+ /* Structure for registering events */
+typedef struct
+{
+ kal_bool IsUse; /* if this entry is in use */
+ ValEventFunc CallBack; /* function to call back */
+} ValRegTableT;
+
+/* Event handler */
+typedef struct
+{
+ ValRegTableT* RegTableP; /* Register table pointer */
+ kal_semid SemaphoreP;
+ kal_int16 MaxRegIds; /* Maximum RegId count Register table supported */
+} ValEventHandlerT;
+
+/* index used to access the CallTxtTable[] */
+typedef enum {
+ VAL_CT_DEFAULT,
+ VAL_CT_AMPS_CALL,
+ VAL_CT_DATA_CALL,
+ VAL_CT_FAX_CALL,
+ VAL_CT_SSO1,
+ VAL_CT_SSO2,
+ VAL_CT_SSO3,
+ VAL_CT_SSO6,
+ VAL_CT_SSO9,
+ VAL_CT_SSO14,
+ VAL_CT_SSO17,
+ VAL_CT_SSO32768,
+ VAL_CT_SSO18,
+ VAL_CT_SSO19,
+ VAL_CT_SSO32,
+ VAL_CT_SSO33,
+ VAL_CT_SSO35,
+ VAL_CT_SSO36,
+ VAL_CT_SSO54,
+ VAL_CT_SSO55,
+ VAL_CT_SSO68,
+ VAL_CT_SSO32798,
+ VAL_CT_SSO32799,
+ VAL_CT_SSO32858,
+ VAL_CT_SSO32859,
+ VAL_CT_MAX
+} ValCallTypeT;
+
+/* powerdown sequence signals */
+typedef enum
+{
+ VAL_PWRDWN_START,
+ VAL_PWRDWN_PSDOWN,
+ VAL_PWRDWN_DBMFLUSH,
+ VAL_PWRDWN_AIWFLUSH
+} ValPowerDownIdT;
+
+typedef enum
+{
+ VAL_MISC_PWRDWN_FLUSH_EVT,
+ VAL_MISC_BATTERY_READING_EVT,
+ VAL_MISC_TEMP_READING_EVT,
+ VAL_MISC_RX_TX_PWR_INFO_EVT,
+ VAL_MISC_REFURBISH_AGING_TX_OFF_IND,
+ VAL_MISC_REFURBISH_AGING_TX_ON_IND,
+ VAL_MISC_GET_SMS_COUNT_EVT,
+ VAL_MISC_GET_SMS_EVT
+} ValMiscEventIdT;
+
+#ifdef MTK_PLT_ON_PC_UT
+typedef enum
+{
+ VAL_UT_GV_CSS_OP_MODE,
+ VAL_UT_GV_CSS_NV_READ_COMPLETE,
+ VAL_UT_GV_PROTOCOL_1,
+ VAL_UT_GV_PROTOCOL_2,
+ VAL_UT_GV_PROTOCOL_3
+} ValUtGloblaValTypeE;
+#endif
+
+enum _ValAtService
+{
+ VAL_ATS_AsyncData,
+ VAL_ATS_Fax,
+ VAL_ATS_Rejected,
+ VAL_ATS_PacketRelayRm,
+ VAL_ATS_SingleStackQNC,
+ VAL_ATS_UpBrowser,
+ VAL_ATS_AsyncUpBrowser,
+ VAL_ATS_TcpCktBrowser,
+ VAL_ATS_TcpPktBrowser,
+ VAL_ATS_PacketNtwkRm,
+ VAL_ATS_PPPOnly,
+ VAL_NUM_ATSs
+};
+
+typedef kal_uint8 ValAtService;
+
+typedef struct
+{
+ kal_uint8* buf;
+ kal_uint16 offset;
+ kal_uint16 len;
+} ValAtBuf;
+
+/* IWF-intermediate result codes need not appear in this list. */
+enum
+{
+ /* IWF-final and MT2 generated codes */
+ VAL_ARC_OK,
+ VAL_ARC_CON,
+ VAL_ARC_ERR,
+ VAL_ARC_CPKT,
+ VAL_ARC_CBWSR,
+
+ /* IWF-final generated codes */
+ VAL_ARC_BSY,
+ VAL_ARC_NAN,
+ VAL_ARC_NCR,
+ VAL_ARC_NDT,
+ VAL_ARC_CEIF,
+
+ /* MT2 generated codes */
+ VAL_ARC_NUL,
+ VAL_ARC_CEBR,
+ VAL_ARC_CELF,
+ VAL_ARC_CENDS,
+ VAL_ARC_CENFS,
+ VAL_ARC_CENS,
+ VAL_ARC_CEPF,
+ VAL_ARC_CEPG,
+ VAL_ARC_CERL,
+ VAL_ARC_CERT,
+ VAL_ARC_CRGA,
+ VAL_ARC_CRGF,
+
+ VAL_NUM_RCs
+};
+typedef kal_uint8 ValAtResultCode;
+
+typedef struct
+{
+ kal_uint8 *dataPtr;
+ kal_uint16 offset;
+ kal_uint16 dataLen;
+} FwdDataInfoT;
+
+/* cmd id for ValUserInfoControl() */
+typedef enum
+{
+ VAL_USERINFO_INIT_CMD = 0x01,
+ VAL_USERINFO_RESTART_CMD,
+ VAL_USERINFO_STOP_CMD
+} ValUserInfoCmdT;
+
+typedef struct
+{
+ kal_bool Mode;
+} ValSetPrivacyModeMsgT;
+
+typedef struct
+{
+ kal_uint8 NetPre;
+} ValReportNetPre;
+
+typedef struct
+{
+ kal_uint8 BreakLen; /* in 10 msec units */
+} ValEia617BreakReqMsgT;
+
+typedef struct
+{
+ kal_bool C108On; /* the state of C108, DTE ready. */
+ kal_uint8 chan;
+ kal_bool CableUnplugged ;
+} ValC108IndMsgT;
+
+typedef struct
+{
+ kal_uint32 Rate; /* Bit rate on both Tx and Rx side. */
+} ValRateIndMsgT;
+
+typedef struct
+{
+ CpBufferT* pCpBuf; /* points to the first byte of data */
+ kal_uint16 offset; /* data size in bytes. */
+ kal_uint16 Len;
+ kal_uint8 RlpFlow;
+ kal_uint8 chan;
+} ValRevTxReqMsgT;
+
+#ifdef MTK_PLT_ON_PC_UT
+typedef struct
+{
+ kal_uint8 len;
+ ValUtGloblaValTypeE type[16]; /* points to the first byte of data */
+ kal_uint32 val[16];
+} ValUtGlobalValSetMsgT;
+
+typedef struct
+{
+ CpBufferT* pCpBuf; /* points to the first byte of data */
+ kal_uint16 offset; /* data size in bytes. */
+ kal_uint16 Len;
+ kal_uint8 RlpFlow;
+ kal_uint8 chan;
+ kal_char cmdBuf[ATC_ENHANCED_AT_CMD_LEN];
+} ValRevTxReqMsgUtT;
+
+typedef struct
+{
+ kal_uint16 Len;
+ kal_uint8 chan;
+ kal_char cmdBuf[1024];
+} ValSendTxIndMsgT;
+
+typedef struct
+{
+ kal_uint8 value;
+} ValConfigureReqMsgT;
+
+#endif
+
+#ifdef MTK_DEV_ETS_ENHANCEMENT
+typedef struct
+{
+ kal_bool on;
+} ValATChanCtrlMsgT;
+
+typedef struct
+{
+ kal_char cmdBuf[1];
+} ValATFwdTxReqMsgT;
+
+typedef struct
+{
+ kal_char cmdBuf[1];
+} ValATRevTxReqMsgT;
+#endif
+
+typedef struct
+{
+ kal_uint8* DataBufP; /* points to the first byte of data */
+ kal_uint16 DataLen; /* data size in bytes. */
+} ValFwdTxReqMsgT;
+
+typedef struct
+{
+ kal_uint8 chan;
+} ValFwdTxRspMsgT;
+
+/* VAL_RLP_REV_DATA_RSP_MSG */
+typedef struct
+{
+ kal_uint8 srId;
+} ValRlpRevDataRspMsgT;
+
+/* IOP_RLP_FWD_DATA_IND_MSG */
+typedef struct {
+ kal_uint8 *dataPtr;
+ kal_uint16 offset;
+ kal_uint16 dataLen;
+} ValRlpFwdDataFrameT;
+
+#define NUM_VAL_RLP_FRAMES_PER_INDICATION 20
+typedef struct {
+ kal_uint16 numRlpFrames;
+ ValRlpFwdDataFrameT rlpFrames[NUM_VAL_RLP_FRAMES_PER_INDICATION];
+} ValRlpFwdDataIndMsgT;
+
+
+typedef struct
+{
+ ValAtResultCode ResultCode;
+} ValDsIssueResultMsgT;
+
+typedef struct
+{
+ ValAtService Svc;
+} ValDsConnIndMsgT;
+
+typedef struct
+{
+ kal_uint8 QNCStr[VAL_MAX_BRSWR_DGT_SIZE]; /* null-terminated */
+} ValSetQNCDialStrMsgT;
+
+#ifdef SYS_OPTION_VOICE_RECOGNITION
+typedef enum
+{
+ VAL_VREC_TRAINING_START_EVT,
+ VAL_VREC_TRAINING_COMPLETE_EVT,
+ VAL_VREC_SPEECH_PLAYBACK_EVT,
+ VAL_VREC_START_RECOGNITION_EVT,
+ VAL_VREC_NOT_RECOGNIZED_EVT,
+ VAL_VREC_RECOGNIZED_EVT,
+ VAL_VERC_CANCEL_EVT,
+ VAL_VREC_CAPTURE_CONFIRM_EVT,
+ VAL_VREC_CAPTURE_PLAYBACK_EVT,
+ VAL_VREC_CMD_DONE_EVT,
+ VAL_VREC_TRAIN_CANCEL_EVT,
+ VAL_VREC_CANCEL_EVT,
+ VAL_VREC_TEMPLATE_COMPLETE_EVT
+} ValVrecEventT;
+#endif
+
+/* Please, note!!!! This type HAS to match HWD definitions */
+typedef enum
+{
+ VAL_RF_PCS_BAND, /* = HWD_RF_PLL_BAND_PCS_1900,*/
+ VAL_RF_AMPS_BAND, /* = HWD_RF_PLL_BAND_AMPS, */
+ VAL_RF_CELL_BAND, /* = HWD_RF_PLL_BAND_CDMA_CELLULAR, */
+ VAL_RF_T53_BAND, /* = HWD_RF_PLL_BAND_CDMA_T53, */
+ VAL_RF_KPCS_BAND, /* = HWD_RF_PLL_BAND_KOREAN_PCS, */
+ VAL_RF_UNDEF_BAND /* = HWD_RF_PLL_BAND_UNDEFINED */
+} ValRfPllBandT;
+
+/* Define VAL Display Device Info msg */
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+} ValDispDeviceInfoMsgT;
+
+/* Define VAL Display Device response Info msg */
+#define VAL_DISP_MAX_DEVICE_INFO_LEN 20
+typedef struct
+{
+ kal_char Vendor [VAL_DISP_MAX_DEVICE_INFO_LEN];
+ kal_char ModelId [VAL_DISP_MAX_DEVICE_INFO_LEN];
+ kal_uint16 BitsPerPixel;
+ kal_uint16 WidthInPixels;
+ kal_uint16 HeightInPixels;
+} ValDispDeviceInfoRspMsgT;
+
+/*The following definitions are used for the datacard application software support*/
+
+#define VAL_MAX_ROAMING_NETWORK_LEN 34
+#define VAL_MAX_MDN_LEN 16
+#define VAL_MAX_ACTIVATION_CODE_LEN 8
+#define VAL_MAX_MNHA_LEN 16
+#define VAL_MAX_MNAAA_LEN 16
+#define VAL_MAX_PRL_SIZE 8192
+#define VAL_MAX_NTWK_ERR_STR_LEN 240
+
+typedef enum
+{
+ VAL_WMC_SERVICE_NONE = 0,
+ VAL_WMC_SERVICE_AMPS,
+ VAL_WMC_SERVICE_IS95A,
+ VAL_WMC_SERVICE_IS95B,
+ VAL_WMC_SERVICE_GSM,
+ VAL_WMC_SERVICE_GPRS,
+ VAL_WMC_SERVICE_1XRTT,
+ VAL_WMC_SERVICE_1XEVDO,
+ VAL_WMC_SERVICE_UMTS,
+ VAL_WMC_SERVICE_1XEVDOrA
+}ValWmcServiceTypeT;
+
+typedef enum
+{
+ VAL_WMC_NETWORK_HOME = 0,
+ VAL_WMC_NETWORK_EXTENDED,
+ VAL_WMC_NETWORK_ROAM
+}ValWmcNetworkTypeT;
+
+typedef enum
+{
+ VAL_WMC_RC_SUCCESS = 0,
+ VAL_WMC_RC_BAD_PARAMETER,
+ VAL_WMC_RC_NOT_STARTED,
+ VAL_WMC_RC_BUFFER_TOO_SMALL,
+ VAL_WMC_RC_DEVICE_NOT_AVAILABLE,
+ VAL_WMC_RC_ACTIVATE_FAILED,
+ VAL_WMC_RC_ALREADY_ACTIVATED,
+ VAL_WMC_RC_DEVICE_CONNECTED,
+ VAL_WMC_RC_SERVICE_NOT_AVAILABLE,
+ VAL_WMC_RC_ACTIVATION_INITIATED
+
+}ValWmcResultCodeT;
+
+typedef enum {
+ VAL_WMC_STATE_UNKNOWN,
+ VAL_WMC_STATE_IDLE,
+ VAL_WMC_STATE_CONNECTING,
+ VAL_WMC_STATE_AUTH,
+ VAL_WMC_STATE_CONNECTED,
+ VAL_WMC_STATE_DORMANT,
+ VAL_WMC_STATE_UPDATING_NAM,
+ VAL_WMC_STATE_UPDATING_PRL,
+ VAL_WMC_STATE_DISCONNECTING,
+ VAL_WMC_STATE_ERROR,
+ VAL_WMC_STATE_NUM
+}ValWmcConnStatusT;
+
+typedef enum {
+ WMC_STATE_OTASP_NONE,
+ WMC_OTASP_STATE_IN_PROGRESS,
+ WMC_OTASP_STATE_SPL_UNLOCKED,
+ WMC_OTASP_STATE_NAM_DOWNLOADED,
+ WMC_OTASP_STATE_MDN_DOWNLOADED,
+ WMC_OTASP_STATE_IMSI_DOWNLOADED,
+ WMC_OTASP_STATE_PRL_DOWNLOADED,
+ WMC_OTASP_STATE_COMMIT_SUCCESS,
+ WMC_OTASP_STATE_PROG_SUCCESS,
+ WMC_OTASP_STATE_PROG_FAILED
+}ValWmcOtaspStateT;
+
+typedef struct
+{
+ kal_uint16 Year;
+ kal_uint16 Month;
+ kal_uint16 Day;
+ kal_uint16 Hour;
+ kal_uint16 Minute;
+ kal_uint16 Second;
+ kal_uint16 MillionSeconds;
+ kal_int32 MinutesFromUTC;
+} ValWmcDateTimeT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+} ValDatacardGetNetworkInfoMsgT;
+
+/* Get Network Information response message */
+typedef struct
+{
+ kal_int32 Rssi;
+ ValWmcServiceTypeT CurrentService;
+ ValWmcNetworkTypeT NetworkType;
+ ValWmcDateTimeT NetworkTime;
+ kal_int32 RssiDbm;
+ kal_int32 RssiEvdoDbm;
+ kal_uint32 PrlRoamInd;
+ kal_char RoamingNetwork[VAL_MAX_ROAMING_NETWORK_LEN+1];
+} ValDatacardGetNetworkInfoRspMsgT;
+
+ typedef enum
+ {
+ PHONE_ESN_UIMID,
+ PHONE_ESN_EUIMID,
+ PHONE_MEID_UIMID,
+ PHONE_MEID_EUIMID
+ } ValPhoneIdTypeT;
+
+ typedef struct
+{
+ ValPhoneIdTypeT PhoneIdType;
+ kal_uint32 MeEsn;
+ kal_uint32 UimId;
+ kal_uint8 MeMeid[NAM_MEID_SIZE];
+ kal_uint8 EUimId[NAM_MEID_SIZE];
+ kal_uint32 MePesn;
+ kal_uint32 UimPesn;
+} ValDbmMeidAndUimIdT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+ kal_bool Automatic;
+ kal_char MDN[VAL_MAX_MDN_LEN+1];
+ kal_uint64 MIN;
+ kal_char ActivationCode[VAL_MAX_ACTIVATION_CODE_LEN+1];
+ kal_uint32 HomeSID;
+ kal_bool SetMNHA;
+ kal_uint32 MNHASize;
+ kal_uint8 MNHA[VAL_MAX_MNHA_LEN+1];
+ kal_bool SetMNAAA;
+ kal_uint32 MNAAASize;
+ kal_uint8 MNAAA[VAL_MAX_MNHA_LEN+1];
+} ValDataCardOTAActivateMsgT;
+
+/* OTA-Activate response message */
+typedef struct
+{
+ ValWmcResultCodeT result;
+} ValDatacardOTAActivateRspMsgT;
+
+typedef enum
+{
+ VAL_WMC_MIP_OFF = 0,
+ VAL_WMC_MIP_PREFERRED,
+ VAL_WMC_MIP_ONLY
+} ValWmcMipTypeT;
+
+typedef enum
+{
+ VAL_WMC_PREF_MODE_AUTO = 0,
+ VAL_WMC_PREF_CDMA_ONLY,
+ VAL_WMC_PREF_EVDO_ONLY
+} ValWmcPrefModeT;
+
+typedef struct
+{
+ ValWmcMipTypeT Mip;
+ ValWmcPrefModeT PrefMode;
+ kal_uint16 Accolc;
+} ValWmcMiscParameterT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+ ValWmcMiscParameterT MsgData;
+} ValDataCardSetDevParamMsgT;
+
+/* Set device paramters response message */
+typedef struct
+{
+ ValWmcResultCodeT result;
+} ValDataCardSetDevParamRspMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+} ValDataCardGetDevParamMsgT;
+
+typedef struct
+{
+ ValWmcMiscParameterT MsgData;
+} ValDataCardGetDevParamRspMsgT;
+
+typedef enum
+{
+ /*1xRTT Error Codes*/
+ VAL_WMC_NETWORK_ERROR_1X_START = 0,
+ VAL_WMC_NETWORK_ERROR_1X_CO_NO_SERVICE = VAL_WMC_NETWORK_ERROR_1X_START,
+ VAL_WMC_NETWORK_ERROR_1X_CO_ACCESS_FAILURE,
+ VAL_WMC_NETWORK_ERROR_1X_CO_CANNOT_ORIGINATE,
+ VAL_WMC_NETWORK_ERROR_1X_CO_REDIRECTION,
+ VAL_WMC_NETWORK_ERROR_1X_CO_HANDOFF,
+ VAL_WMC_NETWORK_ERROR_1X_CO_IN_PROGRESS,
+ VAL_WMC_NETWORK_ERROR_1X_CO_PRIORITY_INBOUND,
+ VAL_WMC_NETWORK_ERROR_1X_CO_LOCKED,
+ VAL_WMC_NETWORK_ERROR_1X_CO_INCOMPATIBLE_SERVICES,
+ VAL_WMC_NETWORK_ERROR_1X_CO_CONCURRENT_NOT_SUPPORTED,
+ VAL_WMC_NETWORK_ERROR_1X_CO_NO_RESPONSE,
+ VAL_WMC_NETWORK_ERROR_1X_CO_REJECT,
+ VAL_WMC_NETWORK_ERROR_1X_CO_SO_NOT_SUPPORTED,
+ VAL_WMC_NETWORK_ERROR_1X_CO_CHANNEL_OPEN,
+ VAL_WMC_NETWORK_ERROR_1X_CO_ALERT_STOP,
+ VAL_WMC_NETWORK_ERROR_1X_CO_MAX_ACCESS,
+ VAL_WMC_NETWORK_ERROR_1X_CO_ACTIVATION_NOT_AVAILABLE,
+ VAL_WMC_NETWORK_ERROR_1X_CO_INTERCEPT,
+ VAL_WMC_NETWORK_ERROR_1X_CO_REORDER,
+ VAL_WMC_NETWORK_ERROR_1X_CO_OTHER,
+ VAL_WMC_NETWORK_ERROR_1X_RELEASE_FADE,
+ VAL_WMC_NETWORK_ERROR_1X_RELEASE_NO_REASON,
+ VAL_WMC_NETWORK_ERROR_1X_RELEASE_SO_NOT_SUPPORTED,
+ VAL_WMC_NETWORK_ERROR_1X_PROTOCOL_FAILURE,
+ VAL_WMC_NETWORK_ERROR_1X_REDIRECT_TO_EVDO,
+ VAL_WMC_NETWORK_ERROR_1X_FADE,
+ VAL_WMC_NETWORK_ERROR_1X_USER_DISCONNECTED,
+ VAL_WMC_NETWORK_ERROR_1X_OTASP_ENDED,
+ VAL_WMC_NETWORK_ERROR_1X_ENDED_FOR_VOICE,
+ VAL_WMC_NETWORK_ERROR_1X_E911_CALL_ENDED,
+ VAL_WMC_NETWORK_ERROR_1X_E911_EMERGENCY_CALL,
+ VAL_WMC_NETWORK_ERROR_1X_E911_GPS_FIX,
+ VAL_WMC_NETWORK_ERROR_1X_END,
+
+ /*GSM/WCDMA Error Codes*/
+ VAL_WMC_NETWORK_ERROR_WCDMA_START = 100,
+ VAL_WMC_NETWORK_ERROR_WCDMA_PROTOCOL_FAILURE = VAL_WMC_NETWORK_ERROR_WCDMA_START,
+ VAL_WMC_NETWORK_ERROR_WCDMA_ORIGINATION_FAILURE,
+ VAL_WMC_NETWORK_ERROR_WCDMA_INCOMMING_REJECTED,
+ VAL_WMC_NETWORK_ERROR_WCDMA_NETWORK_DISCONNECTED,
+ VAL_WMC_NETWORK_ERROR_WCDMA_NO_SERVICE,
+ VAL_WMC_NETWORK_ERROR_WCDMA_USER_DISCONNECTED,
+ VAL_WMC_NETWORK_ERROR_WCDMA_END,
+
+ /*1xEV-DO Error Codes*/
+ VAL_WMC_NETWORK_ERROR_EVDO_START = 150,
+ VAL_WMC_NETWORK_ERROR_EVDO_CO_NO_SERVICE = VAL_WMC_NETWORK_ERROR_EVDO_START,
+ VAL_WMC_NETWORK_ERROR_EVDO_CO_ACCESS_FAILURE,
+ VAL_WMC_NETWORK_ERROR_EVDO_CO_REDIRECTION,
+ VAL_WMC_NETWORK_ERROR_EVDO_CO_NOT_PREFERRED,
+ VAL_WMC_NETWORK_ERROR_EVDO_CO_MODE_HANDOFF,
+ VAL_WMC_NETWORK_ERROR_EVDO_CO_IN_PROGRESS,
+ VAL_WMC_NETWORK_ERROR_EVDO_CO_SETUP_TIMEOUT,
+ VAL_WMC_NETWORK_ERROR_EVDO_CO_SESSION_NOT_OPEN,
+ VAL_WMC_NETWORK_ERROR_EVDO_RELEASE_NO_REASON,
+ VAL_WMC_NETWORK_ERROR_EVDO_PROTOCOL_FAILURE,
+ VAL_WMC_NETWORK_ERROR_EVDO_DENY_NO_REASON,
+ VAL_WMC_NETWORK_ERROR_EVDO_DENY_NETWORK_BUSY,
+ VAL_WMC_NETWORK_ERROR_EVDO_DENY_AUTHENTICATION,
+ VAL_WMC_NETWORK_ERROR_EVDO_REDIRECT_TO_1X,
+ VAL_WMC_NETWORK_ERROR_EVDO_FADE,
+ VAL_WMC_NETWORK_ERROR_EVDO_USER_DISCONNECTED,
+ VAL_WMC_NETWORK_ERROR_EVDO_GPS_FIX,
+ VAL_WMC_NETWORK_ERROR_EVDO_END
+} ValWmcNtwkErrCodeT;
+
+typedef struct
+{
+ ValWmcConnStatusT connStatus;
+ ValWmcNtwkErrCodeT DisconnectError;
+ ConnStateT ConnState;
+ ValPswDataTypeT DataType;
+} ValHlpConnStatusMsgT;
+
+typedef struct
+{
+ kal_uint8 SectorId[16];
+ kal_uint32 Latitude;
+ kal_uint32 Longitude;
+ kal_uint8 SubnetMask;
+} ValClcCellInfoMsgT;
+
+typedef struct
+{
+ kal_uint32 uTotalSessionMS;
+ kal_uint32 uActiveSessionMS;
+ kal_uint32 uTotalTxBytes;
+ kal_uint32 uTotalRxBytes;
+ kal_uint32 uPreTotalTxBytes;
+ kal_uint32 uPreTotalRxBytes;
+} ValStatPeekRspMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+} ValDatacardGetConnInfoMsgT;
+
+typedef struct
+{
+ ValWmcConnStatusT connStatus;
+ ValWmcNtwkErrCodeT DisconnectError;
+ ValWmcOtaspStateT otaspState;
+
+ kal_uint32 uTotalSessionMS;
+ kal_uint32 uActiveSessionMS;
+ kal_uint32 uTotalTxBytes;
+ kal_uint32 uTotalRxBytes;
+} ValConnInfoRspMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+ ValWmcNtwkErrCodeT ErrCode;
+} ValDataCardGetNtwkErrStrMsgT;
+
+typedef struct
+{
+ kal_uint8 ErrStr[VAL_MAX_NTWK_ERR_STR_LEN];
+} ValDataCardGetNtwkErrStrRspMsgT;
+
+typedef enum
+{
+ VAL_DO_POWERDOWN,
+ VAL_DO_POWERUP
+} ValPowerupStatusT;
+
+typedef struct
+{
+ ValPowerupStatusT powerup;
+} ValPowerupStatusMsgT;
+
+typedef struct
+{
+ kal_int8 RecId;
+} ValDnsQueryMsgT;
+
+typedef struct
+{
+ kal_uint8 DNSEvent;
+ kal_int16 DNSParam;
+} ValDnsNetMsgT;
+
+typedef enum
+{
+ FACTORY_NOT_PROVISIONED,
+ FACTORY_ALREADY_PROVISIONED
+} DataInitMode;
+
+typedef struct
+{
+ DataInitMode Mode;
+} ValAllDataInitMsgT;
+
+typedef enum
+{
+ /* AT_CARD_NOT_READY = 0,*/
+ /* UIM_STATE_VALID=1,*/
+ AT_UIM_CARD = 1,
+ AT_SIM_CARD = 2,
+ AT_UIM_SIM_CARD = 3,
+ AT_UNKNOWN_CARD = 4,
+ AT_CT_UIM_CARD = 5,
+ AT_CT_UIM_SIM_CARD = 6,
+ AT_NEED_PIN_CARD = 7, /* This card need to input PIN to determin the type */
+ #ifndef MTK_CBP
+ AT_CT_UICC_CARD = 8,
+ AT_NOT_CT_UICC_CARD = 9,
+
+ #else
+ AT_CT_UICC_CARD = 8, /* This enum is no more used, it's split into AT_CT_CSIM_CARD, AT_CT_CSIM_USIM_CARD, AT_CT_CSIM_USIM_ISIM_CARD */
+ AT_NOT_CT_UICC_CARD = 9, /* This enum is no more used, it's split into AT_CSIM_CARD, AT_CSIM_USIM_CARD, AT_CSIM_USIM_ISIM_CARD, AT_USIM_CARD, AT_USIM_ISIM_CARD */
+ AT_CSIM_CARD = 10,
+ AT_CSIM_USIM_CARD = 11,
+ AT_CSIM_USIM_ISIM_CARD = 12,
+ AT_USIM_CARD =13,
+ AT_USIM_ISIM_CARD =14,
+ AT_CT_CSIM_CARD = 15,
+ AT_CT_CSIM_USIM_CARD = 16,
+ AT_CT_CSIM_USIM_ISIM_CARD = 17,
+ #endif
+#ifdef MTK_DEV_C2K_IRAT
+ AT_CARD_LOCKED_CARD = 18,
+ AT_CARD_IVSR_CARD = 19,
+#endif
+
+ AT_UIM_INIT_BUSY = 20,
+ AT_UIM_CARD_TYPE_CHANGE = 21,
+ AT_SIM_SWITCH_NO_RESET = 22,
+
+
+ AT_ROMSIM=240,
+
+ /* NO_UIM_CARD=255*/
+ AT_CARD_NOT_READY = 255
+}ATUimStateT;
+
+typedef enum
+{
+ UIM_STATE_VALID=1,
+ ROMSIM=240,
+ NO_UIM_CARD=255
+}CTATUimStateT;
+
+typedef enum
+{
+ UIM_UPDATE_PHB,
+ UIM_Del_PHB,
+ UIM_UPDATE_SMS,
+ UIM_Del_SMS,
+
+ ME_UPDATE_PHB,
+ ME_Del_PHB,
+ ME_UPDATE_SMS,
+ ME_Del_SMS
+}UimSmsPhbOpT;
+
+typedef struct
+{
+ kal_int16 RxPowerDbmQ6;
+ kal_uint16 RxGainState;
+ kal_int16 DivRxPowerDbmQ6;
+ kal_uint16 DivRxGainState;
+ kal_int16 TxPowerDbmQ6;
+ kal_uint16 TxGainState;
+ kal_int16 TxClosedLoopAdjQ6;
+#ifdef MTK_DEV_C2K_IRAT
+ kal_int16 LastEcIo;
+ kal_int16 StableEcIo;
+ kal_int16 EcIo;
+#endif
+#ifdef MTK_CBP
+ kal_int16 TxAnt;
+#endif
+#if defined (MTK_CBP) && defined (MTK_DEV_C2K_IRAT)
+ kal_uint16 Sinr;
+#endif
+
+} ValUiDoRxTxPowerDataT;
+
+ /*------------------------------------------------------------------------
+ * IOP Mux events
+ *------------------------------------------------------------------------*/
+typedef enum
+{
+ VAL_IOP_MUX_CLOSE_EVENT_ID
+} ValIopMuxEvtT;
+
+typedef struct
+{
+ ValIopMuxEvtT event;
+} ValIopMuxEvtMsgT;
+
+/*------------------------------------------------------------------------
+ * GPS events
+ *------------------------------------------------------------------------*/
+typedef enum
+{
+ GPS_SUCCESS,
+ GPS_FAIL
+}ValGpsStatusT;
+
+typedef enum
+{
+ CP_VAL_GPS_POSITION_UTC_TIME = 0x1,
+ CP_VAL_GPS_POSITION_LATITUDE = 0x2,
+ CP_VAL_GPS_POSITION_LONGITUDE = 0x4,
+ CP_VAL_GPS_POSITION_SPEED = 0x8,
+ CP_VAL_GPS_POSITION_HEADING = 0x10,
+ CP_VAL_GPS_POSITION_MAGNETIC_VARIATION = 0x20,
+ CP_VAL_GPS_POSITION_WRT_SEA_LEVEL = 0x40,
+ CP_VAL_GPS_POSITION_WRT_ELLIPSOID = 0x80,
+ CP_VAL_GPS_POSITION_DILUTION_OF_PRECISION = 0x100,
+ CP_VAL_GPS_POSITION_HORIZONTAL_DILUTION_OF_PRECISION = 0x200,
+ CP_VAL_GPS_POSITION_VERTICAL_DILUTION_OF_PRECISION = 0x400,
+ CP_VAL_GPS_POSITION_VALID_SATELLITE_COUNT = 0x800,
+ CP_VAL_GPS_POSITION_VALID_SATELLITE_USED_PRNS = 0x1000,
+ CP_VAL_GPS_POSITION_VALID_SATELLITE_IN_VIEW = 0x2000,
+ CP_VAL_GPS_POSITION_VALID_SATELLITE_IN_VIEW_PRNS = 0x4000,
+ CP_VAL_GPS_POSITION_VALID_SATELLITE_IN_VIEW_ELEVATION = 0x8000,
+ CP_VAL_GPS_POSITION_VALID_SATELLITE_IN_VIEW_AZIMUTH = 0x10000,
+ CP_VAL_GPS_POSITION_VALID_SATELLITE_IN_VIEW_SIGNAL_TO_NOISE_RATIO = 0x20000,
+ CP_VAL_GPS_POSITION_UNCERTAINTY_ERROR = 0x40000,
+ CP_VAL_GPS_POSITION_FIX_MODE = 0x80000,
+ CP_VAL_GPS_POSITION_FIX_ERROR = 0x100000,
+ CP_VAL_GPS_POSITION_ALL
+}GpsPositionValidityMaskT;
+
+typedef enum
+{
+ GPS_FIX_QUALITY_UNKNOWN, /*Fix uses information from GPS satellites only.*/
+ GPS_FIX_QUALITY_GPS, /*Fix uses information from GPS satellites and also a differential GPS (DGPS) station. */
+ GPS_FIX_QUALITY_DGPS
+}ValGpsFixQualityT;
+
+typedef enum
+{
+ VAL_GPS_FIX_UNKNOWN,
+ VAL_GPS_FIX_2D,
+ VAL_GPS_FIX_3D
+}ValGpsFixTypeT;
+
+typedef enum
+{
+ GPS_FIX_SELECTION_UNKNOWN,
+ GPS_FIX_SELECTION_AUTO,
+ GPS_FIX_SELECTION_MANUAL
+}ValGpsSelectionTypeT;
+
+typedef enum
+{
+ CP_VAL_GPS_FIX_MODE_UNKNOWN,
+ CP_VAL_GPS_FIX_MODE_MSA,
+ CP_VAL_GPS_FIX_MODE_MSB,
+ CP_VAL_GPS_FIX_MODE_MSS,
+ CP_VAL_GPS_FIX_MODE_AFLT,
+ CP_VAL_GPS_FIX_MODE_SPEED_OPTIMAL,
+ CP_VAL_GPS_FIX_MODE_ACCURACY_OPTIMAL,
+ CP_VAL_GPS_FIX_MODE_DATA_OPTIMAL,
+ CP_VAL_GPS_FIX_MODE_CONTROL_PLANE,
+#ifdef MTK_CBP
+ CP_VAL_GPS_FIX_MODE_SUPL_MSA_HYBRID_AGPS,
+ CP_VAL_GPS_FIX_MODE_SUPL_MSA_AFLT_ONLY_AGPS,
+ CP_VAL_GPS_FIX_MODE_SUPL_MSB_AGPS,
+#endif
+ CP_VAL_GPS_FIX_MODE_COUNT /* must be last entry*/
+}ValGpsFixModeT;
+
+typedef enum
+{
+ CP_VAL_GPS_SUCCESS,
+ CP_VAL_GPS_ERROR_INVALID_PARM,
+ CP_VAL_GPS_ERROR_INVALID_SECURITY_STATUS,
+ CP_VAL_GPS_ERROR_LOCATION_REQ_QUEUE_FULL,
+ CP_VAL_GPS_ERROR_PREV_LOCATION_REQ_PENDING,
+ CP_VAL_GPS_ERROR_CP_SESSION_PENDING
+}ValGpsFixOperationStatusT;
+
+
+
+typedef enum
+{
+ CP_VAL_GPS_ASSISTANCE_DATA_ALMANAC,
+ CP_VAL_GPS_ASSISTANCE_DATA_EPHEMERIS,
+ CP_VAL_GPS_ASSISTANCE_DATA_LAST_LOCATION,
+ CP_VAL_GPS_ASSISTANCE_DATA_BASE_STATION_ALMANAC,
+ CP_VAL_GPS_ASSISTANCE_DATA_ALMANAC_CORRECTION,
+ CP_VAL_GPS_ASSISTANCE_DATA_SV_HEALTH_INFO,
+ CP_VAL_GPS_ASSISTANCE_DATA_NAVIGATION_MSG_BITS,
+ CP_VAL_GPS_ASSISTANCE_DATA_ALL_GPS_DATA
+}ValGpsAssistanceDataT;
+
+typedef enum
+{
+ CP_VAL_GPS_DEVICE_HW_STATE = 0x1,
+ CP_VAL_GPS_DEVICE_EPH_SV_MASK = 0x2,
+ CP_VAL_GPS_DEVICE_ALM_SV_MASK = 0x4,
+ CP_VAL_GPS_DEVICE_SAT_IN_VIEW_PRN = 0x8,
+ CP_VAL_GPS_DEVICE_SAT_IN_CARRIER_TO_NOISE_RATIO = 0x10,
+ CP_VAL_GPS_DEVICE_ERROR = 0x20
+} ValGpsDeviceValidityMaskT;
+
+typedef enum
+{
+ CP_VAL_GPS_HW_STATE_UNKNOWN,
+ CP_VAL_GPS_HW_STATE_ON,
+ CP_VAL_GPS_HW_STATE_IDLE
+} ValGpsHwStateT;
+
+typedef enum
+{
+ SESS_CLOSE_NORMAL,
+ TCP_OPEN_FAIL,
+ PPM_PREF_QUAL_TIMER_OUT,
+ SESS_OPEN_ERROR,
+ BS_REJ_ERROR,
+ OUT_REQ_TIMEROUT,
+ ORIG_CANCEL,
+ BS_DISCONN_EV,
+ BS_CLOSE_SESS,
+ MANUAL_BS_ALMANAC_FAIL,
+ SESS_MSS_FALLBACK_EV,
+ MPC_FAIL,
+ NUM_SESS_STATUS
+}SessionStatusE;
+
+/*GPS_OPEN_DEVICE_HW_INIT_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+} ValGpsOpenDeviceHwInitMsgT;
+
+typedef struct
+{
+ ValGpsStatusT Status;
+} ValGpsOpenDeviceHwInitRspMsgT;
+
+/*GPS_CLOSE_DEVICE_ETS */
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+} ValGpsCloseDeviceMsgT;
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ ValGpsStatusT Status;
+} ValGpsCloseDeviceRspMsgT;
+
+/*GPS_POSITION_GET_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+} ValGpsPositionGetMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsPositionGetReqT;
+
+
+
+typedef struct
+{
+ /*; Horizontal position uncertainty in meters of axis aligned with the angle
+ ; specified in dWHorizontalErrorAngle of a two-dimension horizontal error
+ ; ellipse. The value dwHorizontalConfidence gives the percentage of positions
+ ; expected to fall within this ellipse, e.g. dwHorizontalConfidence = 39
+ ; indicates a 1-sigma error ellipse is given.*/
+ kal_uint32 HorizontalErrorAlong;
+ kal_uint32 HorizontalErrorAngle;
+ kal_uint32 HorizontalErrorPerp;
+ kal_uint32 VerticalError;
+ kal_uint32 HorizontalConfidence;
+
+ /*; Horizontal velocity uncertainty in m/s*/
+ kal_uint32 HorizontalVelocityError;
+ /*; Vertical velocity uncertainty in m/s*/
+ kal_uint32 VerticalVelocityError;
+ /*; Horizontal heading uncertainty in degrees*/
+ kal_uint32 HorinzontalHeadingError;
+ /*; Latitude uncertainty*/
+ kal_uint32 LatitudeUncertainty;
+ /*; Longitude Uncertainty*/
+ kal_uint32 LongitudeUncertainty;
+} VALGpsPositionErrorT;
+
+typedef struct
+{
+ kal_uint32 ValidityMask;
+
+ ValGpsSystemTimeT UTCTime;
+
+ kal_int32 Latitude; /*in degrees, positive number indicate north latitude*/
+ kal_int32 Longitude; /*in degrees, positive number indicate east longitude*/
+ double Speed; /*in knots (nautical miles)*/
+ double Heading; /*in degrees, a heading of zero is true north*/
+
+/*the difference between the bearing to true north and the bearing shown on a magnetic compass, positive numbers indicate east*/
+ double MagneticVariation;
+ double AltitudeWRTSeaLevel; /*in meters, with respect to sea level*/
+ double AltitudeWRTEllipsoid; /*in meters, with respect to the WGS84 ellipsoid*/
+
+ ValGpsFixQualityT FixQuality;
+ ValGpsFixTypeT FixType;
+ ValGpsSelectionTypeT SelectionType;
+
+ /*; degree to which the overall position is affected by positional dilution of posisiont (PDOP). PDOP is caused by the location of the satellites providing
+ the GPS fix. Lower number indicates a more accurate position. A value of 1.
+ 0 indeicates the least dilution (highest accuracy), a value of 50 indicates
+ the most dilution (lowest accuracy).*/
+ double PositionDilutionOfPrecision;
+ double HorizontalDilutionOfPrecision;
+ double VerticalDilutionOfPrecision;
+ kal_uint32 SatelliteCount; /*number of satellites used to obtain the position*/
+
+ kal_uint32 SatellitesUsedPRNs[12];
+ kal_uint32 SatellitesInView;
+ kal_uint32 SatellitesInViewPRNs[12];
+ kal_uint32 SatellitesInViewElevation[12];
+ kal_uint32 SatellitesInViewAzimuth[12];
+ kal_uint32 SatellitesInViewSNR[12];
+
+ VALGpsPositionErrorT GPSPositionError;
+
+ ValGpsFixModeT FixMode;
+
+ /*; the number of GPS fixes attempted*/
+ kal_uint32 GPSSessionCount;
+ /*; the number of positions*/
+ kal_uint32 NumberOfPositions;
+ /*; Horizontal velocity in m/s*/
+ kal_uint32 HorizontalVelocity;
+ /* Vertical velocity in m/s*/
+ kal_uint32 VerticalVelocity;
+} ValGpsLocRespMsgT;
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ kal_uint32 InstanceID;
+ ValGpsLocRespMsgT LocResp;
+} ValGpsPositionGetRspMsgT;
+
+/*GPS_OPEN_SESSION_ETS*/
+
+typedef enum
+{
+ VAL_GPS_SESSION_OPEN_SUCCESS,
+ VAL_GPS_SESSION_OPEN_ERROR_SESSION_ALREADY_EXISTS,
+ VAL_GPS_SESSION_OPEN_ERROR_MAX_SESSION_LIMIT_REACHED
+} ValGpsSessionOpenStatusT;
+
+typedef enum
+
+{
+ VAL_USERMODE,
+ Val_TESTMODE,
+ VAL_APMODE
+
+}ValLBS_ModeT;
+
+typedef struct
+{
+ kal_uint8 ResultCode;
+} ValTlsOpenResponseMsgT;
+
+typedef struct
+{
+ kal_uint16 len;
+ kal_uint8 *buf;
+}ValTlsRxIndT;
+
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+} ValGpsSessionOpenMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsSessionOpenReqT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ ValGpsSessionOpenStatusT Status;
+} ValGpsSessionOpenRspMsgT;
+
+/*GPS_START_FIX_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+ kal_uint32 GpsStartFixFlag;
+} ValGpsStartFixMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ kal_uint32 GpsStartFixFlag;
+ kal_uint8 LBSMode;
+} ValGpsStartFixReqT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ ValGpsFixOperationStatusT Status;
+} ValGpsStartFixRspMsgT;
+
+/*GPS_QUERY_FIX_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+} ValGpsQueryFixMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ ValGpsFixOperationStatusT Status;
+} ValGpsQueryFixRspMsgT;
+
+/*GPS_STOP_FIX_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+} ValGpsStopFixMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsStopFixReqT;
+
+typedef struct
+{
+ kal_uint32 action;
+} ValGpsSessionCancelReqT;
+
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ ValGpsFixOperationStatusT Status;
+} ValGpsStopFixRspMsgT;
+
+/*GPS_CONFIG_FIX_MODE_SET_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+ ValGpsFixModeT Mode;
+} ValGpsFixModeConfigMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ ValGpsFixModeT Mode;
+} ValGpsFixModeConfigReqT;
+
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ ValGpsFixOperationStatusT Status;
+} ValGpsFixModeConfigRspMsgT;
+
+/*GPS_CONFIG_FIX_MODE_GET_MSG*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+} ValGpsFixModeGetMsgT;
+
+typedef struct
+{
+ ValGpsFixOperationStatusT Status;
+ ValGpsFixModeT Mode;
+} ValGpsFixModeGetRspMsgT;
+
+/*GPS_CONFIG_FIX_RATE_SET_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+ kal_uint32 NumFixes;
+ kal_uint32 TimeBFixes;
+} ValGpsFixRateConfigMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ kal_uint32 NumFixes;
+ kal_uint32 TimeBFixes; /*in seconds*/
+} ValGpsFixRateConfigReqT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ ValGpsFixOperationStatusT Status;
+} ValGpsFixRateConfigRspMsgT;
+
+/*GPS_CONFIG_QOS_SET_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+ kal_uint32 HorizontalAccuracy;
+ kal_uint32 VerticalAccuracy;
+#ifdef MTK_CBP
+ kal_uint32 PseudorangeAccuracy;
+#endif
+ kal_uint32 Performance;
+} ValGpsQosConfigMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ kal_uint32 HorizontalAccuracy;
+ kal_uint32 VerticalAccuracy;
+ kal_uint32 Performance;
+} ValGpsQosConfigReqT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ ValGpsFixOperationStatusT Status;
+} ValGpsQosConfigRspMsgT;
+
+/*GPS_WRITE_SERVER_CONFIG_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_bool bAddrValid;
+ kal_bool IPType; /*0: IPV4; 1: IPV6*/
+ kal_uint32 Ipv4Addr;
+ kal_uint32 IPv6Addr[4];
+ kal_uint32 PortNum;
+ kal_bool bURLValid;
+ kal_uint8 URLAddr[256];
+} ValGpsWriteServerConfigMsgT;
+
+
+/*GPS_READ_SERVER_CONFIG_ETS*/
+typedef struct
+{
+ kal_bool bAddrValid;
+ kal_bool IPType; /*0: IPV4; 1: IPV6*/
+ kal_uint32 Ipv4Addr;
+ kal_uint32 IPv6Addr[4];
+ kal_uint32 PortNum;
+ kal_bool bURLValid;
+ kal_uint8 URLAddr[256];
+} ValGpsReadServerConfigMsgT;
+
+
+typedef struct
+{
+ kal_bool bAddrValid;
+ kal_bool IPType; /*0: IPV4; 1: IPV6*/
+ kal_uint32 Ip4Addr;
+ kal_uint32 IP6Addr[4];
+ kal_uint32 PortNum;
+ kal_bool bURLValid;
+ kal_uint8 URLAddr[256];
+} ValGpsWriteServerConfigReqT;
+
+typedef struct
+{
+ ValGpsStatusT Status;
+} ValGpsWriteServerConfigRspMsgT;
+
+
+typedef struct
+{
+ kal_uint8 id_s;
+ kal_uint8 pref_resp_qual;
+ kal_uint8 offset_req;
+}VAL_LCS_PPM_REQ_T;
+
+
+/*GPS_ENABLE_SECURITY_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+} ValGpsEnableSecurityMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsEnableSecurityReqT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ ValGpsStatusT Status;
+} ValGpsEnableSecurityRspMsgT;
+
+/*GPS_WRITE_SECURITY_CONFIG_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+ kal_uint8 SecurityDataID;
+ kal_uint8 SecurityDataLen;
+ kal_uint8 SecurityData[20];
+} ValGpsWriteSecurityConfigMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ kal_uint8 SecurityDataID;
+ kal_uint8 SecurityDataLen;
+ kal_uint8 SecurityData[20];
+} ValGpsWriteSecurityConfigReqT;
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ kal_uint32 InstanceID;
+ ValGpsStatusT Status;
+} ValGpsWriteSecurityConfigRspMsgT;
+
+/*GPS_READ_SECURITY_CONFIG_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+} ValGpsReadSecurityConfigMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsReadSecurityConfigReqT;
+
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ kal_uint32 InstanceID;
+ kal_uint32 HashAlgorithm;
+ kal_uint8 SecurityDataID;
+ kal_uint8 SecurityDataLen;
+ kal_uint8 SecurityData[20];
+} ValGpsReadSecurityConfigRspMsgT;
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ ValGpsStatusT Status;
+ kal_uint32 InstanceID;
+ kal_uint32 HashAlgorithm;
+ kal_uint8 SecurityDataID;
+ kal_uint8 SecurityDataLen;
+ kal_uint8 SecurityData[20];
+} ValGpsReadSecurityConfigRspWithStatusMsgT;
+
+/*GPS_READ_ENCRYPT_CONFIG_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+} ValGpsReadEncryptConfigMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsReadEncryptConfigReqT;
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ kal_uint32 InstanceID;
+ kal_uint32 EncryptAlgorithm;
+ ValGpsSystemTimeT UTCTime;
+
+ kal_uint8 EncryptDataLen;
+ kal_uint8 EncryptData[20];
+} ValGpsReadEncryptConfigRspMsgT;
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ ValGpsStatusT Status;
+ kal_uint32 InstanceID;
+ kal_uint32 EncryptAlgorithm;
+ ValGpsSystemTimeT UTCTime;
+ kal_uint8 EncryptDataLen;
+ kal_uint8 EncryptData[20];
+} ValGpsReadEncryptConfigRspWithStatusMsgT;
+
+
+/*GPS_LBS_PRIVACY_SETTING_GET_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+} ValGpsLbsPrivacySettingGetMsgT;
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ ValGpsStatusT Status;
+ ValGpsPrivacySettingT PrivacySetting;
+} ValGpsLbsPrivacySettingGetRspMsgT;
+
+/*GPS_LBS_PRIVACY_SETTING_SET_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint8 privacySetting;
+} ValGpsLbsPrivacySettingsSetMsgT;
+
+typedef struct
+{
+ ValGpsStatusT Status;
+} ValGpsLbsPrivacySettingsSetRspMsgT;
+
+/*GPS_BASESSD_GET_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+} ValGpsBaseSSDGetMsgT;
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ ValGpsStatusT Status;
+ kal_uint32 InstanceID;
+ kal_uint8 BaseSSD[16];
+ ValGpsSystemTimeT UTCTime;
+} ValGpsBaseSSDGetRspMsgT;
+
+/*GPS_BASESSD_SET_MSG*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint8 BaseSSD[16];
+ ValGpsSystemTimeT UTCTime;
+} ValGpsBaseSSDSetMsgT;
+
+typedef struct
+{
+ kal_uint8 BaseSSD[16];
+ ValGpsSystemTimeT UTCTime;
+} ValGpsBaseSSDSetReqT;
+
+typedef struct
+{
+ ValGpsStatusT Status;
+} ValGpsBaseSSDSetRspMsgT;
+
+/*GPS_RAND_PERIOD_SET_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+ kal_uint32 RandPeriod;
+} ValGpsRandPeriodSetMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ kal_uint32 RandPeriod;
+} ValGpsRandPeriodSetReqT;
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ kal_uint32 InstanceID;
+ ValGpsStatusT Status;
+} ValGpsRandPeriodSetRspMsgT;
+
+/*GPS_START_MODE_SET_ETS*/
+
+typedef enum
+{
+ VAL_GPS_START_MODE_HOT=1,
+ VAL_GPS_START_MODE_WARM,
+ VAL_GPS_START_MODE_COLD
+} ValGpsStartMode;
+
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ ValGpsStartMode startMode;
+} ValGpsStartModeSetMsgT;
+
+
+typedef struct
+{
+ ValGpsStartMode startMode;
+} ValGpsStartModeSetReqT;
+
+typedef struct
+{
+ ValGpsStatusT Status;
+} ValGpsStartModeSetRspMsgT;
+
+
+/*GPS_RESET_ASSIST_ETS*/
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ ValGpsAssistanceDataT AssisData;
+} ValGpsResetAssistMsgT;
+
+
+typedef struct
+{
+ ValGpsAssistanceDataT AssisData;
+} ValGpsResetAssistDataReqMsgT;
+
+
+typedef struct
+{
+ MonSysTimeT SysTime;
+ ValGpsStatusT Status;
+} ValGpsResetAssistRspMsgT;
+
+typedef struct
+{
+ kal_bool OnOff; /*0: Off; 1: On*/
+} ValGpsNmeaOuputCfgMsgT;
+
+ /*Val GPS Location Update ETS Spy*/
+typedef struct
+{
+ kal_uint32 InstanceID;
+ kal_uint8 LocationInfoIncl;
+} ValGpsLocationUpdateSpy1MsgT;
+
+ typedef struct
+{
+ kal_uint32 InstanceID;
+ kal_uint8 LocationInfoIncl;
+ ValGpsLocRespMsgT LocResp;
+} ValGpsLocationUpdateSpy2MsgT;
+
+/*Val GPS State Change ETS Spy*/
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsStateChangeSpyMsgT;
+
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint8 Enable; /*0: close;1: open*/
+} ValGpsNmeaOuputSettingsMsgT;
+
+typedef struct
+{
+ ValGpsStatusT Status;
+} ValGpsNmeaOuputSettingsRspMsgT;
+
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+} ValGpsFixRateConfigGetMsgT;
+
+typedef struct
+{
+ ValGpsStatusT Status;
+ kal_uint32 NumFixes;
+ kal_uint32 TimeBFixes;
+} ValGpsFixRateConfigGetRspMsgT;
+
+ #define RXN_PGPS_NUM_SERVERS 3
+
+typedef struct
+{
+
+ kal_uint8 feature_enable;
+ kal_uint8 download_clock_enable;
+ kal_char vendor_id[50+1];
+ kal_char device_id[50+1];
+ kal_char model_id[50+1];
+ kal_char servers[RXN_PGPS_NUM_SERVERS][72];
+ kal_uint16 server_ports[RXN_PGPS_NUM_SERVERS];
+} ValPgpsCfgT;
+
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+} ValGpsSuplCellInfoMsgT;
+
+typedef struct
+{
+ kal_uint16 NID; /* Network ID, Range [0..0xFFFF] */
+ kal_uint16 SID; /* System ID, Range [0..0x7FFF] */
+ kal_uint16 Band; /* Band information; enum SysCdmaBandT */
+ kal_uint16 BaseID; /* Base Station ID and Range [0..0xFFFF] */
+ kal_uint16 RefPN; /* Base Station PN number, Range[0..0x1FF]*/
+ kal_uint32 BaseLat; /* Base Station Latitudue, Range[0..0x3FFFFF] */
+ kal_uint32 BaseLong; /* Base Station Longitude, Range[0..0x7FFFFF] */
+ kal_uint16 GPSWeekNumber; /* GPS Week number, Range[0..0xFFFF] */
+ kal_uint32 GPSSeconds; /* GPS Seconds, Range[0..0x3FFFFF] */
+} ValGpsSuplCDMAInformationT;
+
+typedef struct
+{
+ kal_uint8 SectorID[16]; /* Sector ID, Length 128bits */
+ kal_uint16 Band; /* Band information; enum SysCdmaBandT */
+ kal_uint32 BaseLat; /* Base Station Latitudue, Range[0..0x3FFFFF] */
+ kal_uint32 BaseLong; /* Base Station Longitude, Range[0..0x7FFFFF] */
+ kal_uint16 GPSWeekNumber; /* GPS Week number, Range[0..0xFFFF] */
+ kal_uint32 GPSSeconds; /* GPS Seconds, Range[0..0x3FFFFF] */
+} ValGpsSuplHRPDInformationT;
+
+typedef struct
+{
+ kal_uint8 ValidCellIDInform; /* 0: Not Valid, 1: CDMA, 2: HRPD */
+ ValGpsSuplCDMAInformationT CDMAInfo;
+ ValGpsSuplHRPDInformationT HRPDInfo;
+} ValGpsSuplCellInformationRspMsgT;
+
+#define ValPgpsCfgGetMsgT ValPgpsCfgT
+
+
+/*
+typedef struct
+{
+ kal_uint8 feature_enable;
+ kal_uint8 download_clock_enable;
+ kal_char vendor_id[50];
+ kal_char device_id[50];
+ kal_char model_id[50];
+ kal_char server1[72];
+ kal_char server2[72];
+ kal_char server3[72];
+} ValPgpsCfgGetMsgT;
+
+*/
+
+
+/*Val GPS State Change ETS Spy*/
+typedef struct
+{
+ /* indicate the validity of each field in this record */
+ ValGpsDeviceValidityMaskT ValidityMask;
+ ValGpsHwStateT Status;
+ /*; Ephemeris Satellite Vehicles validaty mask. Each bit indicates the validity
+ ; of the Ephemeris for the associated SV, bit-0 indicates the validity for SV1,
+ ; bit-1 for SV2, ? bit-31 for SV32.*/
+ kal_uint32 EphemerisSVMask;
+ kal_uint32 AlmanacSVMask;
+
+ /*; PRN numbers of the satellites in view of the GPS hardware. The order of
+ ;the elements in the next array, Satellites In View Carrier to Noise Ratio,
+ ;must match the ordering of this list of SV PRNs.*/
+ kal_uint32 SatellitesInViewPRNs[12];
+ kal_uint32 SatellitesInViewCarriertoNoiseRatio[12];
+ kal_uint32 DeviceError;
+} ValGpsStateChangeParamsSpyMsgT;
+
+ /*Val GPS Rand Num1 Update Spy*/
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsRandNum1UpdateSpyMsgT;
+
+typedef struct
+{
+ kal_uint8 *RspData;
+} ValEtsGpsParmSetRspMsgT;
+
+typedef struct
+{
+ kal_uint8 *dataP;
+} ValEtsGpsParmGetRspMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ GPS_FIX_MODE Mode;
+ kal_uint8 Status;
+ kal_uint8 SessStatus;
+} ValPswIs801SessDoneMsgT;
+
+#ifdef MTK_DEV_GPSONE_ON_LTE
+typedef struct
+{
+ kal_uint32 InstanceID;
+ kal_int32 RatMode;
+} ValPswIs801TcpConnReqMsgT;
+#endif
+
+typedef struct
+{
+#ifdef MTK_CBP
+ kal_uint32 InstanceId; /* add for supl, retrieve fix mode by instance id. */
+#endif
+#if defined(MTK_PLT_ON_PC) && defined(MTK_PLT_ON_PC_UT)
+ kal_uint8 data[255];
+#endif
+ kal_uint8 *DataP;
+ kal_uint16 Size;
+
+} ValGpsTcpbSendDataMsgT;
+
+typedef struct
+{
+ kal_uint32 Instance;
+ kal_uint16 TimeRefCDMA;
+#if !(defined(MTK_PLT_ON_PC) && defined(MTK_PLT_ON_PC_UT))
+ double LAT;
+ double LONG;
+#else
+ float LAT;
+ float LONG;
+#endif
+ kal_uint8 LocUncrtnyAng;
+ kal_uint8 LocUncrtnyA;
+ kal_uint8 LocUncrtnyP;
+ kal_uint8 FixType;
+ kal_bool VelocityIncl;
+ kal_uint16 VelocityHor;
+ kal_uint16 Heading;
+ kal_uint8 VelocityVer;
+ kal_bool ClockIncl;
+ kal_uint32 ClockBias;
+ kal_uint16 ClockDrift;
+ kal_bool HeightIncl;
+ kal_uint16 Height;
+ kal_uint8 LocUncrtnyV;
+} ValLocRespDataT;
+
+typedef struct
+{
+ kal_uint32 ValidityMask;
+ ValGpsSystemTimeT UTCTime;
+
+ kal_bool bOldPosDataSaved;
+
+ kal_int32 Latitude; /*in degrees, positive number indicate north latitude*/
+ kal_int32 Longitude; /*in degrees, positive number indicate east longitude*/
+#if !(defined(MTK_PLT_ON_PC) && defined(MTK_PLT_ON_PC_UT))
+ double Speed; /*in knots (nautical miles)*/
+ double Heading; /*in degrees, a heading of zero is true north*/
+
+ double MagneticVariation;
+ double AltitudeWRTSeaLevel; /*in meters, with respect to sea level*/
+ double AltitudeWRTEllipsoid; /*in meters, with respect to the WGS84 ellipsoid*/
+#else
+ float Speed; /*in knots (nautical miles)*/
+ float Heading; /*in degrees, a heading of zero is true north*/
+
+ float MagneticVariation;
+ float AltitudeWRTSeaLevel; /*in meters, with respect to sea level*/
+ float AltitudeWRTEllipsoid; /*in meters, with respect to the WGS84 ellipsoid*/
+#endif
+ ValGpsFixQualityT FixQuality;
+ ValGpsFixTypeT FixType;
+ ValGpsSelectionTypeT SelectionType;
+
+#if !(defined(MTK_PLT_ON_PC) && defined(MTK_PLT_ON_PC_UT))
+ double PositionDilutionOfPrecision;
+ double HorizontalDilutionOfPrecision;
+ double VerticalDilutionOfPrecision;
+#else
+ float PositionDilutionOfPrecision;
+ float HorizontalDilutionOfPrecision;
+ float VerticalDilutionOfPrecision;
+#endif
+ kal_uint32 SatelliteCount; /*number of satellites used to obtain the position*/
+
+ kal_uint32 SatellitesUsedPRNs[12];
+ kal_uint32 SatellitesInView;
+ kal_uint8 totalGsvNum;
+ kal_uint8 seqGsvNum;
+ kal_uint32 SatellitesInViewPRNs[12];
+ kal_uint32 SatellitesInViewElevation[12];
+ kal_uint32 SatellitesInViewAzimuth[12];
+ kal_uint32 SatellitesInViewSNR[12];
+
+ VALGpsPositionErrorT GPSPositionError;
+
+ ValGpsFixModeT FixMode;
+}ValNMEADataT;
+
+typedef struct{
+ kal_uint32 Instance;
+ GPS_FIX_MODE FixMode;
+ union {
+ ValLocRespDataT MsaCPLocRespMsg;
+ PswLocRspDataT MsbMssLocRespMsg;
+ ValNMEADataT MssNmeasStreamMsg;
+ }LocRespDataT;
+}ValLocRespMsgT;
+
+typedef struct{
+ kal_uint32 Instance;
+ GPS_FIX_MODE FixMode;
+ union
+ {
+ ValLocRespDataT MsaCPLocRespMsg;
+ PswLocRspDataT MsbMssLocRespMsg;
+ PswGpsNmeaStreamMsgT MssNmeasStreamMsg;
+ } LocRespDataT;
+}ValPswLocRespMsgT;
+
+typedef struct {
+ kal_uint32 Instance;
+} ValPswSessActiveIndMsgT;
+
+typedef struct {
+ kal_uint32 Instance;
+#ifdef MTK_DEV_GPSONE_ON_LTE
+ kal_int32 RatMode;
+#endif
+} ValPswMpcConnReqMsgT;
+
+typedef struct {
+ kal_uint32 Interval;
+ kal_bool bGPGGA;
+ kal_bool bGPGSV;
+ kal_bool bGPGSA;
+ kal_bool bGPRMC;
+ kal_bool bGPGST;
+ kal_bool bGPGLL;
+ kal_bool bGPVTG;
+} ValNMEACfgSetMsgT;
+
+typedef struct {
+ ExeRspMsgT rspInfo;
+} ValNmeaCfgGetReqMsgT;
+
+typedef struct {
+ kal_uint32 Interval;
+ kal_bool bGPGGA;
+ kal_bool bGPGSV;
+ kal_bool bGPGSA;
+ kal_bool bGPRMC;
+ kal_bool bGPGST;
+ kal_bool bGPGLL;
+ kal_bool bGPVTG;
+} ValNmeaCfgGetRspMsgT;
+
+typedef struct {
+ kal_bool bEncryptDecryptResult;
+} ValSecAesCryptRspMsgT;
+
+typedef struct {
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+ kal_uint8 Mode;
+} ValGpsRestartFixMsgT;
+
+typedef struct {
+ ValGpsStatusT Status;
+} ValGpsRestartFixRspMsgT;
+
+typedef enum
+{
+ VAL_GPS_TECHNOLOGY_CELL_ID_BASED,
+ VAL_GPS_TECHNOLOGY_GPS_BASED,
+ VAL_GPS_TECHNOLOGY_AFLT_BASED,
+ VAL_GPS_TECHNOLOGY_GPS_AND_AFLT_BASED
+}ValGpsSearchTechE;
+
+typedef struct {
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+ ValGpsSearchTechE SearchTech;
+} ValGpsConfigTechMsgT;
+
+typedef struct {
+ kal_uint32 InstanceID;
+ ValGpsStatusT Status;
+} ValGpsConfigTechRspMsgT;
+
+typedef struct {
+ kal_uint32 Instance;
+}ValPswMpcCloseConnMsgT;
+
+
+
+
+typedef struct {
+ ExeRspMsgT rspInfo;
+ /* ; Enable or disable Verizon security call flow*/
+ ValGpsSecOperE Status;
+/*; The Security Code must be correct before the GPS security status can be modified*
+; The Security Code should be the last 4 digits of the MDN in reverse order
+; If the incorrect security code is entered 5 times consecutively then this command should
+; be rejected until the device is re-flashed and the fault cleared*/
+ kal_uint32 SecCode;
+} ValGpsSetSecMsgT;
+
+typedef struct {
+ /* ; Enable or disable Verizon security call flow*/
+ ValGpsSecOperE Status;
+/*; The Security Code must be correct before the GPS security status can be modified*
+; The Security Code should be the last 4 digits of the MDN in reverse order
+; If the incorrect security code is entered 5 times consecutively then this command should
+; be rejected until the device is re-flashed and the fault cleared*/
+ kal_uint32 SecCode;
+} ValGpsSetSecReqT;
+
+typedef enum
+{
+ CP_VAL_GPS_SET_SECURITY_SUCCESS,
+ /*; when security code received does not match current code*/
+ CP_VAL_GPS_SET_SECURITY_INCORRECT_CODE,
+ /*when incorrect security code is received 5 consecutive time
+ it should persist even after a power cycle */
+ CP_VAL_GPS_SET_SECURITY_REJECTED
+}ValGpsSecStatusE;
+
+typedef struct {
+ MonSysTimeT SysTime;
+ ValGpsSecStatusE Status;
+} ValGpsSetSecRspMsgT;
+
+typedef struct {
+ kal_uint32 EphSysTime;
+ kal_uint32 AlmSysTime;
+} ValAlmEphUpdateMsgT;
+
+typedef struct {
+ kal_uint16 T_Dormancy;
+ kal_bool bSaveToDbm;
+} ValCtaUpdateMsgT;
+
+typedef struct {
+ kal_uint8 N_DIGITS;
+ kal_uint8 MDN[OTA_MAX_MDN_DIGITS];
+} ValPswMDNUpdatedMsgT;
+typedef struct {
+ kal_uint32 ESN;
+} ValPswESNUpdatedMsgT;
+
+#define HASH_DATA_NUM 20
+
+typedef struct {
+ kal_uint32 BeginOffset;
+ kal_uint32 EndOffset;
+ kal_uint8 Hash[HASH_DATA_NUM];
+} ValGpsOffsetHashDataT;
+
+typedef struct {
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+ kal_uint32 OffsetsSize;
+ kal_uint8 *pHashData;
+} ValGpsWriteOffsetInfoMsgT;
+
+typedef struct {
+ ExeRspMsgT rspInfo;
+ kal_uint32 InstanceID;
+} ValGpsReadOffsetInfoMsgT;
+
+typedef struct {
+ kal_uint32 InstanceID;
+ ValGpsStatusT State;
+ kal_uint32 OffsetsSize;
+ kal_uint8 *pHashData;
+} ValGpsReadOffsetInfoRspMsgT;
+
+typedef struct {
+ kal_uint32 InstanceID;
+ ValGpsStatusT State;
+} ValGpsWriteOffsetInfoRspMsgT;
+
+typedef struct
+{
+ kal_uint8 SubnetMask;
+ kal_uint8 ColorCode;
+ kal_uint8 SectorID[16];
+ kal_uint8 UserServed;
+ } ValEvdoOvhdInfoT;
+
+#ifdef SYS_OPTION_EVDO
+extern kal_uint8 Rev0RevRate;
+extern kal_uint8 RevPerfStatEnable;
+#endif
+
+typedef struct
+{
+ kal_uint32 SystemTime;
+} ValHrpdSessStartMsg;
+
+/* Get Sprint PCS Mode message */
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+} ValGetAlertStatusMsgT;
+
+typedef struct
+{
+ kal_uint32 TimeId;
+}ValMpcCallbackMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint32 IpAddr;
+ kal_uint16 IpPort;
+} ValGpsCTMpcCfgMsgT;
+
+typedef struct
+{
+ ValGpsStatusT Status;
+} ValGpsCTMpcCfgRspMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ SessionStatusE State;
+} ValGpsSessStatusMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint8 SIP_NAI[72];
+ kal_uint8 SIP_PASSWORD[16];
+} ValGpsCTMpcPasswrdUsernameCfgMsgT;
+
+typedef struct
+{
+ ValGpsStatusT Status;
+} ValGpsCTMpcPasswrdUsernameCfgRspMsgT;
+
+typedef enum
+{
+ MODEM_FAILURE_1x = 0x01,
+ MODEM_FAILURE_DO = 0x02,
+ MODEM_FAILURE = (MODEM_FAILURE_1x | MODEM_FAILURE_DO)
+}ValGeneralModemFailureT;
+
+/*-------------------------------------------------------------------------
+ * Silent Logging message definitions
+ *------------------------------------------------------------------------*/
+#define VAL_SILENT_LOG_FILENAME_LEN 128
+
+typedef enum
+{
+ VAL_SILENT_LOG_CMD_SUCCESS = 0,
+ VAL_SILENT_LOG_FILE_OPEN_ERR,
+ VAL_SILENT_LOG_FILE_WRITE_ERR
+} ValSilentLogStatusT;
+
+/* Silent Log Config Create cmd/resp */
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_char FileName [VAL_SILENT_LOG_FILENAME_LEN];
+} ValSilentLogCfgCreateMsgT;
+
+typedef struct
+{
+ ValSilentLogStatusT Status;
+} ValSilentLogCfgCreateRspMsgT;
+
+/* Set Silent Log Parms cmd/resp:
+ * saves silent logging parameters in flash, takes affect at next power up.
+ */
+#define VAL_COUNT_NO_CHANGE 0xFFFF /* Leave count as is */
+#define VAL_COUNT_FOREVER 0xFFFE /* Count not to decrement, log forever */
+
+typedef enum
+{
+ VAL_PARM_NO_CHANGE,
+ VAL_PARM_DISABLE,
+ VAL_PARM_ENABLE
+} ValParmChgT;
+
+typedef enum
+{
+ LOG_OFF_STATE, /* ETS connected, no more logging until next power up */
+ LOG_INACTIVE_STATE, /* No valid config file or count is zero */
+ LOG_ACTIVE_STATE, /* Logging enabled with valid config file and non-zero count */
+ LOG_PAUSED_STATE /* Logging was ACTIVE but was paused by user */
+} ValSilentLogStateT;
+
+typedef struct
+{
+ kal_uint16 Count; /* Use VAL_COUNT_NO_CHANGE if count to remain as is */
+ ValParmChgT Continuous; /* Use VAL_PARM_NO_CHANGE if value to remain as it */
+ ValParmChgT LogFaults; /* Use VAL_PARM_NO_CHANGE if value to remain as it */
+} ValSilentLogParmsT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ ValSilentLogParmsT Parms;
+ kal_char FileName [VAL_SILENT_LOG_FILENAME_LEN];
+} ValSilentLogSetParmsMsgT;
+
+typedef struct
+{
+ ValSilentLogStatusT Status;
+} ValSilentLogSetParmsRspMsgT;
+
+/* Get Silent Log Get Parms cmd/resp */
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+} ValSilentLogGetParmsMsgT;
+
+typedef struct
+{
+ ValSilentLogStateT CurrState;
+ ValSilentLogParmsT Parms;
+ kal_char FileName [VAL_SILENT_LOG_FILENAME_LEN];
+} ValSilentLogGetParmsRspMsgT;
+
+/* Update Silent Log Parms without affecting Parms file in flash;
+ * logging will start immediately.
+ * More customized logging types can be added as needed.
+ */
+typedef enum
+{
+ VAL_PCM_DATA_LOGGING = 1
+} ValSilentLogTypeT;
+
+typedef struct
+{
+ ValSilentLogTypeT Type;
+ kal_bool ClearActive; /* KAL_TRUE if active spies/traces are to be cleared */
+ ValParmChgT Continuous; /* Use VAL_PARM_NO_CHANGE if value to remain as it */
+ ValParmChgT LogFaults; /* Use VAL_PARM_NO_CHANGE if value to remain as it */
+} ValSilentLogUpdateParmsMsgT;
+
+/* Silent Log Get Data Info cmd/resp */
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+} ValSilentLogGetDataInfoMsgT;
+
+typedef struct
+{
+ kal_uint8 *BufP;
+ kal_uint32 UploadSizeWords;
+ kal_uint32 MaxSizeBytes;
+ kal_uint32 CurrIdx;
+} ValSilentLogGetDataInfoRspMsgT;
+
+/*------------------------------------------------------------------------
+ * GPS on AP message definitions
+ *------------------------------------------------------------------------*/
+
+/* Defalut SVs Number */
+#define MAX_SV_NUM (32) /* It is depend on GPS solution */
+#define MAX_EPH_PRN_NUM (16) /* Maximum PRNs in one Message according to IS-801-1 Spec */
+#define MAX_ALM_PRN_NUM (32) /* Actually it is 64 and current PDE sent 7 PRNs to MS */
+
+typedef enum
+{
+ TOW_AA,
+ TOW_ONLY
+} AssistDataTypeT;
+
+/* Define for ToAP_MSG: VAL_AP_GPS_DEVICE_POWER_ON_REQ_MSG w/ CONFIG MSG */
+typedef struct
+{
+ kal_uint32 InstanceID;
+ GPS_FIX_MODE FixMode; /* Unkown:0, MSA:1, MSB:2, MSS:3, and Control Plane:4 */
+ kal_uint32 FixRateNumFixes; /* A value of 1 means is interested in only one fix, */
+ /* A value > 1,multiple fixes with some time in btw the attempts */
+ kal_uint32 FixRateTimeBeFixes; /* Time, in seconds, btw position fix attempts. */
+ /* A default of 30 seconds is used. */
+ kal_uint32 QoSHAccuracy; /* Horizontal Accuracy, in meters, meaningful for MSB */
+ kal_uint32 QoSVAccuracy; /* Vertical Accuracy, in meters, meaningful for MSB */
+#ifdef MTK_CBP
+ kal_uint32 QoSPRAccuracy; /* Pseudorange Accuracy, in meters, meaningful for MSA */
+#endif
+ kal_uint32 QoSPerformance; /* Performance response quality in terms of time, in seconds, meaningful for MSA & MSB */
+} ValGpsPowerOnMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsFakePowerOnMsgT;
+
+typedef struct
+{
+ kal_uint32 IsActive;
+} ValGpsEmergencyCallIndMsgT;
+
+typedef struct
+{
+
+ kal_uint8 duration;
+}ValGpsFreqAidReqT;
+
+
+
+/* Define for ToAP_MSG: VAL_AP_GPS_FREQUENCY_AIDING_RSP_MSG */
+typedef struct
+{
+ kal_uint32 FrequencyDataType; /* 00: Should not be used, */
+ /* 01: Absolute center freq of the ECLK (Nominal Freq + delta) */
+ /* 02: Delta from the nominal frequency */
+ kal_uint32 AccuracyDataType; /* 00: Should not be used, 01: in units of PPM */
+ /* 02: in units of Hz */
+ kal_uint32 OS_time; /* OS Time [milliseconds] */
+ kal_int32 Cal_ppb; /* Clock Frequency Calibration value [ppb] */
+ double Cal_RMS_ppb; /* Frequency Calibration RMS [ppb] */
+ double Frequency; /* in unit of Hz. ex, 19.6608Mhz => (19.6608 * 1000000)*/
+ double Accuracy;
+} ValGpsFreqAidingMsgT;
+
+/* Define for ToAP_MSG: VAL_AP_GPS_PRECISE_TIME_AIDING_RSP_MSG */
+typedef struct
+{
+ kal_uint8 ValidRefTime; /* Not Available: 0, Available: 1*/
+#if !(defined(MTK_PLT_ON_PC) && defined(MTK_PLT_ON_PC_UT))
+ double TOW; /* GPS Time of Week [seconds] */
+#else
+ float TOW;
+#endif
+ kal_uint16 WeekNum; /* GPS Week Number, */
+ kal_uint32 OS_Time; /* OS Time [milliseconds] */
+ kal_uint32 Absolute_RMS_Acc; /* Absolute Pulse RMS Accuracy [microseconds] */
+ kal_uint32 Relative_RMS_Acc; /* Relative Pulse RMS Accuracy [nanoseconds] */
+} ValGpsFrameSyncMsgT;
+
+/* Define for ToAP_MSG: VAL_AP_GPS_PSEUDORANGE_MSMT_REQ_MSG w/ AA Data */
+typedef struct
+{
+ kal_uint8 SVID;
+ kal_int8 Doppler1; /* Doppler 1st order term Hz/s) */
+ kal_uint8 Dopp_Win; /* Satellite Doppler Uncertainty */
+ kal_uint8 SV_CodePh_int; /* GPS Integer Code Phase since the last GPS bit edge */
+ kal_uint8 GPS_BitNum; /* GPS Bit Number relative to GPS_TOW */
+ kal_uint8 SV_CodePh_Win; /* Code Phase Search Window */
+ kal_uint8 Azimuth; /* Satellite Azimuth degrees */
+ kal_uint8 Elevation; /* Satellite Elevation degrees */
+ kal_uint16 SV_CodePh; /* GPS Code Phase 0..1022 chips */
+ kal_int16 Doppler0; /* Doppler 0th order term ( Hz) */
+} ValGpsAADataT;
+
+typedef struct
+{
+ kal_uint32 AA_Ref_TOW; /* Acq Assist Reference TOW */
+ kal_uint8 AA_Num; /* Num of AA elements */
+ kal_uint8 DopIncl; /* Doppler 0, included or not, 1---doppler 0 included */
+ kal_uint8 AddDopIncl; /* 1 add doppler included1 */
+ kal_uint8 Code_ph_incl; /* 1 Code phase information included */
+ kal_uint8 Az_El_incl; /* 1 Azimuth and elevation angle included.*/
+ ValGpsAADataT AA_Data[MAX_SV_NUM]; /*AA data array */
+} ValGpsAADataMsgT;
+
+typedef struct
+{
+ float Qos;
+} ValGpsQosDataMsgT;
+/* Define for ToCP_MSG: PSEUDORANGE_MSMT RSP MSG w/ Measurement Data */
+typedef struct
+{
+ kal_uint8 SVID; /* Range [1..32] */
+ kal_uint8 SV_CN0; /* Satellite C/N0. */
+ kal_uint8 MultiPath_Ind; /* Pseudorange Multipath Indicator */
+ kal_uint8 PS_Range_RMS_ER; /* Pseudorange RMS Error */
+ kal_int16 PS_Dopp; /* Satellite Doppler */
+ kal_uint16 SV_Code_Ph_Wh; /* Satellite code phase - whole chips */
+ kal_uint16 SV_Code_Ph_Fr; /* SV Code Phase Fractional Chips */
+} ValGpsPRMeasDataT;
+
+typedef struct
+{
+ kal_uint8 prm_valid; /*0--not valid, 1--valid*/
+ kal_uint32 Meas_TOW; /* Measurement GPS Time of Week */
+ kal_uint8 Meas_TOW_Unc; /* Meas GPS Time of Week Uncertainty */
+ kal_uint8 Num_Meas; /* Number of measurement 0-16 */
+ ValGpsPRMeasDataT MeasData[MAX_SV_NUM];
+} ValGpsPRMeasMsgT;
+
+typedef struct
+{
+ kal_uint8 sv_valid; /*0--not valid, 1--valid*/
+} ValGpsSvValidMsgT;
+/* Defined PDE's Location Response Structure for Control Plane. */
+/* Note: For LAT/Long, Just bypass PDE's data to AP, NOT multiple 1M number */
+typedef struct
+{
+ ValGpsSystemTimeT UTCTime; /* Current System Date and Time */
+ double Latitude; /* In units degree, computed (LAT * 180/2^25) degrees */
+ /* Range [-90..+90x(1-2^-24)]degrees */
+ /* positive angles north of the equator and negative angles south of the equator.*/
+ double Longitude; /* In units degrees, computed (LONG * 360/2^26) degrees */
+ /* Range [-180 .. +180x(1-2^-25)] degrees */
+ /* Positive angles east of the Greenwich meridian and negative angles west */
+ float LocUncAng; /* In units degrees, computed (ANG * 5.625) degrees */
+ /* Range [0..84.375] degrees. */
+ float LocUncAx; /* In uints meters, Converted Position Table 4.2.4.2-6 */
+ float LocUncPe; /* In uints meters, Converted Position Table 4.2.4.2-6 */
+ kal_uint8 FixType; /* 0: For 2D Fix, 1: 3D fix */
+ float VelocityHor; /* In units of meter/seconds, computed (VH x 0.25) meter/seconds */
+ /* Range [0..127.75] meter/seconds */
+ float Heading; /* In units degrees, computed (Heading * (360/2^10)) */
+ /* Range [0..360x (1-2^-10)] degrees and a heading of zero is true north*/
+ float VelocityVer; /* In units of meter/seconds, computed (VV x 0.5) meter/seconds */
+ /* Range [-64..+63.5] meter/seconds */
+ kal_int32 Height; /* In units of meter, Binary value of the field conveys the hight plus 500m */
+ float LocUncVe; /* In uints meters, Converted Position Table 4.2.4.2-6 */
+} ValGpsCpLocRespMsgT;
+
+/* This structure is for only ETS's Spy. */
+typedef struct
+{
+ ValGpsSystemTimeT UTCTime; /* Current System Date and Time */
+ double Latitude; /* In units degree, computed (LAT * 180/2^25) degrees */
+ /* Range [-90..+90x(1-2^-24)]degrees */
+ /* positive angles north of the equator and negative angles south of the equator.*/
+ double Longitude; /* In units degrees, computed (LONG * 360/2^26) degrees */
+ /* Range [-180 .. +180x(1-2^-25)] degrees */
+ /* Positive angles east of the Greenwich meridian and negative angles west */
+ double LocUncAng; /* In units degrees, computed (ANG * 5.625) degrees */
+ /* Range [0..84.375] degrees. */
+ double LocUncAx; /* In uints meters, Converted Position Table 4.2.4.2-6 */
+ double LocUncPe; /* In uints meters, Converted Position Table 4.2.4.2-6 */
+ kal_uint8 FixType; /* 0: For 2D Fix, 1: 3D fix */
+ double VelocityHor; /* In units of meter/seconds, computed (VH x 0.25) meter/seconds */
+ /* Range [0..127.75] meter/seconds */
+ double Heading; /* In units degrees, computed (Heading * (360/2^10)) */
+ /* Range [0..360x (1-2^-10)] degrees and a heading of zero is true north*/
+ double VelocityVer; /* In units of meter/seconds, computed (VV x 0.5) meter/seconds */
+ /* Range [-64..+63.5] meter/seconds */
+ kal_int32 Height; /* In units of meter, Binary value of the field conveys the hight plus 500m */
+ double LocUncVe; /* In uints meters, Converted Position Table 4.2.4.2-6 */
+} ValGpsETSCpLocRespMsgT;
+
+/* This structure is for Reference Location Response. */
+typedef struct
+{
+ kal_uint8 ValidRefLoc; /* 0: Not Valid, 1: Valid TimeZone only, 2: Valid Time Zone and BS location */
+ float TimeZoneLat; /* Ex)Default location is Kansas and (39.164253,-94.544503) */
+ float TimeZoneLong; /* FYI, Time Zone Range is [-16h ~ +15.5h] */
+ kal_uint16 SID; /* System ID and Range [0..32767] */
+ kal_uint16 NID; /* Network ID and and Range [0..65535] */
+ kal_uint16 BaseID; /* Base Station ID and Range [0..65535] */
+ float BaseLat; /* WGS84 Geodetic Latitude [degrees],latitude from base last registered on */
+ float BaseLong; /* WGS84 Geodetic Longitude[degrees],Longitude from base last registered on */
+} ValGpsRefLocRespMsgT;
+
+typedef struct
+{
+ kal_uint8 SVID; /* Range [1..32] */
+ kal_int8 Af2; /* Apparent satellite clock correction af2. */
+ kal_uint8 IODE; /* Issue of data */
+ kal_uint16 TOC; /* Clock data reference time. */
+ kal_uint16 TOE; /* ephemeris reference time. */
+ kal_int16 Af1; /* Apparent satellite clock correction af1. */
+ kal_int16 Delta_n ; /* Mean motion difference from the computed value. */
+ kal_int16 IDOT; /* Rate of inclination angle, If negative number and Masked with 0xE000 */
+ kal_int16 C_RS; /* Amplitude of the sine harmonic correction term to the orbit radius */
+ kal_int16 C_RC; /* Amplitude of the cosine harmonic correction term to the orbit radius. */
+ kal_int16 C_US; /* Amplitude of the sine harmonic correction term to the argument of latitude. */
+ kal_int16 C_UC; /* Amplitude of the cosine harmonic correction term to the argument of latitude.*/
+ kal_int16 C_IS; /* Amplitude of the sine harmonic correction term to the angle of inclination. */
+ kal_int16 C_IC; /* Amplitude of the cosine harmonic correction term to the angle of inclination.*/
+ kal_int32 Af0; /* Apparent satellite clock correction af0,If negative number and Masked with 0xFFE00000*/
+ kal_int32 M0; /* Mean anomaly at the reference time. */
+ kal_uint32 A_SQRT; /* Square root of the semi-major axis. */
+ kal_uint32 Eccentricity; /* Eccentricity. */
+ kal_int32 I_angle; /* Inclination angle at the reference time. */
+ kal_int32 Omega_0; /* Longitude of ascending node of orbit plane at weekly epoch. */
+ kal_int32 Omega; /* Argument of perigee. */
+ kal_int32 OmegaDOT; /* Rate of right ascension,If negative number and Masked with 0xFF000000 */
+} ValGpsEphPrnDataT;
+
+typedef struct
+{
+ kal_uint8 TotalPart; /* Range [0.. 31] */
+ kal_uint8 PartNum; /* Range [0..TotalParts] */
+ kal_uint8 NumSV; /* Range [1..32] */
+ ValGpsEphPrnDataT EPHData[MAX_EPH_PRN_NUM]; /* Set Max 16 PRNs, 3 + (57 * 16) = 915 Bytes */
+} ValGpsEphPrnMsgT;
+
+typedef struct
+{
+ kal_uint8 SVID; /* Range [1..32] */
+ kal_int16 Delta_I; /* Correction to inclination. */
+ kal_int16 af0; /* Apparent satellite clock correction af0.If negative number and Masked with 0xF800 */
+ kal_int16 af1; /* Apparent satellite clock correction af1.If negative number and Masked with 0xF800 */
+ kal_int16 OmegaDOT; /* Rate of right ascension. */
+ kal_uint16 Eccentricity; /* Eccentricity. */
+ kal_uint32 A_SQRT; /* Square root of the semi-major axis */
+ kal_int32 Omega_0; /* Longitude of ascending node of orbit plane.If negative number and Masked with 0xFF000000*/
+ kal_int32 Omega; /* Argument of perigee. If negative number and Masked with 0xFF000000 */
+ kal_int32 M0; /* Mean anomaly at reference time.If negative number and Masked with 0xFF000000.*/
+} ValGpsAlmPrnDataT;
+
+typedef struct
+{
+ kal_uint8 TotalPart; /* Range [0.. 31] */
+ kal_uint8 PartNum; /* Range [0..TotalParts]*/
+ kal_uint8 NumSV; /* Range [1..32] */
+ kal_uint8 Week_Num; /* GPS week number. Range [0..255] */
+ kal_uint8 TOA; /* Time of almanac. in units of 4096s and Range [0..602112] */
+ ValGpsAlmPrnDataT ALMData[MAX_ALM_PRN_NUM]; /* Set Max 32 PRNs, 5 + (27 * 32)= 869 bytes */
+} ValGpsAlmPrnMsgT;
+
+typedef struct
+{
+ kal_uint8 AbPar_Incl; /* Inclusion of the alpha and beta parameters. 0 or 1 */
+ kal_int8 Alpha0; /* Ionospheric correction parameter. */
+ kal_int8 Alpha1; /* Ionospheric correction parameter. */
+ kal_int8 Alpha2; /* Ionospheric correction parameter. */
+ kal_int8 Alpha3; /* Ionospheric correction parameter. */
+ kal_int8 Beta0; /* Ionospheric correction parameter. */
+ kal_int8 Beta1; /* Ionospheric correction parameter. */
+ kal_int8 Beta2; /* Ionospheric correction parameter. */
+ kal_int8 Beta3; /* Ionospheric correction parameter. */
+ kal_uint32 Z_Count; /* Z-Count */
+} ValGpsIonMsgT;
+
+/* Decoded PDE's data for AP based on IS-801-1 Spec */
+typedef struct
+{
+ kal_uint8 Velocity_Incl; /* Velocity information included */
+ kal_uint8 Height_Incl; /* 1: include Heigth and Loc_Unc_V */
+ kal_uint8 Clock_incl; /* 1: include Clock Information */
+ kal_uint8 FixType; /* 0: For 2D Fix, 1: 3D fix */
+ kal_int16 Loc_Unc_ang; /* in units Degrees */
+ kal_int32 Clock_bias; /* */
+ kal_int16 Clock_drift; /* */
+ float Latitude; /* in units Degrees north of equator */
+ float Longitude; /* in uints Degrees west of Greenwich meridian */
+ float Loc_Unc_A; /* in units Meters */
+ float Loc_Unc_P; /* in units Meters */
+ float Velocity_Hor; /* Horizontal velocity magnitude. */
+ float Heading; /* */
+ float Height; /* in units Meters */
+ float Vvelocity; /* Vertical velocity. */
+ float Loc_Unc_V; /* Standard deviation of vertical error for position uncertainty */
+} ValGpsLocMsgT;
+
+typedef struct
+{
+ kal_uint8 Ref_Pos_Req; /*1: need assist, 0:doesn't need */
+ kal_uint8 Ion_Req; /*1: need assist, 0:doesn't need */
+ kal_uint8 Alm_Req; /*1: need assist, 0:doesn't need */
+ kal_uint8 Eph_Req; /*1: need assist, 0:doesn't need */
+} ValGpsAssistReqT;
+
+typedef struct
+{
+ kal_uint16 datalen;
+ kal_uint16 chanId; /* IopDataChannel */
+} ValRpcRxMsgHeadT;
+
+typedef struct
+{
+ kal_uint16 datalen;
+ kal_uint16 chanId;
+ kal_uint8 *pMsgData;
+}ValRpcRxMsgT;
+typedef struct
+{
+ kal_uint16 PilotPN;
+ /* PILOT_PN_PHASE sent in PROVIDE PILOT PHASE MEASUREMENTS */
+ kal_int32 PnPhase;
+ /* PILOT_STRENGTH sent in PROVIDE PILOT PHASE MEASUREMENTS */
+ kal_uint16 Strength;
+ /* RMS_ERR_PHASE sent in PROVIDE PILOT PHASE MEASUREMENTS */
+ kal_uint8 RmsErrPhase;
+} ValAfltPilotMeasurementT;
+
+typedef struct
+{
+ kal_uint8 SeqNum;
+ /* TIME_REF_MS sent in PROVIDE PILOT PHASE MEASUREMENTS */
+ kal_uint16 TimeRefMs;
+ kal_bool OffsetIncl;
+ kal_int16 MobOffset;
+ /* REF_PN sent in PROVIDE PILOT PHASE MEASUREMENTS */
+ kal_uint16 RefPN;
+ /* REF_PILOT_STRENGTH sent in PROVIDE PILOT PHASE MEASUREMENTS */
+ kal_uint16 RefPilotStrength;
+
+ kal_uint8 BAND_CLASS;
+ kal_uint16 CDMA_FREQ;
+ kal_uint16 BASE_ID;
+ kal_uint16 SID;
+ kal_uint16 NID;
+ kal_uint16 TOTAL_RX_PWR;
+
+ /* NUM_PILOTS_P sent in PROVIDE PILOT PHASE MEASUREMENTS */
+ /* actual number of pilot measurements in AFLTPilotMeasurement */
+ kal_uint8 NumPilots;
+ ValAfltPilotMeasurementT PosAFLT[SYS_CP_MAX_AFLT_LIST_PILOTS];
+} ValPswPosAfltMeasurementMsgT;
+
+
+typedef enum
+{
+ UNKOWN_MODE,
+ NORMAL_GPS_MODE,
+ VGTT,
+ THIRD_PARTY_LBS,
+ AT_GPS
+}ValGpsModeT;
+
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint8 Mode;
+} ValGpsTestModeSetT;
+
+typedef struct
+{
+ ValGpsFixOperationStatusT Status;
+} ValGpsTestModeSetRspMsgT;
+
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint8 Band;
+ kal_int32 RFDelay1X;
+ kal_int32 RFDelayDO;
+
+} ValGpsRfDelayMsgT;
+
+typedef struct
+{
+ ValGpsStatusT Status;
+ kal_uint8 Band;
+ kal_int32 RFDelay1X;
+ kal_int32 RFDelayDO;
+} ValGpsRfDelayRspMsgT;
+
+#ifdef MTK_PLT_ON_PC
+typedef struct
+{
+ sbp_id_enum sbp_id;
+ sbp_md_feature_enum feature;
+} ValConfigSbpInfoMsgT;
+#endif
+
+typedef enum
+{
+ BYPASS_USER_VERIFICATION,
+ WAIT_USER_VERIFICATION,
+ NOTIFY_USER_BYPASS_VERFICATION
+}ValMpcNotifIndE;
+
+typedef enum
+{
+ START_IS801_SESSION,
+ SID_NID_RETURN,
+ CACHED_POS_USED,
+ RESERVE_POS_TECH_IND
+}ValMpcPostionTechIndE;
+
+typedef enum
+{
+ VAL_MPC_MSA,
+ VAL_MPC_MSB,
+ VAL_MPC_MSA_PREFED_MSB_ALLOWD,
+ VAL_MPC_MSB_PREFED_MSA_ALLOWD,
+ VAL_MPC_MODE_RESERVE
+}ValMpcIs801ModeE;
+
+typedef struct
+{
+ kal_uint8 Length;
+ ValMpcNotifIndE NotificationAndVerificationInd;
+ ValMpcPostionTechIndE PositionTechInd;
+ kal_uint8 PositionQosInc;
+ kal_uint8 PositionQos;
+ kal_uint16 NumOfFixes;
+ kal_uint16 TimeBtwFixes;
+ ValMpcIs801ModeE Is801PositionMode;
+ kal_uint8 CorrelationId;
+ kal_uint8 RequestIDEnc;
+ kal_uint8 RequestIDLen;
+ kal_char RequestID[256];
+}ValMpcPositionRequestMsgT;
+
+typedef struct
+{
+ kal_uint8 Length;
+ ValMpcNotifIndE NotificationAndVerificationInd;
+ ValMpcPostionTechIndE PositionTechInd;
+
+ kal_uint8 PositionQosInc;
+ kal_uint8 PositionQos;
+ kal_uint16 NumOfFixes;
+ kal_uint16 TimeBtwFixes;
+ ValMpcIs801ModeE Is801PositionMode;
+ kal_uint8 CorrelationId;
+ kal_char action; /* 0: agree; 1 cancel; 2 timeout */
+}ValMpcPositionRequestParaRespT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsStopAckMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+} ValGpsStopReqMsgT;
+
+typedef struct
+{
+ kal_uint32 InstanceID;
+ kal_uint8 Status;
+} ValGpsCancelIndMsgT;
+
+typedef struct
+{
+ kal_uint32 sess_id;
+ kal_uint8 Length;
+ ValMpcNotifIndE NotificationAndVerificationInd;
+ ValMpcPostionTechIndE PositionTechInd;
+
+ kal_uint8 PositionQosInc;
+ kal_uint8 PositionQos;
+ kal_uint16 NumOfFixes;
+ kal_uint16 TimeBtwFixes;
+ ValMpcIs801ModeE Is801PositionMode;
+ kal_uint8 CorrelationId;
+ kal_char action; /* 0: agree; 1 cancel; 2 timeout */
+}ValIPCMpcPositionRequestParaRespT;
+
+void ValMpc3rdPartyParamStore(ValMpcPositionRequestParaRespT *Resp, kal_uint32 Inst);
+void ValMpcUserCancelLbs(kal_uint8 CorrelationId);
+
+typedef struct
+{
+ kal_uint32 TimerId;
+}ValCpSmsRegTimerExpiredMsgT;
+
+typedef enum
+{
+ PowerUpReg,
+ MoSmsReg,
+ MoVoiceReg,
+ MtSmsReg,
+ MtVoiceReg,
+ MoDataReg,
+ NwInitReg,
+ UtkMenuSelReg,
+ UtkMenuMeidReg,
+ NUM_MAX_REGTYPE
+}ValSmsAutoRegTypeT;
+
+typedef struct
+{
+ ValSmsAutoRegTypeT Trigger;
+
+}ValCpSmsRegTriggerReqMsgT;
+ /*------------------------------------------------------------------------
+ * NST List Mode prototypes
+ *------------------------------------------------------------------------*/
+
+
+typedef struct
+{
+ kal_uint16 len;
+ kal_uint8 *data;
+} ValCsfbGcsnaULMsgT;
+
+#ifdef MTK_DEV_C2K_IRAT
+typedef struct
+{
+ IratSIB8MeasResultDataT rsp;
+
+} ValCsfbMeasRspMsgT;
+
+#define MAX_EUTRA_FREQS_NUM 8
+
+typedef struct
+{
+ kal_uint8 NumEUTRAFrequencies;
+ kal_uint16 EARFCN[MAX_EUTRA_FREQS_NUM];
+} ValClcNbrFreqsRptMsgT;
+
+typedef struct
+{
+ kal_bool isUatiUpdated;
+ kal_bool isColorCodeUpdated;
+} ValClcDoParaChangedIndMsgT;
+
+typedef struct
+{
+ kal_uint8 EfunState;
+} ValEfunStateIndMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_uint8 src_id;
+ c2k_1x_loop_back_call_mode_enum operation_mode;
+} PACKED_POSTFIX ValMd11xLoopBackCallReqMsgT;
+
+typedef struct
+{
+ ValIratModemStatusT MdStatus;
+ uim_access_option_enum UimAccessOption;
+} ValUimEmdstatusUpdateIndMsgT;
+
+typedef struct
+{
+ kal_uint8 cardEsnMeOld[8];
+ kal_uint8 cardEsnMeNew[8];
+} ValUimPreStoredCardEsnmeIndMsgT;
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+typedef struct
+{
+ kal_uint16 status_word;
+} UimApduStatusWordNotifyMsgT;
+
+typedef struct {
+ kal_uint8 action_type;
+ kal_uint8 refresh_type;
+} UimRefreshNotiIndMsgT;
+
+typedef struct {
+ kal_uint8 refresh_type;
+}UimRefreshIndMsgT;
+#endif
+
+typedef struct
+{
+ ValEmdstatusFlowVersionT EmdstatusFlowVersion;
+} ValEmdstatusFlowVersionIndMsgT;
+typedef struct
+{
+ kal_uint8 is_ims_registred;
+} ValImsRegStatusUpdateIndMsgT;
+
+#endif /* MTK_DEV_C2K_IRAT */
+
+typedef struct
+{
+ kal_uint16 len;
+ kal_uint8 *data;
+} ValCsfbHoPrepXferMsgT;
+
+typedef enum
+{
+ VAL_IRAT1X_CSFB_PARM_RSP_ACK,
+ VAL_IRAT1X_CSFB_SIB8_PARM_ACK,
+ VAL_IRAT1X_CSFB_GCSNA_DL_ACK,
+ VAL_IRAT1X_CSFB_MEAS_REQ_ACK,
+ VAL_IRAT1X_CSFB_CONN_REL_ACK,
+ VAL_IRAT1X_CSFB_HO_EUTRA_PREP_ACK,
+ VAL_IRAT1X_CSFB_MOB_FROM_EUTRA_ACK,
+
+ VAL_IRAT1X_EVENT_MAX
+} ValIrat1xCsfbEventIdT;
+
+typedef struct
+{
+ ValIrat1xCsfbEventIdT event;
+} ValCsfbEventMsgT;
+
+#ifdef MTK_PLT_ON_PC
+#define MAX_IP_TEST_DATA_LEN (AT_MAX_AT_CMD_LEN)
+
+typedef struct
+{
+ kal_uint16 size;
+ /* the 1st byte in data is Iopchannel */
+ kal_uint8 data[MAX_IP_TEST_DATA_LEN];
+} ValIpDataSendReqMsgT;
+
+typedef struct
+{
+ kal_uint16 status;
+ kal_uint16 len;
+} ValIpDataSendCnfMsgT;
+
+typedef struct
+{
+ kal_uint8 *data;
+ kal_uint16 size;
+} ValIpDataRecvIndMsgT;
+
+typedef struct
+{
+ kal_uint32 SrcAddr;
+ kal_uint32 DstAddress;
+ kal_uint8 Data[MAX_IP_TEST_DATA_LEN]; /* point to the first byte of data. */
+ kal_uint16 Size; /* The size of data in byte. */
+} HlpIpDataSendReqMsgT;
+#endif /* MTK_PLT_ON_PC */
+
+typedef enum
+{
+ VAL_CSS_CS_REG_IND_IRAT_1X_REG_DISABLED, /* Global Irat1XRegEnabled changed to FALSE */
+ VAL_CSS_CS_REG_IND_IRAT_1X_REG_ENABLED, /* Global Irat1XRegEnabled changed to TRUE */
+ VAL_CSS_CS_REG_IND_1X_IN_SERVICE, /* 1x changed to in service */
+ VAL_CSS_CS_REG_IND_1X_NO_SERVICE, /* 1x changed to no service */
+ VAL_CSS_CS_REG_IND_MAX,
+} ValCssCsRegNotifyIndT;
+
+/* VAL_CSS_CS_REG_STATUS_NOTIFY_IND_MSG */
+typedef struct
+{
+ ValCssCsRegNotifyIndT csRegIndType;
+} ValCssCsRegStatusNotifyIndMsgT;
+
+
+#ifdef MTK_CBP //MTK_DEV_C2K_IRAT
+typedef struct
+{
+ HlpValPcmtModeT mode;
+ kal_bool result;
+ kal_uint32 pcmtEhrpdValue;
+ kal_uint32 pcmtIratValue;
+} ValHlpPcmtParaRspMsgT;
+
+typedef enum
+{
+ VAL_EHRPD_OFF = 0,
+ VAL_EHRPD_ON,
+ VAL_EHRPD_MODE_NUM
+}ValEhrpdModeE;
+#endif
+#ifdef MTK_DEV_ENGINEER_MODE
+typedef enum
+{
+ RF_TST_STOP_TRANSMIT = 0,
+ RF_TST_START_TRANSMIT = 1
+}RfTstControlActionT;
+
+typedef enum
+{
+ RF_TST_BAND_CLASS_0 = 0,
+ RF_TST_BAND_CLASS_1 = 1,
+ RF_TST_BAND_CLASS_2 = 2,
+ RF_TST_BAND_CLASS_3 = 3,
+ RF_TST_BAND_CLASS_4 = 4,
+ RF_TST_BAND_CLASS_5 = 5,
+ RF_TST_BAND_CLASS_6 = 6,
+ RF_TST_BAND_CLASS_7 = 7,
+ RF_TST_BAND_CLASS_8 = 8,
+ RF_TST_BAND_CLASS_9 = 9,
+ RF_TST_BAND_CLASS_10 = 10,
+ RF_TST_BAND_CLASS_11 = 11,
+ RF_TST_BAND_CLASS_12 = 12,
+ RF_TST_BAND_CLASS_13 = 13,
+ RF_TST_BAND_CLASS_14 = 14,
+ RF_TST_BAND_CLASS_15 = 15
+}RfTstControlBandT;
+
+typedef enum
+{
+ RF_TST_1XRTT = 0,
+ RF_TST_EVDO = 1,
+ RF_TST_NONE
+}RfTstControlModulationT;
+
+typedef enum
+{
+ ECTM_MODE_NONE = 0,
+ ECTM_MODE_SPIRENT = 1
+}EctmMode;
+
+typedef enum
+{
+ VAL_DISABLE_FORCE_TX_ANTENNA = 0,
+ VAL_ENABLE_FORCE_TX_ANTENNA,
+ VAL_FORCE_TX_ANTENNA_INVALID_MODE = 255
+}ValForceTxAntModeT;
+
+#ifdef MTK_DEV_C2K_IRAT
+typedef enum
+{
+ ECLSC_ENABLE_MODE = 0,
+ ECLSC_DISABLE_MODE = 1
+}EclscMode;
+#endif
+
+/* move here to pass intercross header file invoke which is really bad... */
+typedef struct
+ {
+ RfTstControlActionT Action;
+ kal_uint16 Channel;
+ RfTstControlBandT Band;
+ kal_int16 PowerLevel;
+ } RcpRfTstPowerControlMsgT;
+#endif
+
+#ifdef MTK_DEV_GPSONE_ON_LTE
+typedef enum gps_rpc_rat_mode_t {
+ GPSRPC_RAT_C2K = 0,
+ GPSRPC_RAT_LTE = 1,
+ GPSRPC_RAT_MODE_UNKNOWN = 2
+}gps_rpc_rat_mode_t;
+
+typedef enum
+{
+ STATUS_IE_SOCKET_FAILED = 7, /* Socket created failed or connection failed*/
+ STATUS_IE_CLOSEPENDINGWAIT = 6, /* TCP close by peers, wait for user */
+ STATUS_IE_CLOSEPENDING = 5, /* TCP graceful close in progress */
+ STATUS_IE_RECVMOREDATA = 4, /* more UDP or raw IP data */
+ STATUS_IE_NODATA = 3, /* no data available for receive */
+ STATUS_IE_CONNECTPENDING = 2, /* TCP connect attempt in progress */
+ STATUS_IE_LISTENPENDING = 1, /* listening for remote connect */
+ STATUS_IE_SUCCESS = 0, /* request successful */
+ STATUS_IE_INVALIDRQST = -1, /* invalid or unknown request */
+ STATUS_IE_INVALIDSAP = -2, /* invalid service access point */
+ STATUS_IE_INVALIDPORT = -4, /* invalid listen or connect port */
+ STATUS_IE_INVALIDADDR = -5, /* invalid connect host address */
+ STATUS_IE_NOMOREMBUFS = -6, /* no mbufs available */
+ STATUS_IE_NOMORETCBS = -7, /* no tcbs available */
+ STATUS_IE_NOLOCALADDR = -8, /* local host address not set */
+ STATUS_IE_INVALIDSIZE = -9, /* invalid send or receive size */
+ STATUS_IE_INVALIDDATA = -10, /* invalid request field */
+ STATUS_IE_INVALIDOPT = -11, /* option incorrectly specified */
+ STATUS_IE_INVALIDFLAGS = -12, /* invalid send/sento flags */
+ STATUS_IE_INVALIDSTATE = -13, /* invalid TCP state */
+ STATUS_IE_TCP_TIME_OUT = -14, /* TCP connecting time out */
+ STATUS_IE_TCP_RESET = -15, /* TCP reset by remote */
+ STATUS_IE_TCP_ABORT = -16, /* TCP reset by local */
+ STATUS_IE_TCP_DISCNT_NORMAL = -17 /* TCP Disconnect normal */
+} GpsSocketStatusT;
+
+#define MAX_TCP_DATA_SIZE (1500/4)
+
+typedef enum{
+ service_tcp = 0,
+ service_udp = 1,
+ service_unknown = 2,
+ service_type_max = 0x10000000
+}SocketServiceType;
+typedef struct
+{
+ kal_uint32 IpAddress; /* 32-bit IP address. */
+ kal_uint16 PortNumber; /* UDP port number. */
+} ValSocketAddrT;
+
+typedef struct
+{
+ kal_int16 SocketId;/* input socket Id, will be used in the response message */
+ SocketServiceType TcpType;
+ ValSocketAddrT DestAddr;
+}GpsSocketCreateMsgT;
+
+
+typedef struct
+{
+ kal_int32 SocketHandle;
+ kal_uint16 Size;
+ //kal_uint8 *DataP;
+ kal_uint32 Data[MAX_TCP_DATA_SIZE];
+}GpsTcpbSendDataMsgT;
+
+
+
+
+typedef struct
+{
+ kal_int32 SocketHandle;
+ GpsSocketStatusT Status;
+} GpsTcpbRecvRspMsgT;
+typedef struct
+{
+ kal_int32 SocketHandle;
+ kal_bool Graceful;
+}GpsSocketCloseMsgT;
+
+
+
+
+#endif
+#ifdef MTK_DEV_C2K_IRAT
+typedef struct
+{
+ kal_uint32 Id;
+}ValUtkTimerExpiryMsgT;
+#endif
+#ifdef MTK_CBP
+typedef enum
+{
+ ENWINFO_CALL_DROP = 402,
+ ENWINFO_SMS_FAIL = 403
+}EnwinfoEventE;
+
+typedef enum
+{
+ EVOCD_VOICE_SPEECH_CODEC_NONE_V02 = 0,
+ EVODE_VOICE_SPEECH_CODEC_QCELP13K_V02 = 1,
+ EVODE_VOICE_SPEECH_CODEC_EVRC_V02 = 2,
+ EVODE_VOICE_SPEECH_CODEC_EVRC_B_V02 = 3,
+ EVODE_VOICE_SPEECH_CODEC_EVRC_WB_V02 = 4,
+ EVODE_VOICE_SPEECH_CODEC_EVRC_NW_V02 = 5,
+ EVODE_VOICE_SPEECH_CODEC_AMR_NB_V02 = 6,
+ EVODE_VOICE_SPEECH_CODEC_AMR_WB_V02 = 7,
+ EVODE_VOICE_SPEECH_CODEC_GSM_EFR_V02 = 8,
+ EVODE_VOICE_SPEECH_CODEC_GSM_FR_V02 = 9,
+ EVODE_VOICE_SPEECH_CODEC_GSM_HR_V02 = 10,
+ EVODE_VOICE_SPEECH_CODEC_INVALID
+}EvocdCodec;
+
+typedef struct
+{
+ kal_uint16 Mcc;
+ kal_uint16 SidMin;
+ kal_uint16 SidMax;
+}MccSidT;
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+typedef enum
+{
+ VAL_CARRIER_TEST, /* Test */
+ VAL_CARRIER_SKT, /* KOREA SKT */
+ VAL_CARRIER_KTF, /* KOREA KTF */
+ VAL_CARRIER_LGT, /* KOREA LGT */
+ VAL_CARRIER_VERIZON, /* US VERIZON */
+ VAL_CARRIER_SPRINT, /* US SPRINT */
+ VAL_CARRIER_ALLTEL, /* US ALLTEL */
+ VAL_CARRIER_METRO_PCS, /* US METRO_PCS */
+ VAL_CARRIER_US_CELLULAR, /* US CELLULAR */
+ VAL_CARRIER_CRIKET, /* US CRIKET */
+ VAL_CARRIER_TELUS, /* CANADA TELUS */
+ VAL_CARRIER_BMC, /* CANADA BMC */
+ VAL_CARRIER_BWA, /* CANADA BWA */
+ VAL_CARRIER_CTC, /* CHINA CTC */
+ VAL_CARRIER_INVALID
+}ValCarrierIdEnumT;
+
+typedef struct
+{
+ kal_uint16 Mcc;
+ kal_uint16 MncMin;
+ kal_uint16 MncMax;
+ ValCarrierIdEnumT Carrier;
+}MccMncCarrierIdT;
+#endif
+
+#ifdef MTK_GPS_SYNC_DEV
+typedef struct
+{
+ double TOW;
+ kal_uint16 WeekNum;
+ kal_uint8 FreqBiasValid;
+ kal_int32 FreqBias;
+}ValGpsTimeIndMsgT;
+#endif
+
+typedef struct
+{
+ kal_bool DomDataRoaming_enabled; /* true means enable data roaming, attach */
+ kal_bool IntlDataRoaming_enabled;
+}ValDataRoamingChgMsgT;
+
+typedef enum
+{
+ RF_OFF_NOT_RECEIVED = 0,
+ RF_OFF_RECEIVED_HANDLING = 1,
+ RF_OFF_RECEIVED_SUSPEND = 2,
+ RF_OFF_RECEIVED_OFFDONE = 3,
+}C2kRfOffT;
+typedef enum
+{
+ VAL_GPS_SESS_INIT_STATE,
+ VAL_GPS_SESS_LBS_HASH_STATE,
+ VAL_GPS_SESS_SEC_REG_STATE,
+ VAL_GPS_SESS_IDLE_STATE,
+ VAL_GPS_SESS_IDLE_SSD_AUTH_CHAN_STATE,
+ VAL_GPS_MPC_OPENNING_STATE,
+ VAL_GPS_SESS_SUSPEND_STATE,
+ VAL_GPS_SESS_OPEN_STATE,
+ VAL_GPS_SESS_OPEN_SDD_AUTH_CHAN_STATE,
+ VAL_GPS_SESS_OPEN_MSB_MPC_OPENNING_STATE,
+ VAL_GPS_SESS_STATE_NUM
+} ValGpsSessStateT;
+typedef enum
+{
+ RAND_PERIOD_EXP,
+ LOC_REQ,
+} ValGpsAuthChallResultT;
+typedef struct {
+ kal_uint8 SecDataId;
+ kal_uint8 SecDataLen;
+ kal_uint8 SecData[GPS_MAX_SECURITY_DATA]; /*Rand1*/
+} GPS_Security;
+typedef struct {
+ kal_uint32 EncryptAlg; /*GPS_ENCRYPT_AES_128_LAT_LONG*/
+ ValGpsSystemTimeT UTCTime;
+ kal_uint8 EncDataLen;
+ kal_uint8 EncData[GPS_MAX_SECURITY_DATA];
+ kal_uint8 AesKey[GPS_MAX_SECURITY_DATA];
+} GPS_Encrypt; /*Rand2*/
+
+typedef enum
+{
+ VAL_GPS_MSS_IDLE,
+ VAL_GPS_MSS_STARTED,
+ VAL_GPS_MSS_DONE
+} ValGpsMssStateT;
+
+typedef enum
+{
+ VAL_GPS_INACTIVE,
+ VAL_GPS_OPENNING,
+ VAL_GPS_OPEN
+}ValSessBlkStateE;
+
+
+typedef struct ValGpsSessCtlBlkT
+{
+ kal_uint32 InstanceID;
+
+ ValGpsFixModeT FixMode;
+ kal_uint32 NumFixes;
+ kal_uint32 TimeBFixes;
+
+ kal_uint32 HorizontalAccuracy;
+ kal_uint32 VerticalAccuracy;
+#ifdef MTK_CBP
+ kal_uint32 PseudorangeAccuracy;
+ kal_bool OnCTNtwk;
+ ValGpsSecOperE SecOp;
+#ifdef MTK_DEV_GPSONE_ON_LTE
+ kal_int32 RatMode;
+#endif
+#endif
+ kal_uint32 Performance;
+
+ ValGpsSessStateT GpsSessState;
+
+ kal_timerid GpsRand1TimerCb;
+ kal_uint32 RandPeriod;
+ ValGpsAuthChallResultT AuthResult;
+
+ GPS_Security GpsSecurity;
+ GPS_Encrypt GpsEncrypt;
+
+ ValGpsMssStateT MssState;
+ kal_uint8 MssDataRcvFlag;
+ kal_bool bDataReadReady;
+ ValLocRespMsgT LocRespData;
+ kal_uint8 LocEncryPhase;
+ ValGpsSystemTimeT UTCTime;
+
+ kal_uint16 NmeaSpyFlag;
+ kal_uint32 NumberOfPositions;
+
+ ValGpsReadOffsetInfoMsgT ReadOffsetInfoMsg;
+ kal_bool bReadOffsetInfoPending;
+
+ SessionStatusE State;
+ ValSessBlkStateE Lbsstate;
+
+ kal_uint8 UserId; /*0: default; 1: RPC; 2: AT; 3: VGTT: 4: 3rd party; 5: exception*/
+ kal_uint8 CancelId;
+
+#if ((defined SYS_OPTION_RPC) && (defined SYS_OPTION_GPS_RPC))
+ kal_bool bAPInit;
+#endif
+ kal_uint8 StopReason;
+} ValGpsSessCtlBlkT;
+
+extern ValGpsSessCtlBlkT* ValGpsGetFreeSessCtlBlk(kal_uint32 InstanceID);
+#endif
+
+#ifdef MTK_CBP /*for mode switch optimization*/
+typedef struct
+{
+ LOCAL_PARA_HDR
+ OperationModeT OpMode;
+ kal_bool Is1XPowerOn;
+ kal_bool IsDOPowerOn;
+}ValRatModeChgCnfMsgT;
+#endif
+#ifdef __TC10_IPC_CDMA_SUPPORT__
+/* VAL_SMS_POWER_STATUS_MSG */
+typedef struct
+{
+ kal_bool PowerUp;
+} ValSmsPowerStatusMsgT;
+#endif
+typedef enum
+{
+ POSITIONING_REQUEST_ID=1,
+ CANCEL_NI_TRACKING_SESSION_ID,
+ CANCEL_REFRESH_MS_RES_TRACKING_SESSION_ID,
+ RESERVE_MPC_MT_SMS_ID
+}ValMpcMTSmsMessageIDE;
+
+typedef enum
+{
+ REJ_POSITIONING_REQUEST_ID=1,
+ CANCEL_POSITIONING_NOTIFICATION_ID,
+ RESERVE_MPC_MO_SMS_ID
+}ValMpcMOSmsMessageIDE;
+
+typedef enum
+{
+ MS_TCP_MPC_MESSAGE,
+ MPC_MS_TCP_MESSAGE,
+ MS_SMS_MPC_MESSAGE,
+ MPC_SMS_MS_MESSAGE,
+}ValMpcMessageTraceIds;
+
+typedef enum
+{
+ NULL_MO_TCP_ID=0,
+ TCP_POSITIONING_REQUEST_ID=1,
+ POSITION_REPORT_ID,
+ CANCEL_TRACKING_SESSION_ID,
+ RESERVE_MPC_MT_TCP_ID
+}ValMpcMOTcpMessageIDE;
+
+typedef enum
+{
+ START_POSITION_PROCESS_RESP_ID=1,
+ POSITION_REPORT_RESP_ID,
+ MPC_MO_TCP_RESERVE_ID
+}ValMpcMtTcpMessageIDE;
+
+
+typedef struct
+{
+ ValMpcMessageTraceIds traceIds;
+ union {
+ ValMpcMOTcpMessageIDE MoTcp;
+ ValMpcMtTcpMessageIDE MtTcp;
+ ValMpcMOSmsMessageIDE MoSms;
+ ValMpcMTSmsMessageIDE MtSms;
+ } u;
+}ValGpsCpValMpcMsgT;
+
+typedef enum {
+ VAL_POWER_OFF_BY_CPOF,
+ VAL_POWER_OFF_BY_EPOF,
+ VAL_POWER_OFF_BY_OTHERS,
+}ValPowerOffModeT;
+
+ /*------------------------------------------------------------------------
+ * Global function prototypes
+ *------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+kal_int8 GetValStatus( void );
+void ValGetDebugInfo( kal_bool isAtCmd );
+RegIdT ValRegister( const ValEventHandlerT* EventHandlerP,
+ ValEventFunc CallBack );
+void ValUnRegister( const ValEventHandlerT* EventHandlerP,
+ RegIdT RegId );
+void ValProcessEvent( const ValEventHandlerT* EventHandlerP,
+ kal_uint32 Event,
+ void* EventDataP );
+void GetUimSPName(void * MsgP);
+#ifdef MTK_CBP
+kal_bool ValGetRegResumeFlag(void);
+#endif
+
+/*-----------------------------------------------------------------
+ * valmisc.c interface
+ *----------------------------------------------------------------*/
+void ValMiscPowerDown( ValPowerDownIdT Signal, kal_uint32 ValMsgId );
+RegIdT ValMiscRegister( ValEventFunc CallBack );
+void ValMiscUnregister( RegIdT RegId );
+void ValMiscNamRequest( void );
+void ValUserInfoControl( ValUserInfoCmdT CmdId );
+//RegIdT ValVrecRegister( ValEventFunc EventFuncP );
+kal_bool ValGetEmergencyModeTestingMsg( void );
+void ValGetFirmwareVersion (void);
+
+/*-----------------------------------------------------------------
+ * valfsimsg.c interface
+ *----------------------------------------------------------------*/
+RegIdT ValFsiRegister(ValEventFunc EventFuncP);
+
+/*-----------------------------------------------------------------
+ * val interfaces to HWD (valmisc.c)
+ *----------------------------------------------------------------*/
+void ValPwrOffBoard( void );
+void* ValMalloc( kal_uint32 size );
+void* ValMallocNoHalt( kal_uint32 size );
+void ValFree(void* Ptr);
+kal_uint32 ValGetMemPoolMinFree(ValMemPoolTypeT MemPoolId);
+kal_uint32 ValGetAvailableSpace(ValMemPoolTypeT PoolType);
+kal_uint32 ValMemoryPoolSizeGet(ValMemPoolTypeT PoolId);
+
+void ValTestModeStopRefurbishAging (void);
+void ValTestModeRefurbishAgingChangeTxPwr (kal_bool Increment);
+void ValDispGetLcdDeviceInfoTest(ValDispDeviceInfoMsgT* MsgP);
+
+/*-----------------------------------------------------------------
+ * val voice stream VSTRM
+ *----------------------------------------------------------------*/
+//void ValVstrmFlushVoiceData(void);
+//void ValVstrmGetVoiceData(kal_uint8 *DstBuf, kal_uint16 Size, kal_uint16 *NumPcktsP, kal_uint16* NumBytesRcvdP);
+//void ValVstrmChkVoiceData(kal_uint16 *NumPcktsP, kal_uint16* NumBytesRcvdP);
+//void ValVstrmDiscardVoiceData(kal_uint16 Size, kal_uint16 *NumPcktsP, kal_uint16* NumBytesDiscardedP);
+
+/*-----------------------------------------------------------------
+ * val interfaces for connectivity (valconnectivity.c)
+ *----------------------------------------------------------------*/
+ValRptCpEventT ValPktSvcState( void );
+
+
+/*-----------------------------------------------------------------
+ * val interfaces for Silent Logging (valtask.c)
+ *----------------------------------------------------------------*/
+kal_uint16 ValSilentLogUpload (kal_uint8 *DstP, kal_uint16 NumBytes, kal_uint32 Offset, kal_uint32 *TotSizeP);
+
+
+/*-----------------------------------------------------------------
+ * val PGPS functions (valpgps.c)
+ *----------------------------------------------------------------*/
+void PgpsPdaInit(void);
+void PgpsPdaStart(void );
+void PgpsPdaDbmReadRspMsg(void * MsgDataP);
+void PgpsPdaDbmWriteRspMsg(void *MsgDataP);
+void PgpsPdaCfgSet( ValPgpsCfgT * msg_buf);
+void PgpsPdaCfgGet( ExeRspMsgT * MsgP );
+void PgpsPdaTimerHandler(void );
+void PgpsPdaStartNetwork(void );
+void PgpsConnected( void );
+kal_bool PgpsReadMoreData(void );
+kal_bool PgpsClosePpp(void );
+void PgpsDataFeteched(void );
+void ValRecordModemFailure(kal_uint8 Interface, kal_bool Set);
+#ifdef MTK_CBP
+extern kal_uint32 GPSSessStartTime;
+extern void ValPswNotifyGpsOfEmergencyCall(kal_uint8 IsActive);
+extern void ValPswTriggerFakeStopGps(void);
+#endif
+
+#if defined(__TC10__) && defined(__FEATURE_SS_LOG__) && !defined (MTK_PLT_ON_PC)
+#define CVAL_MAX_SS_LOG_LEN 200
+
+void ValPrintCdmaSSLog(const char* fmt, ...);
+#define SS_STR_TRACE(fmt, ...) ValPrintCdmaSSLog(fmt, ##__VA_ARGS__)
+#else
+#define SS_STR_TRACE(fmt, ...)
+#endif
+
+#ifdef MTK_DEV_C2K_IRAT
+#define C2K_IRAT_STATUS (ValIratGetInterRatOperationStatus())
+#define C2K_IRAT_ON if(C2K_IRAT_STATUS)
+#define C2K_IRAT_OFF if(!C2K_IRAT_STATUS)
+kal_bool ValIsLTEDisabled(void);/*check if 4G is disabled*/
+#ifdef MTK_DEV_C2K_SRLTE
+/* C2K_SRLTE_STATUS is a constant, for non-single bin build. */
+#ifdef MTK_DEV_C2K_SRLTE_L1
+#define C2K_SRLTE_STATUS (KAL_TRUE)
+#else
+#define C2K_SRLTE_STATUS (KAL_FALSE)
+#endif
+
+#define C2K_SRLTE_ON if (C2K_SRLTE_STATUS)
+#define C2K_SRLTE_OFF if (!C2K_SRLTE_STATUS)
+
+/* #define SRLTE_RSVA_STUB 1 */
+#else /* MTK_DEV_C2K_SRLTE */
+#define C2K_SRLTE_STATUS (KAL_FALSE)
+#endif /* MTK_DEV_C2K_SRLTE */
+
+#define C2K_IRAT_ON_OR_SRLTE_ON if((C2K_IRAT_STATUS)||(C2K_SRLTE_STATUS))
+
+#else
+#define C2K_IRAT_STATUS (ValIratGetInterRatOperationStatus())
+#define C2K_IRAT_ON if(C2K_IRAT_STATUS)
+#define C2K_IRAT_OFF if(!C2K_IRAT_STATUS)
+kal_bool ValPsdmIsAttached(void); // check if +cgatt initiated
+kal_bool ValIsLTEDisabled(void);/*check if 4G is disabled*/
+
+#endif /* MTK_DEV_C2K_IRAT */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#ifdef MTK_CBP /*for mode switch optimization*/
+extern OperationModeT ValOpMode;
+extern OperationModeT ValOpModeOld;
+extern OperationModeT OpModeForSim1;
+extern kal_bool GmssModeSwitchOngoing;
+extern kal_bool NeedDeepSleepByCPOF;
+extern OperationModeT C2KPrefMode;
+extern kal_uint8 PowerCtrlPendByModeSwitch;
+extern kal_uint8 ValGmssHybridModeSetProgress;
+extern kal_bool SetRatModeByCPON;
+
+extern OperationModeT ValModeGet(void);
+extern void ValSavePrefModeToNV(OperationModeT PrefModeForSave);
+
+#define VAL_HYBRID_MODE_CHG_1X_ENABLE_MASK 0x01
+#define VAL_HYBRID_MODE_CHG_1X_DISABLE_MASK 0x02
+#define VAL_HYBRID_MODE_CHG_DO_ENABLE_MASK 0x04
+#define VAL_HYBRID_MODE_CHG_DO_DISABLE_MASK 0x08
+#define VAL_HYBRID_MODE_CHG_REQ_START_MASK 0x80
+#endif
+
+/*for set rat mode optimization*/
+extern kal_bool IsModeSwitchCompleted;
+extern kal_bool IsEmdStatusCompleted;
+extern kal_bool IsCssStatusCompleted;
+extern kal_uint8 md3_active_sim_index;
+extern kal_uint8 sim_index_cnf_md1;
+
+#if defined (__MCIF_SUPPORT__) && defined (__CO_ANTENNA__)
+
+#define CONSYS_MDC2K_COANT_STAT_IND 0x0002
+#define MDC2K_CONSYS_COANT_STAT_IND 0x0101
+
+typedef enum
+{
+ ENUM_C2K_ENTER_FLIGHT_MODE, /* not used */
+ ENUM_C2K_LEAVE_FLIGHT_MODE, /* not used */
+
+ ENUM_C2K_1X_OOSA, /* not used */
+ ENUM_C2K_1X_IDLE_SLOTTED, /* lightly used */
+ ENUM_C2K_1X_IDLE_NON_SLOTTED, /* highly used */
+ ENUM_C2K_1X_PLMN_SEARCH, /* highly used */
+ ENUM_C2K_1X_ACCESS, /* highly used */
+ ENUM_C2K_1X_CONECTION, /* highly used */
+
+ ENUM_C2K_DO_INACTIVE, /* not used */
+ ENUM_C2K_DO_IDLE_SLEEP, /* not used */
+ ENUM_C2K_DO_PILOTACQ, /* highly used */
+ ENUM_C2K_DO_IDLE_MONITOR, /* highly used */
+ ENUM_C2K_DO_ACCESS, /* highly used */
+ ENUM_C2K_DO_CONNECTED /* highly used */
+} ENUM_MD_C2K_STATUS;
+typedef struct
+{
+ kal_uint32 SeqNum;
+ kal_uint32 Systime;
+ ENUM_MD_C2K_STATUS c2k_Status;
+ kal_uint32 DRXCycle; /* Reserved */
+ kal_uint32 auReserved[4];
+}mdc2k_consys_coant_stat_param_t;
+
+
+typedef enum
+{
+ ENUM_C2K_WIFI_ON,
+ ENUM_C2K_WIFI_OFF,
+ ENUM_C2K_WIFI_ENTER_LP,
+ ENUM_C2K_WIFI_LEAVE_LP
+} ENUM_C2K_COANT_WIFI_STATUS;
+
+
+typedef struct {
+
+ kal_uint32 u4_secquence_num;
+ kal_uint32 u4_systime;
+ ENUM_C2K_COANT_WIFI_STATUS wifi_status;
+ kal_uint8 au_reserved[4];
+} consys_to_c2k_wifi_status_struct;
+
+
+extern void val_mcif_c2k_current_state_rpt();
+extern void val_mcif_c2k_state_rpt(ENUM_MD_C2K_STATUS State);
+
+#endif
+
+
+typedef struct
+{
+ rat_enum rat_mode;
+ rat_enum reported_rat;
+ irat_system_type_enum c2k_mode;
+ kal_uint8 protocol_id;
+}ValSetRatModeMsgT;
+
+typedef struct
+{
+ l4_rf_state_enum rf_state;
+ rfoff_cause_enum rfoff_cause;
+ l4_sim_state_enum sim_state;
+ kal_bool is_power_off; /* used by IMC to teardown IMS anyway */
+}ValPhoneStateMsgT;
+
+#endif /* VALAPI_H */
+
+/*****************************************************************************
+ End of file
+*****************************************************************************/
+/**Log information: \main\6 2012-02-20 08:44:52 GMT hbi
+** HREF#0000: remove warning (Audio)**/
+/**Log information: \main\Trophy\Trophy_ylxiao_href22033\1 2013-03-18 14:15:47 GMT ylxiao
+** HREF#22033, merge 4.6.0**/
+/**Log information: \main\Trophy\1 2013-03-19 05:20:15 GMT hzhang
+** HREF#22033 to merge 0.4.6 code from SD.**/
+/**Log information: \main\Trophy\Trophy_zjiang_href22162\1 2013-04-22 07:49:54 GMT zjiang
+** HREF#22162.1x only°æ±¾±àÒë´íÎó**/
+/**Log information: \main\Trophy\2 2013-04-22 08:04:35 GMT gdeng
+** HREF#22162|**/
+/**Log information: \main\Trophy\Trophy_wzhou_href22163\1 2013-04-25 03:10:40 GMT wzhou
+** HREF#22163: add A12 auth status message in VAL**/
+/**Log information: \main\Trophy\3 2013-04-25 03:06:29 GMT jzwang
+** href#22163**/
+/**Log information: \main\Trophy\Trophy_wzhou_href22221\1 2013-06-05 08:57:58 GMT wzhou
+** HREF#22221: fix Agps**/
+/**Log information: \main\Trophy\5 2013-06-05 08:47:21 GMT jzwang
+** href#22221**/
+/**Log information: \main\Trophy\Trophy_zjiang_href22256\1 2013-08-21 07:39:36 GMT zjiang
+** HREF#22256.1.crts21316:Ä£¿é¶ÌÐÅ×Ô×¢²á±àÒë°æ±¾Àï´æÔÚµÄ×Ô×¢²á¶ÌÐŶàÓàÉϱ¨ÐÞ¸Ä;2.+CPINÃüÁîÓÅ»¯.**/
+/**Log information: \main\Trophy\6 2013-08-21 07:42:28 GMT cshen
+** href#22256**/
+/**Log information: \main\Trophy\Trophy_zjiang_href22290\1 2013-10-25 07:51:33 GMT zjiang
+** HREF#22290.fix crts 21713 and crts 21496. Ìí¼Ó+VECIOÖ÷¶¯Éϱ¨¡£ÐÞ¸ÄVMEMFLÃüÁîÖеÄÎÊÌâ¡£**/
+/**Log information: \main\Trophy\7 2013-10-25 07:54:10 GMT cshen
+** href#22290**/
+/**Log information: \main\Trophy\Trophy_zjiang_href22317\1 2013-11-27 09:21:37 GMT zjiang
+** HREF#22317.fix crts21903.Ôö¼ÓUICC¿¨ÀàÐÍ¡£**/
+/**Log information: \main\Trophy\8 2013-11-28 01:24:36 GMT cshen
+** href#22317**/
+/**Log information: \main\Trophy\Trophy_yzhang_href22324\1 2013-12-05 09:30:46 GMT yzhang
+** HREF#22324:India MTS/TATA ESN Tracking SMS requirement**/
+/**Log information: \main\Trophy\9 2013-12-06 02:32:24 GMT cshen
+** href#22324**/
+/**Log information: \main\Trophy\Trophy_xding_href22331\1 2013-12-10 07:18:07 GMT xding
+** HREF#22331, ºÏ²¢MMCÏà¹Ø¹¦Äܵ½Trophy baselineÉÏ**/
+/**Log information: \main\Trophy\10 2013-12-10 08:33:46 GMT jzwang
+** href#22331:Merge MMC latest implementation from Qilian branch.**/
+/**Log information: \main\Trophy\Trophy_zjiang_href22338\1 2013-12-23 07:32:21 GMT zjiang
+** HREF#22338**/
+/**Log information: \main\Trophy\12 2013-12-23 08:58:55 GMT cshen
+** href#22338**/
+/**Log information: \main\Trophy\Trophy_zjiang_href22357\1 2014-01-11 07:30:26 GMT zjiang
+** HREF#22357**/
+/**Log information: \main\Trophy\13 2014-01-11 07:36:42 GMT cshen
+** HREF#22357**/
+
diff --git a/mcu/interface/protocol/l4_c2k/valat.h b/mcu/interface/protocol/l4_c2k/valat.h
new file mode 100644
index 0000000..b018de4
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valat.h
@@ -0,0 +1,127 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2004-2013 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+/********************************************************************************************
+*
+* FILE NAME : valat.h
+*
+* DESCRIPTION : Prototypes and definitions for VAL AT.
+*
+********************************************************************************************/
+#ifndef _VALAT_H_
+#define _VALAT_H_
+
+#include "sysdefs.h"
+#include "valuimapi.h"
+
+#include "val_nvram.h"
+
+/*-----------------------------------------------------------------
+ * VAL AT definitions
+ *----------------------------------------------------------------*/
+#define ATC_MAX_ATPARMS 15
+#define ATC_MAX_NUM_LINE_IN_RSP 15
+#define ATC_MAX_COMMAND_BODY_LEN 16
+
+typedef struct
+{
+ char* data;
+ kal_uint16 len;
+} AtcDataParse;
+
+typedef struct
+{
+ kal_uint32 num32;
+ char* ptrCharStr;
+ AtcDataParse buf;
+ kal_uint32 ipAddr;
+#ifdef MTK_CBP //MTK_DEV_C2K_IRAT
+ kal_bool entered;
+#endif
+} AtcParmT;
+
+typedef struct
+{
+ char* ParmLine[ATC_MAX_NUM_LINE_IN_RSP];
+} AtcParmArrayT;
+
+typedef struct
+{
+ char cmdName[16];
+ AtcParmT* ParmList[ATC_MAX_ATPARMS];
+ kal_uint8 chan;
+} AtcSendAtMsgT;
+
+typedef struct
+{
+ kal_bool Pending;
+ AtcSendAtMsgT ActInfo;
+} AtcPendRspT;
+
+typedef struct
+{
+ char cmdName[ATC_MAX_COMMAND_BODY_LEN];
+ AtcParmArrayT LinesOfParms;
+ kal_uint8 numOfValidLines;
+ kal_bool rspStatus;
+ kal_bool needBufferAck;
+ kal_bool skipResultCode;
+ char* ErrResultNum;
+ kal_uint8 chan;
+ kal_uint16 LineLen[ATC_MAX_NUM_LINE_IN_RSP];
+#ifdef MTK_CBP
+ kal_bool isUrc;
+#endif
+} AtcSendAtRespMsgT;
+
+/*-----------------------------------------------------------------
+ * VAL AT global variables
+ *----------------------------------------------------------------*/
+extern AtcDbmBinDataT AtcNvmData;
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+extern AtcValActivedBandDataT AtcActivedBandData;
+#endif
+
+#endif
+ /* _VALAT_H_ */
+
diff --git a/mcu/interface/protocol/l4_c2k/valatdata.h b/mcu/interface/protocol/l4_c2k/valatdata.h
new file mode 100644
index 0000000..574d980
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valatdata.h
@@ -0,0 +1,571 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 CONSKAL_TRUED 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).
+*
+*****************************************************************************/
+/*************************************************************************
+ *
+ * File Name: valatdata.h
+ *
+ * Description: IS-707 Mobile Terminal AT Commands Engine, API
+ * data definitions.
+ *
+ *
+ ************************************************************************/
+
+#ifndef _AT_DATA_H
+#define _AT_DATA_H 1
+
+
+enum _AtService
+{
+ ATS_AsyncData,
+ ATS_Fax,
+ ATS_Rejected,
+ ATS_PacketRelayRm,
+ ATS_SingleStackQNC,
+ ATS_UpBrowser,
+ ATS_AsyncUpBrowser,
+ ATS_TcpCktBrowser,
+ ATS_TcpPktBrowser,
+ ATS_PacketNtwkRm,
+ ATS_PPPOnly,
+ NUM_ATSs
+};
+
+typedef kal_uint8 AtService;
+
+enum _AtBreakType
+{
+ BKT_NonExpeditedNonDestructive,
+ BKT_ExpeditedNonDestructive,
+ BKT_ExpeditedDestructive,
+ NUM_BKTs
+};
+
+typedef kal_uint8 AtBreakType;
+
+enum _AttState
+{
+ ATT_Command,
+ ATT_Online,
+ ATT_OnlineCommand,
+ NUM_ATTs
+};
+
+typedef kal_uint8 AtState;
+
+enum _AtError
+{
+ ATE_ChCmRCQOverflow,
+ ATE_ChInvalidBreak,
+ ATE_Invalid617Chars,
+ ATE_ChIwfFlowCtlErr,
+ ATE_ChRflctAtCmdBufOverflow,
+ ATE_ChUnknownInBandCmd,
+ ATE_ChUnknownExtend0Cmd,
+ ATE_ChUnknownExtend1Cmd,
+ ATE_CmInvalidBrowserDigitLen,
+ ATE_CmInvalidDialStringType,
+ ATE_CmNonMatchingSvcOpt,
+ ATE_CmUnexpectedEvent,
+ ATE_CmUnexpectedExtend0Cmd,
+ ATE_CmUnexpectedInBandCmd,
+ ATE_CmUnexpectedReflectedAtCmd,
+ ATE_DhInvalidC108BehaviorParm,
+ ATE_DhRlpRxIndErr,
+ ATE_RdInvalidRfcCmd,
+ ATE_RdRxBusy,
+ ATE_TmDpdTxNotReady,
+ ATE_TmCnTxNotReady,
+ ATE_UdInvalidCmdChar,
+ NUM_ATEs
+};
+typedef kal_uint8 AtError;
+
+enum _AtOrigFailReason
+{
+ ATOF_Intercept,
+ ATOF_Reorder,
+ ATOF_Release,
+ ATOF_Reject,
+ ATOF_Disabled,
+ ATOF_Busy,
+ NUM_ATOFs
+};
+typedef kal_uint8 AtOrigFailReason;
+
+enum _AtReleaseReason
+{
+ ATR_Normal,
+ ATR_Fade,
+ ATR_PowerDown,
+ NUM_ATRs
+};
+typedef kal_uint8 AtReleaseReason;
+
+enum _AtNspeStatus /* This definition shall agree with defines found in 7074API.h */
+{
+ ANS_ConnectSuccess,
+ ANS_ConnectFailTCP,
+ ANS_ConnectFailPPP,
+ ANS_ConnectFailRLP,
+ ANS_ConnectFailUart,
+ ANS_DisconnectNormal = 5,
+ NUM_ANSs
+};
+typedef kal_uint8 AtNspeStatus;
+
+enum _DialStringType
+{
+ DST_Normal,
+ DST_Restricted,
+ DST_QNC,
+ NUM_DSTs
+};
+typedef kal_uint8 DialStringType;
+
+enum _AtConnFailType
+{
+ ACFT_CONNECT_FAIL_TCP, /* connection fails on TCP */
+ ACFT_CONNECT_FAIL_PPP, /* connection fails on PPP */
+ ACFT_CONNECT_FAIL_RLP, /* connection fails on RLP */
+ ACFT_CONNECT_FAIL_UART, /* not use */
+ ACFT_CONNECT_FAIL_TRAFFIC, /* connection fails on traffic */
+ ACFT_CONNECT_FAIL_NOSVC, /* connection fails on no src */
+ NUM_ACFTs
+};
+typedef kal_uint8 AtConnFailType;
+
+enum _AtDisconnectType
+{
+ ADT_DISCONNECT_NORMAL,
+ ADT_DISCONNECT_MS,
+ ADT_DISCONNECT_FADE,
+ NUM_ADTs
+};
+typedef kal_uint8 AtDisconnectType;
+/* These defines include the NULL terminator */
+#define MAX_CFG_LEN 249
+#define MAX_DROPPED_FAX_LINE_STR_LEN 65535
+#define MAX_FLI_LEN 21
+#define MAX_FSA_LEN 21
+#define MAX_FPA_LEN 21
+#define MAX_FPI_LEN 21
+#define MAX_FPW_LEN 21
+#define MAX_GCAP_LEN 65535
+#define MAX_GMI_LEN 2047
+#define MAX_GMM_LEN 2047
+#define MAX_GMR_LEN 2047
+#define MAX_GOI_LEN 2047
+#define MAX_GSN_LEN 2047
+
+/* aiCfgGetCSS definitions */
+enum _AtBandClass
+{
+ ABC_Unknown,
+ ABC_800MHz,
+ ABC_1900MHz,
+ NUM_ABCs
+};
+typedef kal_uint8 AtBandClass;
+
+#define CSS_BAND_NONE 0x47 /* Displayed as: 'Z'.
+ * Server dosen't like 'G'*/
+
+#define CSS_SID_NONE 32768 /* Displayed as: '99999' */
+
+/* aiCfgGetCSQ definitions */
+#define CSQ_SQM_UNKNOWN 32 /* Displayed as: '99' */
+#define CSQ_FER_UNKNOWN 8 /* Displayed as: '99' */
+
+
+/* aiCfgGetCBC definitions */
+#define CBC_BCS_BatteryPower 0
+#define CBC_BCS_ExternalPower 1
+#define CBC_BCS_NotAvailable 2
+#define CBC_BCS_PowerFault 3
+
+
+/* DPD Carrier index definitions */
+#define CR_V90 0
+#define CR_V34B 1
+#define CR_V34 2
+#define CR_V32B 3
+#define CR_V32 4
+#define CR_V27TC 5
+#define CR_V26B 6
+#define CR_V23C 7
+#define CR_V23S 8
+#define CR_V22B 9
+#define CR_V22 10
+#define CR_V21 11
+#define CR_V17 12
+#define CR_B212 13
+#define CR_B209 14
+#define CR_B208 15
+#define CR_B202 16
+#define CR_B201 17
+#define CR_B103 18
+#define CR_UNUSED 255
+#define AT_NUM_CRs 19
+
+/* FAX serial rate definintions */
+#define FR_AUTOBAUD 0
+#define FR_2400 1
+#define FR_4800 2
+#define FR_9600 4
+#define FR_19200 8
+#define FR_38400 16
+#define FR_57600 24
+#define FR_115200 48
+/* aiCfgGetMA definitions */
+#define NUM_MA_CARRIERS 8
+
+/* aiCfgGetCAD return values */
+enum _CAD
+{
+ CAD_NoSvc,
+ CAD_CDMA,
+ CAD_TDMA,
+ CAD_Analog,
+ NUM_CADs
+};
+
+/* NSPE definitions */
+#define TCP_ACTIVE 0
+#define TCP_PASSIVE 1
+
+#define IP_MAX_THRUPUT 0
+#define IP_LOW_DELAY 1
+
+#define RLP_NON_TRANS 0
+#define RLP_TRANS 1
+
+#define RLP_CHAN_PRIMARY 0
+#define RLP_CHAN_SECONDARY 1
+
+enum _AtPacketCallEvent
+{
+ PCE_EnterIdle,
+ PCE_IdleHandoffSameSystem,
+ PCE_IdleHandoffNewSystem,
+ PCE_PageReceived,
+ PCE_OriginationSent,
+ PCE_TrafficChannelAssigned,
+ PCE_HardHandoff,
+ NUM_PCEs
+};
+typedef kal_uint8 AtPacketCallEvent;
+
+enum _AtPacketCallState
+{
+ PCS_Inactive,
+ PCS_InitIdle,
+ PCS_InitTraffic,
+ PCS_ConnectedPrimary,
+ PCS_ConnectedSecondary,
+ PCS_DormantIdle,
+ PCS_DormantTraffic,
+ PCS_ReconnectIdle,
+ PCS_ReconnectTraffic,
+ NUM_PCSs
+};
+typedef kal_uint8 AtPacketCallState;
+
+enum _BrowserConnectStatus
+{
+ BS_Success,
+ BS_Busy,
+ BS_Rejected,
+ BS_Failed,
+ BS_NoSvc,
+ BS_DisconnectNormal,
+ BS_ConnectionDropped,
+ BS_Dormant,
+ BS_Reconnected,
+ NUM_BSs
+};
+typedef kal_uint8 BrowserConnectStatus;
+
+enum _AtUnexpectedEventId
+{
+ EVID_Internal, /* Unexpected internal events are not logged. */
+ EVID_CpAlertInd,
+ EVID_CpConnectInd,
+ EVID_CpDormantInd,
+ EVID_CpOrigFailInd,
+ EVID_CpPageInd,
+ EVID_CpReleaseInd,
+ EVID_NspeBrowserConnectReq,
+ EVID_NspeBrowserDormantReq,
+ EVID_NspeBrowserHangupReq,
+ EVID_NspePppConnectRsp,
+ EVID_NspeStatusInd,
+ EVID_RlpCloseRsp,
+ EVID_RlpInactivityInd,
+ EVID_RlpOpenRsp,
+ NUM_EVIDs
+};
+
+enum _AtOrigFailReleaseReason /* see scc_data.h */
+{
+ General_orig_fail,
+ Cancel_orig_fail,
+ Inetrcept_orig_fail,
+ Reorder_orig_fail,
+ Release_orig_fail,
+ Reject_orig_fail,
+ Disabled_orig_fail,
+ Busy_orig_fail,
+ Invalid_cfg_orig_fail,
+ Paged_orig_fail,
+ Releasing_orig_fail,
+ Amps_orig_fail,
+ No_Release_reason,
+ Normal_release_reason,
+ Fade_release_reason,
+ Disabled_release_reason,
+ Rejected_release_reason,
+ Swicth_complete_release_reason,
+ Swicth_fail_not_connected,
+ Svctype_mismatch_release_reason
+};
+
+typedef kal_uint8 AtUnexpectedEventId;
+
+typedef struct
+{
+ kal_uint8 bcs;
+ kal_uint8 bcl;
+} AtCbc;
+
+typedef struct
+{
+ kal_uint8 direction;
+ kal_bool compressionNegotiation;
+ kal_uint16 maxDict;
+ kal_uint8 maxString;
+} AtDs;
+
+typedef struct
+{
+ kal_uint8 sqm;
+ kal_uint8 fer;
+} AtCsq;
+
+typedef struct
+{
+ AtBandClass bandClass;
+ char band;
+ kal_uint16 sid;
+} AtCss;
+
+typedef struct
+{
+ kal_uint8 breakSelection;
+ kal_bool timed;
+ kal_uint8 defaultLen;
+} AtEb;
+
+typedef struct
+{
+ kal_uint8 origRqst;
+ kal_uint8 origFbk;
+ kal_uint8 ansFbk;
+} AtEs;
+
+typedef struct
+{
+ kal_uint8 pendingTd;
+ kal_uint8 pendingRd;
+ kal_uint8 timer;
+} AtEtbm;
+
+typedef struct
+{
+ kal_bool sub;
+ kal_bool sep;
+ kal_bool pwd;
+} AtFap;
+
+typedef struct
+{
+ kal_bool vr;
+ kal_uint8 br;
+ kal_uint8 wd;
+ kal_uint8 ln;
+ kal_uint8 df;
+ kal_bool ec;
+ kal_bool bf;
+ kal_uint8 st;
+} AtFcc;
+
+typedef struct
+{
+ kal_uint8 rq;
+ kal_uint8 tq;
+} AtFcq;
+
+typedef struct
+{
+ kal_uint8 vrc;
+ kal_uint8 dfc;
+ kal_uint8 lnc;
+ kal_uint8 wdc;
+} AtFfc;
+
+typedef struct
+{
+ kal_bool rpr;
+ kal_bool tpr;
+ kal_bool idr;
+ kal_bool nsr;
+} AtFnr;
+
+#define MAX_FIF_LEN 90
+
+typedef struct
+{
+ kal_uint8 buf[MAX_FIF_LEN];
+ kal_uint8 len;
+} AtFif;
+
+typedef struct
+{
+ kal_uint8 pgl;
+ kal_uint8 cbl;
+} AtFrq;
+
+typedef struct
+{
+ kal_uint8 format;
+ kal_uint8 parity;
+} AtIcf;
+
+typedef struct
+{
+ kal_uint8 dceByDte;
+ kal_uint8 dteByDce;
+} AtIfc;
+
+typedef struct
+{
+ kal_uint8 carrier;
+ kal_bool automode;
+ kal_uint16 minRate;
+ kal_uint16 maxRate;
+ kal_uint16 minRxRate;
+ kal_uint16 maxRxRate;
+} AtMs;
+
+typedef struct
+{
+ kal_uint8 mode;
+ kal_uint8 dfltAnsMode;
+ kal_bool fbkTimeEnable;
+} AtMv18s;
+
+/* Compression direction bit definitions */
+#define CMP_DIR_DTE_TO_DCE BIT0
+#define CMP_DIR_DCE_TO_DTE 0x02
+
+/* DPD Baud rate bit definitions */
+/* BIT0 reserved for auto-baud */
+#define BR_NONE 0
+#define BR_300 0x02
+#define BR_1200 0x04
+#define BR_2400 0x08
+#define BR_4800 0x10
+#define BR_9600 0x20
+#define BR_19200 0x40
+#define BR_38400 0x80
+#define BR_57600 0x100
+#define BR_115200 0x200
+#define BR_230400 0x400
+
+
+typedef struct
+{
+ kal_uint8 Mode;
+ kal_uint8 Subset;
+ kal_uint8 PortSpeed;
+ kal_uint16 N1;
+ kal_uint8 T1;
+ kal_uint8 N2;
+ kal_uint8 T2;
+ kal_uint8 T3;
+ kal_uint8 K;
+} AtMuxParmsT;
+
+enum
+{
+ AT_CHAN_PPP = 0, /* used for AT and DATA*/
+ AT_CHAN_ATCMD_1, /* AT only, include the Enhanced AT commands*/
+#ifdef SYS_OPTION_ATCMD_CH_2
+ AT_CHAN_ATCMD_2,/* AT only, include the Enhanced AT commands*/
+#ifdef SYS_OPTION_ATCMD_CH_3
+ AT_CHAN_ATCMD_3,
+#ifdef SYS_OPTION_ATCMD_CH_4
+ AT_CHAN_ATCMD_4,
+#ifdef SYS_OPTION_MORE_AT_CHANNEL
+ AT_CHAN_ATCMD_5,
+ AT_CHAN_ATCMD_6,
+ AT_CHAN_ATCMD_7,
+ AT_CHAN_ATCMD_8,
+#endif /* SYS_OPTION_MORE_AT_CHANNEL */
+#endif /* SYS_OPTION_ATCMD_CH_2 */
+#endif /* SYS_OPTION_ATCMD_CH_3 */
+#endif /* SYS_OPTION_ATCMD_CH_4 */
+#ifdef MTK_DEV_ETS_ENHANCEMENT
+ AT_CHAN_ETS,
+#endif
+ AT_CHAN_NUM
+};
+#ifdef SYS_OPTION_MORE_AT_CHANNEL
+#define AT_EXTRA_CHAN_NUM 4
+#else
+#define AT_EXTRA_CHAN_NUM 3
+#endif
+
+#ifdef MTK_DEV_C2K_IRAT
+#ifdef MTK_DEV_ETS_ENHANCEMENT
+#define MAX_AT_CHAN_NUM_FOR_AP AT_CHAN_ETS - 1
+#else
+#define MAX_AT_CHAN_NUM_FOR_AP AT_CHAN_NUM - 1
+#endif
+#endif
+
+#define AT_MUX_EN_BIT 1
+#define AT_IOP_MUX_EN_BIT 2
+
+#endif /* _AT_DATA_H */
diff --git a/mcu/interface/protocol/l4_c2k/valattune.h b/mcu/interface/protocol/l4_c2k/valattune.h
new file mode 100644
index 0000000..f95f252
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valattune.h
@@ -0,0 +1,557 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************************
+ *
+ * File Name: valattune.h
+ *
+ * Description: Tuning parameters
+ *
+ *
+ ************************************************************************/
+#ifndef _AT_TUNE_H
+#define _AT_TUNE_H 1
+
+#include "valatdata.h"
+/* ---------------------------------------------------------------------
+ * Name: Data Port Present
+ *
+ * Description:
+ * This switch defines whether or not AppInt supports a Data Port
+ * interface. Set this switch to KAL_FALSE for Browser-Only applications.
+ *
+ * Restrictions:
+ * KAL_FALSE, KAL_TRUE
+ *
+ * Default Value:
+ * KAL_TRUE
+ *
+ * Notes:
+ * When this switch is set to KAL_FALSE, the following files can be excluded
+ * from the build-set:
+ * - ai_ch.c
+ * - ai_cmd.c
+ * - ai_dh.c
+ * - ai_dr.c
+ * - ai_parse.c
+ * - atparse.c
+ * - atpparse.c
+ * - iqmgr.c
+ * - isolib.c
+ */
+#define AT_DPD_PRESENT 1
+
+/* ---------------------------------------------------------------------
+ * Name: V.42bis Compression Capabilities: <direction>
+ *
+ * Description:
+ * This switch defines the capabilities of the V.42bis software
+ * provisioned in the MT. AppInt uses this switch to determine the
+ * valid range for the <direction> parameter in the +CDS command.
+ *
+ * Restrictions:
+ * 0: No V.42bis provisioned.
+ * 1: V.42bis available in the reverse direction only.
+ * 2: V.42bis available in the forward direction only.
+ * 3: V.42bis available in both directions.
+ *
+ * Default Value:
+ * 0
+ */
+#define AT_CMP_DIRECTION 0
+
+/* ---------------------------------------------------------------------
+ * Name: V.42bis Compression Capabilities: <max_dict>
+ *
+ * Description:
+ * This switch defines the maximum dictionary size supported the V.42bis
+ * software provisioned in the MT. AppInt uses this switch to determine
+ * the valid range for the <max_dict> parameter in the +CDS command.
+ *
+ * Restrictions:
+ * 512 - 65535
+ *
+ * Default Value:
+ * 2048
+ */
+#define AT_CMP_MAX_DICT 2048
+
+
+/* ---------------------------------------------------------------------
+ * Name: V.42bis Compression Capabilities: <max_string>
+ *
+ * Description:
+ * This switch defines the maximum string size supported the V.42bis
+ * software provisioned in the MT. AppInt uses this switch to determine
+ * the valid range for the <max_string> parameter in the +CDS command.
+ *
+ * Restrictions:
+ * 6 - 250
+ *
+ * Default Value:
+ * 6
+ */
+#define AT_CMP_MAX_STRING 6
+
+
+/* ---------------------------------------------------------------------
+ * Name: Data Port Driver Capabilities: autobaud rates
+ *
+ * Description:
+ * This switch defines the bit rates which may be auto-detected by the
+ * Data Port Driver hardware. These rates are to be used in Command
+ * state and for Async Data calls only. AppInt uses this switch to
+ * determine the valid range for the <auto-detectable rates> parameter
+ * in the +IPR command.
+ *
+ * Restrictions:
+ * Any number of entries from the following list:
+ * BR_300
+ * BR_1200
+ * BR_2400
+ * BR_4800
+ * BR_9600
+ * BR_19200
+ * BR_38400
+ * BR_57600
+ * BR_115200
+ * or: BR_NONE.
+ *
+ * The same bit rate may not be specified in both AT_DPD_AUTOBAUD_RATES and
+ * AT_DPD_FIXED_RATES.
+ *
+ * Default Value:
+ * (BR_300 + BR_1200 + BR_2400 + BR_4800 + BR_9600 +
+ * BR_19200 + BR_38400 + BR_57600 + BR_115200)
+ */
+/*
+#define AT_DPD_AUTOBAUD_RATES (BR_300 + \
+ BR_1200 + \
+ BR_2400 + \
+ BR_4800 + \
+ BR_9600 + \
+ BR_19200 + \
+ BR_38400 + \
+ BR_57600 + \
+ BR_115200)
+
+*/
+
+#define AT_DPD_AUTOBAUD_RATES BR_NONE
+/* ---------------------------------------------------------------------
+ * Name: Data Port Driver Capabilities: fixed baud rates
+ *
+ * Description:
+ * This switch defines the bit rates supported by the Data Port Driver
+ * hardware, but which may not be auto-detected.
+ * These rates are to be used in Command state and for Async Data calls only.
+ * AppInt uses this switch to determine the valid range for the
+ * <fixed-only rates> parameter in the +IPR command.
+ *
+ * Restrictions:
+ * Any number of entries from the following list:
+ * BR_300
+ * BR_1200
+ * BR_2400
+ * BR_4800
+ * BR_9600
+ * BR_19200
+ * BR_38400
+ * BR_57600
+ * BR_115200
+ * or: BR_NONE
+ *
+ * The same bit rate may not be specified in both AT_DPD_AUTOBAUD_RATES and
+ * AT_DPD_FIXED_RATES.
+ *
+ * Default Value:
+ * BR_NONE
+ */
+#define AT_DPD_FIXED_RATES (BR_19200 + \
+ BR_115200+ \
+ BR_230400 )
+
+
+/* ---------------------------------------------------------------------
+ * Name: Local AT-Parameter Default Value: +IPR
+ *
+ * Description:
+ * This switch defines the default value to be used for the "Fixed
+ * DTE Rate" parameter.
+ * This value is used to reset the parameter value when a ATZ or AT&F
+ * command is processed and AT_DPD_AUTOBAUD_RATES is BR_NONE. Otherwise,
+ * a value of zero is used.
+ *
+ * Restrictions:
+ * Any value from the list defined for AT_DPD_FIXED_RATES.
+ *
+ * Default Value:
+ * BR_230400
+ */
+#define AT_DEFAULT_IPR BR_230400
+
+
+/* ---------------------------------------------------------------------
+ * Name: Data Port Driver Capabilities: Maximum FAX bit rate
+ *
+ * Description:
+ * This switch defines the maximum bit rate which the Data Port Driver
+ * can use during FAX calls. AppInt uses this switch to determine the
+ * valid range of values for the +FPR command.
+ *
+ * Restrictions:
+ * Any one of the following values:
+ * FR_2400
+ * FR_4800
+ * FR_9600
+ * FR_19200
+ * FR_38400
+ * FR_57600
+ * FR_115200
+ *
+ * Default Value:
+ * FR_19200
+ */
+#define AT_DPD_MAX_FPR FR_19200
+
+
+/* ---------------------------------------------------------------------
+ * Name: Data Port Driver Capabilities: Fax transmit buffer size.
+ *
+ * Description:
+ * This switch defines the size of the buffer used by the Data Port Driver
+ * to store data in the reverse direction during FAX calls. AppInt uses
+ * this switch when reporting information for the <tbs> parameter in the
+ * +FBS? command.
+ *
+ * Restrictions:
+ * 0 - 65535
+ *
+ * Default Value:
+ * 3600
+ */
+#define AT_DPD_FBS_TX 3600
+
+/* ---------------------------------------------------------------------
+ * Name: Data Port Driver capabilities: Fax receive buffer size.
+ *
+ * Description:
+ * This switch defines the size of the buffer used by the Data Port Driver
+ * to store data received in the forward direction during FAX calls.
+ * AppInt uses this switch when reporting information for the <rbs>
+ * parameter in the +FBS? command.
+ *
+ * Restrictions:
+ * 3600 - 65535
+ *
+ * Default Value:
+ * 3600
+ */
+#define AT_DPD_FBS_RX 3600
+
+/* ---------------------------------------------------------------------
+ * Name: Local AT-Parameter Default Value: +CDS.<max_dict>
+ *
+ * Description:
+ * This switch defines the default value to be used for the V.42bis
+ * data compression: <max_dict> parameter to be used on the Um interface.
+ * This value is used to reset the parameter value when a ATZ or AT&F
+ * command is processed.
+ *
+ * Restrictions:
+ * 512 - AT_CMP_MAX_DICT
+ *
+ * Default Value:
+ * AT_CMP_MAX_DICT
+ */
+#define AT_DEFAULT_CDS_MAX_DICT AT_CMP_MAX_DICT
+
+
+/* ---------------------------------------------------------------------
+ * Name: Local AT-Parameter Default Value: +CPS
+ *
+ * Description:
+ * This switch defines the default value to be used for the
+ * Packet Data Service Option parameter.
+ * This value is used to reset the parameter value when a ATZ or AT&F
+ * command is processed.
+ *
+ * Restrictions:
+ * 7, 8, 15, 16, 22, 23, 24, 25, 26, 27, 28, 29,
+ * 4103, 4104
+ *
+ * Default Value:
+ * 4103
+ */
+#define AT_DEFAULT_CPS 59
+
+/* ---------------------------------------------------------------------
+ * Name: Local AT-Parameter Default Value: +CMUX
+ *
+ * Description:
+ * This switch defines the default value to be used for the "Select
+ * Multiplex Option" parameter.
+ * This value is used to reset the parameter value when a ATZ or AT&F
+ * command is processed.
+ *
+ * Restrictions:
+ * 1 - 2
+ *
+ * Default Value:
+ * 2
+ */
+#define AT_DEFAULT_CMUX 2
+
+/* ---------------------------------------------------------------------
+ * Name: Local AT-Parameter Default Value: +FPR
+ *
+ * Description:
+ * This switch defines the default value to be used for the "Serial
+ * Port Rate Control" parameter.
+ * This value is used to reset the parameter value when a ATZ or AT&F
+ * command is processed and +FCLASS = 2.0.
+ *
+ * Restrictions:
+ * Any value from the following list up to the value specified by
+ * AT_DPD_MAX_FPR:
+ * FR_AUTOBAUD,
+ * FR_19200
+ *
+ * Default Value:
+ * FR_AUTOBAUD
+ */
+#define AT_DEFAULT_FPR FR_19200
+
+/* ---------------------------------------------------------------------
+ * Name: NSPE Capabilities: Maximum TX Request Size
+ *
+ * Description:
+ * This switch defines the maximum size (in bytes) which AppInt may
+ * specify in a nspeAiTxReq call. AppInt requires this parameter to
+ * be at least 98 bytes so that the longest EIA-617 in-band command
+ * may be transmitted in a single TxReq. The upper bound for this
+ * parameter is determined by the MBUF size and high water mark settings
+ * configured for NSPE.
+ *
+ * Restrictions:
+ * 98 - 65535
+ *
+ * Default Value:
+ * 1024
+ */
+#define AT_NSPE_MAX_TXREQ_LEN 1024
+
+
+/* ---------------------------------------------------------------------
+ * Name: Data Transfer Behavior
+ *
+ * Description:
+ * This switch defines the maximum amount of time (in msec) AppInt will
+ * allow reverse channel User Data to sit in the V.42bis compressor or
+ * the TCP layer of NSPE. When this timer expires, AppInt will flush the
+ * compressor (if compression is active and if there could be partially
+ * matched User Data strings in the compressor) and push data out of the
+ * TCP layer.
+ *
+ * Restrictions:
+ * 1 - 65535
+ *
+ * Default Value:
+ * 100
+ */
+#define AT_STALE_DATA_TMO 100
+
+
+/* ---------------------------------------------------------------------
+ * Name: AppInt Capabilities: Maximum AT-command line length
+ *
+ * Description:
+ * This switch defines the maximum size of an AT-command line in
+ * COMMAND state as well as the largest single AT-command which may be
+ * reflected by the IWF in ONLINE state.
+ *
+ * For COMMAND state, this size includes the initial "AT" and trailing
+ * <s3><s4> characters.
+ *
+ * The longest single AT-command in the IS-707 repertoire (AT+FNS=) requires
+ * 280 characters. The second longest command (AT+CFG=) requires 258
+ * characters. AppInt allows the data from repetitive AT+FNS= and AT+CFG=
+ * commands to be appended to the existing parameter data. Therefore, with
+ * a cooperating TE2, this tuning parameter may be safely reduced to the
+ * maximum length of the third longest single AT-command: AT+MA=
+ * (48 characters).
+ *
+ * Restrictions:
+ * 48 - 65535
+ *
+ * Default Value:
+ * 280
+ */
+#ifdef SYS_OPTION_ENHANCEDAT
+#define AT_MAX_AT_CMD_LEN ATC_ENHANCED_AT_CMD_LEN
+#else
+#define AT_MAX_AT_CMD_LEN 280
+#endif
+
+
+/* ---------------------------------------------------------------------
+ * Name: Compression Negotiation Timeout
+ *
+ * Description:
+ * This switch defines the amount of time (in msec) AppInt will wait for
+ * the Um data compression negotiation procedure to complete.
+ * This timer is activated only if the +CDS.<compressionNegotiation>
+ * parameter is enabled.
+ * If the timer expires and the data compression specified by the other
+ * +CDS parameters has not been obtained, AppInt will disconnect the call.
+ *
+ * Restrictions:
+ * 1 - 65535
+ *
+ * Default Value:
+ * 5000
+ */
+#define AT_CN_TMO 5000
+
+/* ---------------------------------------------------------------------
+ * Name: Allow Invalid Body Characters
+ *
+ * Description:
+ * Setting this switch to KAL_TRUE disables EIA-617 extended command body
+ * character validation. This overcomes a bug in some IWF implementations.
+ *
+ * Restrictions:
+ * KAL_FALSE, KAL_TRUE
+ *
+ * Default Value:
+ * KAL_TRUE
+ */
+#define AT_ALLOW_INVALID_BODY_CHARS KAL_TRUE
+
+/* ---------------------------------------------------------------------
+ * Name: Allow Invalid Body Characters
+ *
+ * Description:
+ * This switch determines whether or not AppInt will upload an ATM1
+ * (speaker-on-until-connect) command to the IWF.
+ * This switch should only be set to KAL_TRUE if the MT software supports
+ * the multiply connected service option configuration and service
+ * option switching functions described in IS-707-A.4, section 4.1(b)
+ *
+ * Restrictions:
+ * KAL_FALSE, KAL_TRUE
+ *
+ * Default Value:
+ * KAL_FALSE
+ */
+#define AT_UPLOAD_ATM KAL_FALSE
+
+/* ---------------------------------------------------------------------
+ * Name: Packet Data Service Options
+ *
+ * Description:
+ * These switches define the values which AppInt will accept for
+ * the +CPS AT-command.
+ *
+ * Restrictions:
+ * KAL_FALSE, KAL_TRUE
+ *
+ * Default Value:
+ * AT_CPS_SO_07: KAL_TRUE
+ * AT_CPS_SO_08: KAL_TRUE
+ * AT_CPS_SO_15: KAL_TRUE
+ * AT_CPS_SO_16: KAL_TRUE
+ *
+ * AT_CPS_SO_22: KAL_FALSE
+ * AT_CPS_SO_23: KAL_FALSE
+ * AT_CPS_SO_24: KAL_FALSE
+ * AT_CPS_SO_25: KAL_FALSE
+ * AT_CPS_SO_26: KAL_FALSE
+ * AT_CPS_SO_27: KAL_FALSE
+ * AT_CPS_SO_28: KAL_FALSE
+ * AT_CPS_SO_29: KAL_FALSE
+ *
+ * AT_CPS_SO_4103: KAL_TRUE
+ * AT_CPS_SO_4104: KAL_TRUE
+ */
+#define AT_CPS_SO_07 KAL_TRUE
+#define AT_CPS_SO_08 KAL_TRUE
+#define AT_CPS_SO_15 KAL_TRUE
+#define AT_CPS_SO_16 KAL_TRUE
+
+#define AT_CPS_SO_22 KAL_TRUE
+#define AT_CPS_SO_23 KAL_TRUE
+#define AT_CPS_SO_24 KAL_TRUE
+#define AT_CPS_SO_25 KAL_TRUE
+
+#define AT_CPS_SO_26 KAL_FALSE
+#define AT_CPS_SO_27 KAL_FALSE
+#define AT_CPS_SO_28 KAL_FALSE
+#define AT_CPS_SO_29 KAL_FALSE
+
+#define AT_CPS_SO_33 KAL_TRUE
+#define AT_CPS_SO_59 KAL_TRUE
+#define AT_CPS_SO_69 KAL_TRUE
+
+#define AT_CPS_SO_4103 KAL_TRUE
+#define AT_CPS_SO_4104 KAL_TRUE
+
+
+/* ---------------------------------------------------------------------
+ * Name: Maximum Browser Digits
+ *
+ * Description:
+ * This switch defines the maximum string length which can be returned by
+ * the cfgAiGetBrowserDigits function, excluding the NULL terminator.
+ *
+ * Restrictions:
+ * 1 - 255
+ *
+ * Default Value:
+ * 20
+ */
+#define AT_MAX_BROWSER_DIGITS 20
+
+#ifdef MTK_CBP
+/* ---------------------------------------------------------------------
+ * Name: SYS ACTIVED BAND
+ *
+ * Default Value:
+ * VAL_SYS_BAND_CLASS_INVALID_MASK 0XFFFF FFFF
+ */
+
+#define AT_DEFAULT_SYS_ACTIVED_BAND_CLASS_MASK 0XFFFFFFFF
+#endif
+
+#endif /* _AI_TUNE_H */
diff --git a/mcu/interface/protocol/l4_c2k/valconnectivity.h b/mcu/interface/protocol/l4_c2k/valconnectivity.h
new file mode 100644
index 0000000..b2af35e
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valconnectivity.h
@@ -0,0 +1,87 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2009-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef _VALCONNECTIVITY_H_
+#define _VALCONNECTIVITY_H_
+/*****************************************************************************
+*
+* FILE NAME : valconnectivity.h
+*
+* DESCRIPTION : Val Connectivity API
+*
+* This include file provides system wide global type declarations and
+* constants
+*
+*****************************************************************************/
+#include "valapi.h"
+
+typedef enum
+{
+ ERI_VERSION_NUMBER, /* kal_uint16 */
+ HRPD_ROAMING_NETWORK, /* char a[MAX_ERI_TEXT_LENGTH+1] */
+ HRPD_RSSI, /* kal_int32 */
+ HRPD_RSSI_DBM, /* kal_int32 */
+ HRPD_SESSION_OPENED, /* kal_bool */
+ HRPD_NETWORK_ACQUIRED, /* kal_bool */
+ HRPD_ROAMING_INDICATOR, /* kal_uint32 */
+ HSPD_BYTE_COUNT_STATS, /* ValStatPeekRspMsgT */
+ HSPD_STATE, /* ValRptCpEventT */
+ CDMA1X_IN_SERVICE, /* kal_bool */
+ CDMA1X_ON_TRAFFIC, /* kal_bool */
+ CDMA1X_ROAMING_INDICATOR, /* kal_uint32 */
+ CDMA1X_ROAMING_NETWORK, /* char a[MAX_ERI_TEXT_LENGTH+1] */
+ CDMA1X_RSSI, /* kal_int32 */
+ CDMA1X_RSSI_DBM, /* kal_int32 */
+ CONN_STATUS, /* ValWmcConnStatusT */
+ CONN_LAST_NETWORK_ERROR, /* ValWmcNetworkErrorT */
+ OTASP_STATE, /* ValOtaStatusIndT */
+ ORIG_ABORT_REASON, /* ValRptCpEventT */
+ NUM_VAL_CONN_PARMS
+} ValConnParmT;
+
+void ValConnGetStatCntInfo(ValStatPeekRspMsgT* PeekRspMsg);
+void ValConnSetParm(ValConnParmT ParmType, void* Parm);
+void* ValConnGetParm(ValConnParmT ParmType);
+#endif /* #ifndef _VALCONNECTIVITY_H_ */
+
+
diff --git a/mcu/interface/protocol/l4_c2k/valdbmapi.h b/mcu/interface/protocol/l4_c2k/valdbmapi.h
new file mode 100644
index 0000000..24a504a
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valdbmapi.h
@@ -0,0 +1,715 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2007-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef VALDBMAPI_H
+#define VALDBMAPI_H
+/*************************************************************************************************
+*
+* FILE NAME : valdbmapi.h
+*
+* DESCRIPTION : This file contains the declarations, definitions
+* and data structures used to interface to the
+* VAL for the DBM API.
+*
+*
+* HISTORY :
+* See Log at end of file
+*
+**************************************************************************************************/
+#include "sysdefs.h"
+#include "pswapi.h"
+#include "cssapi.h"
+#include "uimapi.h"
+#include "do_clcapi.h"
+#include "hlpapi.h"
+#include "sysapi.h"
+
+#include "valapi.h"
+
+#define VAL_DBM_MAX_REG_TASK 2
+
+#define DUMMY_REGID_COPY_DATA 0xFF /* Reg Id used in Set/Get when data has to be copied into the message buffer */
+#define DUMMY_REGID_USE_DATAPTR 0xFE /* Reg Id used in Set/Get when valid data pointer is supplied (i.e. data does not need to be copied in message buffer) */
+
+/* Messages sent between VAL and tasks managing parameters */
+/* that can be requested through VAL */
+/* Request from VAL ---> PSW, or CSS, or HLP, or CLC, etc... */
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+ RegIdT RegId; /* RegId of the requester */
+ kal_uint8 ParmId;
+ kal_uint8 opType;
+ kal_uint32 length;
+ kal_uint8* dataPtr;
+#ifdef MTK_PLT_ON_PC_UT
+ union {
+ Css1xBsrTimerDuration_APIStruct bsr1xTimerDuration;
+ Css1xAvoidanceTimerDuration_APIStruct avoidance1xTimerDuration;
+ CssDOBsrTimerDuration_APIStruct bsrDOTimerDuration;
+ Css1xManualAvoidSid_APIStruct manual1xAvoidSid;
+ CssSetMruChannel_APIStruct mruChannel;
+ CssSetChannleLockInfo_APIStruct channleLockInfo;
+ CssTimerDuration_APIStruct timerDuration;
+ HlpAkaPassword_APIStruct akaPsd;
+ HlpAkaProfileData_APIStruct akaProfileData;
+ } data;
+#endif
+} ValGenericSetParmMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo; /*Response routing information */
+ RegIdT RegId; /* RegId of the requester */
+ kal_uint8 ParmId;
+ kal_uint8 opType;
+ kal_uint32 length;
+ kal_bool allocBuffer; /* If true, the data will be within the response, otherwise that will be written at address pointed to by dataPtr */
+ kal_uint8* dataPtr;
+#ifdef MTK_PLT_ON_PC_UT
+ union {
+ Css1xBsrTimerDuration_APIStruct bsr1xTimerDuration;
+ Css1xAvoidanceTimerDuration_APIStruct avoidance1xTimerDuration;
+ CssDOBsrTimerDuration_APIStruct bsrDOTimerDuration;
+ Css1xManualAvoidSid_APIStruct manual1xAvoidSid;
+ CssGetMruChannel_APIStruct mruChannel;
+ } data;
+#endif
+} ValGenericGetParmMsgT;
+
+/* Response from PSW, CSS, HLP, CLC, etc... ---> VAL */
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+ RegIdT RegId; /* RegId of the requester (echo from the request message) */
+ kal_uint8 ParmId;
+ kal_uint8 result;
+ kal_uint32 length;
+ kal_uint8* dataPtr;
+#ifdef MTK_PLT_ON_PC_UT
+ union {
+ Css1xBsrTimerDuration_APIStruct bsr1xTimerDuration;
+ Css1xAvoidanceTimerDuration_APIStruct avoidance1xTimerDuration;
+ CssDOBsrTimerDuration_APIStruct bsrDOTimerDuration;
+ Css1xManualAvoidSid_APIStruct manual1xAvoidSid;
+ CssGetMruChannel_APIStruct mruChannel;
+ cssChannleLockInfo channleLockInfo;
+ CssTimerDuration_APIStruct timerDuration;
+ } data;
+#endif
+} ValGenericGetParmRspMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo; /* Response routing information */
+ RegIdT RegId; /* RegId of the requester (echo from the request message) */
+ kal_uint8 ParmId;
+ kal_uint8 result;
+} ValGenericSetParmRspMsgT;
+
+
+/* Messages sent between VAL and other tasks requesting parameters */
+/* for example between VAL and ETS */
+/* To VAL */
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint8 OperationId;
+ kal_uint8 OperationType;
+ kal_uint8 data;
+} ValDbmApiSetParmMsgT;
+
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ kal_uint8 OperationId;
+ kal_uint8 OperationType;
+ kal_uint8 data;
+} ValDbmApiGetParmMsgT;
+
+/* From VAL */
+typedef struct
+{
+ kal_uint8 ParmId;
+ kal_uint8 result;
+} ValDbmApiSetParmRspMsgT;
+
+typedef struct
+{
+ kal_uint8 ParmId;
+ kal_uint8 result;
+ kal_uint32 length;
+ kal_uint8 data;
+} ValDbmApiGetParmRspMsgT, ValDbmEtsGetParmRspMsgT;
+
+typedef struct
+{
+ kal_uint8 ParmId;
+ kal_uint8 result;
+ kal_uint8 data;
+} ValDbmEtsGetParmNoLengthRspMsgT;
+
+typedef enum
+{
+ VAL_DBM_GET_HPSD_SEG_MSG,
+ VAL_PSW_EVT_GET_MS_PARM_RSP,
+ VAL_PSW_EVT_SET_MS_PARM_RSP,
+ VAL_HL_EVT_GET_MS_PARM_RSP,
+ VAL_HL_EVT_SET_MS_PARM_RSP,
+ VAL_CLC_EVT_GET_DO_PARM_RSP,
+ VAL_CLC_EVT_SET_DO_PARM_RSP,
+ VAL_UI_EVT_SET_PARM_RSP,
+ VAL_CLC_EVT_SET_DO_PARM_NORSP,
+ VAL_UICC_EVT_SET_PARM_RSP,
+ VAL_UICC_EVT_GET_PARM_RSP,
+ VAL_CSS_EVT_GET_PARM_RSP,
+ VAL_CSS_EVT_SET_PARM_RSP,
+ VAL_DBM_EVENT_END_LIST
+} ValDbmEventIdT;
+
+
+/*===========================================================================
+ SYS Set and Get Parm Defines
+===========================================================================*/
+typedef enum
+{
+ SYS_PARM_SET_BAND_CLASS,
+ SYS_PARM_GET_BAND_CLASS,
+ SYS_PARM_SET_SUB_CLASS,
+ SYS_PARM_GET_SUB_CLASS,
+ SYS_PARM_OPERATION_ID_END_LIST
+} SysParmOperationId;
+
+typedef enum
+{
+ SYS_PARM_MIN_VALUE,
+ SYS_PARM_MAX_VALUE,
+ SYS_PARM_DEFAULT_VALUE,
+ SYS_PARM_CUSTOM_VALUE,
+ SYS_PARM_OP_TYPE_LIST_END
+} SysParmOperationType;
+
+typedef enum
+{
+ SYS_PARM_OPERATION_SUCCESS,
+ SYS_PARM_OPERATION_FAIL_READ_NOT_ALLOWED,
+ SYS_PARM_OPERATION_FAIL_WRITE_NOT_ALLOWED,
+ SYS_PARM_OPERATION_FAIL_VALUE_OUT_OF_RANGE,
+ SYS_PARM_OPERATION_GENERAL_FAILURE,
+ SYS_PARM_OPERATION_FAIL_OP_TYPE_NOT_SUPPORTED,
+ SYS_PARM_OPERATION_NOT_SUPPORTED_BAND_CLASS,
+ SYS_PARM_OPERATION_NOT_SUPPORTED_SUB_CLASS,
+ SYS_PARM_OPERATION_RESULT_END_LIST
+} SysParmAccessResultCode;
+
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ SysParmOperationId OperationId;
+ SysParmOperationType OperationType;
+ kal_uint8 data;
+} ValDbmSysSetParmETSMsgT;
+
+typedef struct
+{
+ ExeRspMsgT rspInfo;
+ SysParmOperationId OperationId;
+ SysParmOperationType OperationType;
+ kal_uint8 *data;
+} ValDbmSysGetParmETSMsgT;
+
+typedef struct
+{
+ SysParmAccessResultCode result;
+} ValDbmSysSetBandClassParmRspMsgT;
+
+typedef struct
+{
+ kal_uint8 BandClass;
+ kal_uint8 Supported;
+} SysSetBandClassParmT;
+
+typedef struct
+{
+ SysParmAccessResultCode result;
+} ValDbmSysSetSubClassParmRspMsgT;
+
+typedef struct
+{
+ kal_uint8 BandClass;
+ kal_uint8 SubClass;
+ kal_uint8 Status;
+} SysSetSubClassParmT;
+
+typedef struct
+{
+ kal_uint8 BandClass;
+} ValDbmSysGetBandClassParmT;
+
+typedef struct
+{
+ kal_uint8 BandClass;
+ kal_uint8 Supported;
+} ValBandClassRecordT;
+
+typedef struct
+{
+ kal_uint8 NumberRecords;
+ ValBandClassRecordT Record[1];
+} ValDbmSysGetBandClassParmRspMsgT;
+
+typedef struct
+{
+ kal_uint8 BandClass;
+} ValDbmSysGetSubClassParmT;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*===========================================================================
+
+FUNCTION ValDbmInit()
+
+DESCRIPTION Initialize the Dbm Val Module
+
+PARAMETERS None
+
+RETURN VALUE None
+
+===========================================================================*/
+void ValDbmInit( void );
+
+/*===========================================================================
+
+FUNCTION: ValDbmProcessEvent
+
+DESCRIPTION: This function processes the event received and calls the
+ registered call back.
+
+PARAMETERS: ValLbsEventIdT EventId, void *EventMsgP
+
+RETURN VALUE: None
+
+===========================================================================*/
+void ValDbmProcessEvent( ValDbmEventIdT EventId, void* EventMsgP );
+
+/***************************************************************************
+
+FUNCTION ValDbmRegister
+
+DESCRIPTION This function registers a callback for all Dbm related events.
+
+PARAMETERS Callback - The callback function to be called for the notification of LBS
+ services events.
+
+RETURN VALUE The assigned registration ID of the subscriber.
+
+*****************************************************************************/
+RegIdT ValDbmRegister( ValEventFunc Callback );
+
+/***************************************************************************
+
+FUNCTION ValDbmUnregister
+
+DESCRIPTION This function unregisters the given client so that it won't receive additional
+ Dbm services related events.
+
+PARAMETERS RegId - The assigned registration ID of the subscriber.
+
+RETURN VALUE None
+
+*****************************************************************************/
+void ValLbsUnregister( RegIdT RegId );
+
+
+/*****************************************************************************
+ * PSW SET/GET PARAMETERS API *
+ *****************************************************************************/
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmSetPswParameter
+ DESCRIPTION: Process a request to set a parameter maintained by PSW.
+ PARAMETERS: RegIdT: Identifier of registered application requesting service
+ ExeRspMsgT*: routing info for the response
+ PswParmOperationalId: Parameter that is being requested
+ void*: Memory allocated for PSW to retrieve contents
+ kal_uint32: length of valid data in dataPtr
+------------------------------------------------------------------------------*/
+void ValDbmSetPswParameter(RegIdT RegId, ExeRspMsgT* pRspInfo, PswParmOperationId parm_op_id,
+ PswParmOperationType opType,void* dataPtr, kal_uint32 length);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmSetPswParm
+ DESCRIPTION: Deprecated version of ValDbmSetPswParameter
+------------------------------------------------------------------------------*/
+void ValDbmSetPswParm(RegIdT RegId, PswParmOperationId parm_op_id,
+ PswParmOperationType opType,void* dataPtr, kal_uint32* length);
+
+void ValDbmSetPswParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmGetPswParameter
+ DESCRIPTION: Process a request to get a parameter maintained by PSW.
+ PARAMETERS: RegIdT: Identifier of registered application requesting service
+ ExeRspMsgT*: routing info for the response
+ PswParmOperationalId: Parameter that is being requested
+ void*: Memory allocated for PSW to put contents
+ kal_uint32: length of data expected to be populated in dataPtr
+------------------------------------------------------------------------------*/
+void ValDbmGetPswParameter(RegIdT RegId, ExeRspMsgT* pRspInfo, PswParmOperationId parm_op_id,
+ PswParmOperationType opType, void* dataPtr, kal_uint32 length);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmGetPswParm
+ DESCRIPTION: Deprecated version of ValDbmGetPswParameter
+------------------------------------------------------------------------------*/
+void ValDbmGetPswParm(RegIdT RegId, PswParmOperationId parm_op_id,
+ PswParmOperationType opType,void* dataPtr, kal_uint32* length);
+
+void ValDbmGetPswParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+
+
+/*****************************************************************************
+ * CSS SET/GET PARAMETERS API *
+ *****************************************************************************/
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmSetCssParameter
+ DESCRIPTION: Process a request to set a parameter maintained by CSS task.
+ PARAMETERS: RegIdT: Identifier of registered application requesting service
+ ExeRspMsgT*: routing info for the response
+ PswParmOperationalId: Parameter that is being requested
+ void*: Memory allocated for PSW to retrieve contents
+ kal_uint32: length of valid data in dataPtr
+------------------------------------------------------------------------------*/
+void ValDbmSetCssParameter(RegIdT RegId, ExeRspMsgT* pRspInfo, CssParmOperationId parm_op_id,
+ CssParmOperationType opType, void* dataPtr, kal_uint32 length);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmSetCssParm
+ DESCRIPTION: Deprecated version of ValDbmSetCssParameter
+------------------------------------------------------------------------------*/
+void ValDbmSetCssParm(RegIdT RegId, CssParmOperationId parm_op_id,
+ CssParmOperationType opType,void* dataPtr, kal_uint32* length);
+
+void ValDbmSetCssParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmGetCssParameter
+ DESCRIPTION: Process a request to get a parameter maintained by CSS.
+ PARAMETERS: RegIdT: Identifier of registered application requesting service
+ ExeRspMsgT*: routing info for the response
+ PswParmOperationalId: Parameter that is being requested
+ void*: Memory allocated for PSW to put contents
+ kal_uint32: length of data expected to be populated in dataPtr
+------------------------------------------------------------------------------*/
+void ValDbmGetCssParameter(RegIdT RegId, ExeRspMsgT* pRspInfo, CssParmOperationId parm_op_id,
+ CssParmOperationType opType, void* dataPtr, kal_uint32 length);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmGetCssParm
+ DESCRIPTION: Deprecated version of ValDbmGetCssParameter
+------------------------------------------------------------------------------*/
+void ValDbmGetCssParm(RegIdT RegId, CssParmOperationId parm_op_id,
+ CssParmOperationType opType,void* dataPtr, kal_uint32* length);
+
+void ValDbmGetCssParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+
+
+/*****************************************************************************
+ * UIM SET/GET PARAMETERS API *
+ *****************************************************************************/
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmSetUiccParameter
+ DESCRIPTION: Process a request to set a parameter maintained by UIM task.
+ PARAMETERS: RegIdT: Identifier of registered application requesting service
+ ExeRspMsgT*: routing info for the response
+ PswParmOperationalId: Parameter that is being requested
+ void*: Memory allocated for PSW to retrieve contents
+ kal_uint32: length of valid data in dataPtr
+------------------------------------------------------------------------------*/
+void ValDbmSetUiccParameter(RegIdT RegId, ExeRspMsgT* pRspInfo, UiccParmOperationId parm_op_id,
+ UiccParmOperationType opType,void* dataPtr, kal_uint32 length);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmSetUiccParm
+ DESCRIPTION: Deprecated version of ValDbmSetUiccParameter
+------------------------------------------------------------------------------*/
+void ValDbmSetUiccParm(RegIdT RegId, UiccParmOperationId parm_op_id,
+ UiccParmOperationType opType,void* dataPtr, kal_uint32* length);
+
+void ValDbmSetUiccParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmGetUiccParameter
+ DESCRIPTION: Process a request to get a parameter maintained by UIM task.
+ PARAMETERS: RegIdT: Identifier of registered application requesting service
+ ExeRspMsgT*: routing info for the response
+ PswParmOperationalId: Parameter that is being requested
+ void*: Memory allocated for PSW to put contents
+ kal_uint32: length of data expected to be populated in dataPtr
+------------------------------------------------------------------------------*/
+void ValDbmGetUiccParameter(RegIdT RegId, ExeRspMsgT* pRspInfo, UiccParmOperationId parm_op_id,
+ UiccParmOperationType opType,void* dataPtr, kal_uint32 length);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmGetUiccParm
+ DESCRIPTION: Deprecated version of ValDbmGetUiccParameter()
+------------------------------------------------------------------------------*/
+void ValDbmGetUiccParm(RegIdT RegId, UiccParmOperationId parm_op_id,
+ UiccParmOperationType opType,void* dataPtr, kal_uint32* length);
+
+void ValDbmGetUiccParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+
+
+/*****************************************************************************
+ * CLC SET/GET PARAMETERS API *
+ *****************************************************************************/
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmSetDoParameter
+ DESCRIPTION: Process a request to set a parameter maintained by PSW.
+ PARAMETERS: RegIdT: Identifier of registered application requesting service
+ ExeRspMsgT*: routing info for the response
+ PswParmOperationalId: Parameter that is being requested
+ void*: Memory allocated for PSW to retrieve contents
+ kal_uint32: length of valid data in dataPtr
+------------------------------------------------------------------------------*/
+void ValDbmSetDoParameter(RegIdT RegId, ExeRspMsgT* pRspInfo, DoParmOperationId parm_op_id,
+ DoParmOperationType opType, void* dataPtr, kal_uint32 length);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmSetDoParm
+ DESCRIPTION: Deprecated version of ValDbmSetDoParameter()
+------------------------------------------------------------------------------*/
+void ValDbmSetDoParm(RegIdT RegId, DoParmOperationId parm_op_id, void* dataPtr, kal_uint32* length);
+
+void ValDbmSetDoParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+#ifdef MTK_CBP
+kal_uint16 valTransformValCustomizedParaDataPackedType(kal_uint8* srcData,kal_uint8* desData);
+void valTransformValCustomizedParaDataType(kal_uint8* srcData ,kal_uint8* desData);
+kal_uint16 valGetCustomizedParmNumBytes();
+#endif
+
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmGetDoParameter
+ DESCRIPTION: Process a request to get a parameter maintained by CLC task.
+ PARAMETERS: RegIdT: Identifier of registered application requesting service
+ ExeRspMsgT*: routing info for the response
+ PswParmOperationalId: Parameter that is being requested
+ void*: Memory allocated for PSW to put contents
+ kal_uint32: length of data expected to be populated in dataPtr
+------------------------------------------------------------------------------*/
+void ValDbmGetDoParameter(RegIdT RegId, ExeRspMsgT* pRspInfo, DoParmOperationId parm_op_id,
+ DoParmOperationType opType,void* dataPtr, kal_uint32 length);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmGetDoParm
+ DESCRIPTION: Deprecated version of ValDbmGetDoParameter()
+------------------------------------------------------------------------------*/
+void ValDbmGetDoParm(RegIdT RegId, DoParmOperationId parm_op_id, void *paramPtr, kal_uint32 *len, void* dataPtr, kal_uint32* length);
+
+void ValDbmGetDoParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+
+
+/*****************************************************************************
+ * HLP SET/GET PARAMETERS API *
+ *****************************************************************************/
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmSetHlpParameter
+ DESCRIPTION: Process a request to set a parameter maintained by PSW.
+ PARAMETERS: RegIdT: Identifier of registered application requesting service
+ ExeRspMsgT*: routing info for the response
+ PswParmOperationalId: Parameter that is being requested
+ void*: Memory allocated for PSW to retrieve contents
+ kal_uint32: length of valid data in dataPtr
+------------------------------------------------------------------------------*/
+void ValDbmSetHlpParameter(RegIdT RegId, ExeRspMsgT* pRspInfo, HlpParmOperationId parm_op_id,
+ HlpParmOperationType opType, void* dataPtr, kal_uint32 length);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValSetHlpParm
+ DESCRIPTION: Deprecated version of ValDbmSetHlpParameter
+------------------------------------------------------------------------------*/
+void ValSetHlpParm(RegIdT RegId, HlpParmOperationId parm_op_id, HlpParmOperationType opType,
+ kal_uint8* dataPtr, kal_uint32* length);
+
+void ValDbmSetHlpParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValDbmGetHlpParameter
+ DESCRIPTION: Process a request to get a parameter maintained by PSW.
+ PARAMETERS: RegIdT: Identifier of registered application requesting service
+ ExeRspMsgT*: routing info for the response
+ PswParmOperationalId: Parameter that is being requested
+ void*: Memory allocated for PSW to put contents
+ kal_uint32: length of data expected to be populated in dataPtr
+------------------------------------------------------------------------------*/
+void ValDbmGetHlpParameter(RegIdT RegId, ExeRspMsgT* pRspInfo, HlpParmOperationId parm_op_id,
+ HlpParmOperationType opType, void* dataPtr, kal_uint32 length);
+/*----------------------------------------------------------------------------
+ FUNCTION NAME: ValGetHlpParm
+ DESCRIPTION: Deprecated version of ValDbmGetHlpParameter()
+------------------------------------------------------------------------------*/
+void ValGetHlpParm(RegIdT RegId, HlpParmOperationId parm_op_id,
+ HlpParmOperationType opType, void* dataPtr, kal_uint32* length);
+
+void ValDbmGetHlpParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+
+
+/*****************************************************************************
+ *****************************************************************************/
+
+void ValDbmAllDataInit(ValAllDataInitMsgT *MsgP);
+/*===========================================================================
+FUNCTION: ValDbmSetUiParmMsg
+DESCRIPTION: This function processes a message to change a NV UI parameter
+PARAMETERS: MsgDataP, MsgSize
+RETURN VALUE: None
+===========================================================================*/
+void ValDbmSetUiParmMsg(void *MsgDataP, kal_uint32 MsgSize );
+
+/*===========================================================================
+FUNCTION: ValDbmGetUiParmMsg
+DESCRIPTION: This function processes a message to change a NV UI parameter
+PARAMETERS: MsgDataP, MsgSize
+RETURN VALUE: None
+===========================================================================*/
+void ValDbmGetUiParmMsg(void *MsgDataP, kal_uint32 MsgSize );
+
+/*===========================================================================
+FUNCTION: ValDbmMDNUpdated
+DESCRIPTION: This function processes a message from PSW that the MDN has been updated
+PARAMETERS: MsgDataP, MsgSize
+RETURN VALUE: None
+===========================================================================*/
+void ValDbmMDNUpdated(void *MsgDataP, kal_uint32 MsgSize );
+
+/*===========================================================================
+FUNCTION: ValDbmESNUpdated
+DESCRIPTION: This function processes a message from PSW that the ESN has been updated
+PARAMETERS: MsgDataP, MsgSize
+RETURN VALUE: None
+===========================================================================*/
+void ValDbmESNUpdated(void *MsgDataP, kal_uint32 MsgSize );
+
+/*==========================================================================
+FUNCTION: ValDbmHlpSegInitRsp()
+DESCRIPTION: This function passes HLP Set Parm results from valhspdapi
+ to valdbm.
+PARAMETERS: ValDbmApiSetParmRspMsgT result
+RETURN VALUE: void
+===========================================================================*/
+void ValDbmHlpSegInitRsp(ValDbmApiSetParmRspMsgT* MsgP);
+
+
+/*===========================================================================
+
+FUNCTION: ValDbmSetSysParmMsg
+
+DESCRIPTION: This function processes an ETS Message and
+
+PARAMETERS: MsgDataP, MsgSize
+
+RETURN VALUE: None
+
+===========================================================================*/
+extern void ValDbmSetSysParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+
+/*===========================================================================
+
+FUNCTION: ValDbmGetSysParmMsg
+
+DESCRIPTION: This function processes an ETS Message
+
+PARAMETERS: MsgDataP, MsgSize
+
+RETURN VALUE: None
+
+===========================================================================*/
+extern void ValDbmGetSysParmMsg(void *MsgDataP, kal_uint32 MsgSize);
+
+/*****************************************************************************
+ FUNCTION NAME: HwdDbmSetBandClassSupportTable
+
+ DESCRIPTION: Set Band Class
+
+ PARAMETERS: Message Pointer
+
+ RETURNS: SysParmAccessResultCode
+*****************************************************************************/
+extern SysParmAccessResultCode HwdDbmSetBandClassSupportTable(ValDbmSysSetParmETSMsgT *MsgDataP);
+
+/*****************************************************************************
+ FUNCTION NAME: HwdDbmSetSubClass
+
+ DESCRIPTION: Set Sub Class for Specified Band Class
+
+ PARAMETERS: Message Pointer
+
+ RETURNS: SysParmAccessResultCode
+*****************************************************************************/
+extern SysParmAccessResultCode HwdDbmSetSubClass(ValDbmSysSetParmETSMsgT *MsgDataP);
+
+/*****************************************************************************
+ FUNCTION NAME: HwdDbmGetBandClassSupportTable
+
+ DESCRIPTION: Get Band Class
+
+ PARAMETERS: Message Pointer
+
+ RETURNS:
+*****************************************************************************/
+extern void HwdDbmGetBandClassSupportTable(ValDbmSysGetParmETSMsgT *MsgDataP);
+
+/*****************************************************************************
+ FUNCTION NAME: HwdDbmGetSubClass
+
+ DESCRIPTION: Get Sub Class for Specified Band Class
+
+ PARAMETERS: Message Pointer
+
+ RETURNS:
+*****************************************************************************/
+extern void HwdDbmGetSubClassSupport(ValDbmSysGetParmETSMsgT *MsgDataP);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*__VAL_DBM_H__*/
+
+/*****************************************************************************
+* End of File
+*****************************************************************************/
+
+
diff --git a/mcu/interface/protocol/l4_c2k/valerrs.h b/mcu/interface/protocol/l4_c2k/valerrs.h
new file mode 100644
index 0000000..99dff60
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valerrs.h
@@ -0,0 +1,337 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2005-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef VALERRS_H
+#define VALERRS_H
+/*****************************************************************************
+
+ FILE NAME: valerrs.h
+
+ DESCRIPTION:
+
+ This file contains the fault codes for the VAL software unit.
+
+*****************************************************************************/
+
+/*------------------------------------------------------------------------
+* The following definitions are fault ids for MonFault routine.
+*-----------------------------------------------------------------------*/
+
+typedef enum
+{
+ VAL_MSG_ID_ERR = 0,
+ VAL_KEY_ID_ERR,
+ VAL_STATE_ERR,
+ VAL_STARTUP_ERR,
+ VAL_DATABASES_NOT_PROG_ERR = 4,
+ VAL_DEEPSLEEP_REQUEST_ERR = 5,
+ VAL_MODEM_FAILURE_ERR = 6,
+#ifdef MTK_CBP
+ VAL_UNEXPECTED_OP_MODE_ERR,
+#endif
+ /* voice memo */
+ VAL_ERR_VMEM_BUFFER_FULL = 0x10,
+ VAL_ERR_VMEM_CANNOT_DO_WRONG_STATE,
+ VAL_ERR_VMEM_RINGER_ACTIVE,
+ VAL_ERR_VMEM_BUFFER_EMPTY,
+ VAL_ERR_VMEM_GET_SPACE_ERR,
+ VAL_ERR_VMEM_DEVICE_FULL_ERR,
+ VAL_ERR_VMEM_REC_PCM_TO_FILE_ERR,
+
+ /* voice recognition */
+ VAL_ERR_VREC_INVALID_STATE = 0x20,
+ VAL_ERR_VREC_INVALID_MSG_FOR_STATE,
+ VAL_ERR_VREC_OPERATION_TIMEOUT,
+ VAL_ERR_VREC_SPURIOUS_TIMEOUT,
+ VAL_ERR_VREC_SECTOR_FULL,
+ VAL_ERR_VREC_VOCABULARY_FULL,
+ VAL_ERR_VREC_ENGINE_ERR,
+ VAL_ERR_VREC_COMPRESSED_BUFFER_FULL,
+ VAL_ERR_VREC_TEMPLATE_BUFFER_FULL,
+ VAL_ERR_VREC_VOCAB_EMPTY,
+ VAL_ERR_VREC_NAMETAG_NOT_FOUND,
+ VAL_ERR_VREC_TRAIN_BUFFER_TOO_SMALL,
+
+ /* Audio errors */
+ VAL_ERR_AUDIO_NOT_INITIALIZED = 0x35,
+ VAL_ERR_AUDIO_WRONG_VOLUME_MODE,
+ VAL_ERR_AUDIO_WRONG_TONE_TYPE,
+ VAL_ERR_AUDIO_NO_DATA,
+ VAL_ERR_AUDIO_FILE_READ_FAIL,
+ VAL_ERR_AUDIO_WRONG_DEVICE_MODE,
+ VAL_ERR_AUDIO_MUSIC_MALLOC_FAIL,
+ VAL_ERR_AUDIO_MUSIC_NOT_ENOUGH_MEM,
+ VAL_ERR_AUDIO_FILE_OPEN_FAIL,
+ VAL_ERR_AUDIO_FILE_GET_LENGTH_FAIL,
+ VAL_ERR_AUDIO_WRONG_MUSIC_TYPE,
+ VAL_ERR_AUDIO_GET_PLAYTIME_WHILE_ACTIVE,
+ VAL_ERR_AUDIO_INCOMPAT_MUSIC_DEVICE,
+ VAL_ERR_AUDIO_INPUT_PCM_FRAME_OVERFLOW,
+ VAL_ERR_AUDIO_OUTPUT_PCM_FRAME_OVERFLOW,
+
+ /* FSI errors */
+ VAL_ERR_FSI_INIT_FAILED = 0x45,
+ VAL_ERR_FSI_DOS_FS_INIT_FAIL,
+ VAL_ERR_FSI_DOS_FS_EXIT_FAIL,
+ VAL_ERR_FSI_SIDB_NOT_SUPPORTED,
+
+ /* Recentcall errors */
+ VAL_ERR_RC_FILE_CREATE_ERR = 0x55,
+ VAL_ERR_RC_FILE_READ_ERR,
+ VAL_ERR_RC_FILE_WRITE_ERR,
+ VAL_ERR_RC_FILE_DELETE_ERR,
+
+ /* BarCode errors */
+ VAL_ERR_BARCODE_FILE_DIRECTORY = 0x60,
+ VAL_ERR_BARCODE_READ_FSM,
+ VAL_ERR_BARCODE_WRITE_FSM,
+ VAL_ERR_BARCODE_READ_FAIL,
+ VAL_ERR_BARCODE_WRITE_FAIL,
+
+ /* Phb errors */
+ VAL_ERR_PHB_FILE_CREATE_ERR,
+ VAL_ERR_PHB_FILE_READ_ERR,
+ VAL_ERR_PHB_FILE_WRITE_ERR,
+ VAL_ERR_PHB_FILE_DELETE_ERR,
+ VAL_ERR_PHB_FILE_CLOSE_ERR,
+ VAL_ERR_PHB_NO_MEMORY_ERR,
+ VAL_ERR_PHB_INIT_ERR,
+
+ /* SMS errors */
+ VAL_ERR_SMS_NOT_READY_ERR = 0x70,
+ VAL_ERR_SMS_FILE_CREATE_ERR,
+ VAL_ERR_SMS_FILE_READ_ERR,
+ VAL_ERR_SMS_FILE_WRITE_ERR,
+
+ VAL_ERR_TOO_MANY_DIGIT_MSG_ID,
+ VAL_ERR_INVALID_CALLBACK_TIMER_ID,
+ VAL_ERR_INSUFFICIENT_TIMER_ID,
+ VAL_ERR_SMS_INVALID_FORMAT,
+ VAL_ERR_SMS_FILE_ALREADY_OPEN,
+
+ /* Display errors */
+ VAL_ERR_DISP_UNEXPECT_CALLBACK_ERR = 0x80,
+ VAL_ERR_DISP_EVENT_ALREADY_ACTIVE,
+ VAL_ERR_DISP_IMAGE_WIDTH_INVALID,
+ VAL_ERR_DISP_FILE_READ_ERR,
+ VAL_ERR_DISP_FILE_WRITE_ERR,
+ VAL_ERR_DISP_IMAGE_TYPE_INVALID,
+ VAL_ERR_DISP_FILE_HANDLE_INVALID,
+ VAL_ERR_DISP_MALLOC_FAIL,
+ VAL_ERR_DISP_NOT_ENOUGH_MEM,
+ VAL_ERR_DISP_IMAGE_NOT_STORED,
+
+ /* ATC errors*/
+ VAL_ERR_ATP_CHANNEL_DISABLED = 0x90,
+ VAL_ERR_CMD_NOT_SUPPORTED,
+ VAL_ERR_AT_DATA_RCVR_TIMEOUT,
+#ifdef MTK_CBP
+ VAL_ERR_TOO_LARGE_AT_CHAN,
+ VAL_ERR_TOO_LONG_AT_CMD_NAME,
+ VAL_ERR_NULL_AT_DATA_PTR,
+ VAL_ERR_EXCEED_ARRAY_LEN,
+ VAL_ERR_UNEXPECTED_ENG_INFO_SETTING,
+ VAL_ERR_TOO_MANY_UICC_SESSION_OPENED,
+ VAL_ERR_UICC_SESSION_NOT_FOUND,
+ VAL_ERR_UNEXPECTED_UICC_APDU_LEN,
+#endif
+#ifdef MTK_CBP //MTK_DEV_C2K_IRAT
+ VAL_ERR_UNEXPECTED_IP_ADDR_TYPE,
+ VAL_ERR_UNEXPECTED_RAT_TYPE,
+ VAL_ERR_UNEXPECTED_PSDM_RESULT,
+ VAL_ERR_INVALID_CGEV_EVENT,
+#endif
+#ifdef MTK_DEV_ETS_ENHANCEMENT
+ VAL_ERR_EXCEED_MAX_ETS_AT_CMD_LEN,
+#endif
+
+ /*Gps errors*/
+ VAL_ERR_GPS_INST_ID = 0xa0,
+ VAL_ERR_GPS_READ_SECURITY_CONFIG,
+ VAL_ERR_GPS_NEXT_STATE,
+ VAL_ERR_GPS_WRITE_SECURITY_CONFIG,
+ VAL_ERR_GPS_ENABLE_SECURITY,
+ VAL_ERR_GPS_ENABLE_SECURITY_2,
+ VAL_ERR_GPS_BASESSD_GET,
+ VAL_ERR_GPS_RAND_PERIOD_SET,
+ VAL_ERR_GPS_RAND_PERIOD_SET_2,
+ VAL_ERR_WRITE_SERVICE_CONFIG,
+ VAL_ERR_GPS_READ_ENCRYPT_CONFIG,
+ VAL_ERR_GPS_DNS_QUERY,
+ SLC_ERR_GPS_FILE_DIRECTORY,
+ VAL_ERR_GPS_READ_FSM,
+ VAL_ERR_GPS_WRITE_FSM,
+ VAL_ERR_GPS_CONFIG_FIX_MODE,
+ VAL_ERR_GPS_CONFIG_FIX_RATE,
+ VAL_ERR_GPS_OPEN_SESS_STATUS,
+ VAL_ERR_GPS_START_FIX_STATUS,
+ VAL_ERR_GPS_LOC_RESP,
+ VAL_ERR_GPS_GET_POS,
+ VAL_ERR_GPS_AES_RSP_STATUS,
+ VAL_ERR_GPS_NMEA_UPDATE,
+ VAL_ERR_GPS_DBM_READ_ID,
+ VAL_ERR_GPS_GSV_SEQ_NUM,
+ VAL_ERR_GPS_SESS_STATE,
+ VAL_ERR_GPS_WRITE_OFFSET_INFO,
+ VAL_ERR_GPS_LOC_ACTIVE_IND,
+#ifdef MTK_CBP
+ VAL_ERR_GPS_SESS_WITH_SAME_MODE,
+ VAL_ERR_GPS_SESS_NOT_FOUND,
+#endif
+
+ VAL_ERR_FAULT_LOG_API = 0xc0,
+#ifdef MTK_CBP
+ /* call id error */
+ VAL_ERR_UNEXPECTED_CALL_ID,
+
+ /* To avoid error ID conflict, move these three error codes to here */
+ VAL_ERR_AV_STRM_WD_BUF_SEM_TIMEOUT,
+ VAL_ERR_AV_STRM_RD_BUF_SEM_TIMEOUT,
+ VAL_ERR_AV_STRM_WD_BUF_OVERRIDE,
+#endif
+
+ VAL_ERR_MPC_MESSAGE_TYPE = 0xD0,
+ VAL_ERR_MPC_VER_ID,
+ VAL_ERR_MPC_REG_ID,
+ VAL_ERR_MPC_POSTECH_IND,
+ VAL_ERR_MPC_IS801_MODE,
+ VAL_ERR_MPC_TIMER_ID,
+ VAL_ERR_MPC_START_POSITIONINGPROC_REQ_ID,
+ VAL_ERR_MPC_STATE_ID,
+ VAL_ERR_MPC_POSITIONING_REQ_LEN,
+ VAL_ERR_MPC_START_POSITIONING_RESP_LEN,
+ VAL_ERR_MPC_START_POSITIONING_RESP_CONTEXT,
+ VAL_ERR_MPC_SMS_ADDR,
+ VAL_ERR_MPC_TCP_SOCKET_STATE_ID,
+ VAL_ERR_MPC_LBS_DISABLED,
+
+
+ /* Connectivity */
+ VAL_ERR_UNKNOWN_PARM_ID = 0xF0,
+
+ /* RPC */
+ VAL_ERR_RPC_LIB,
+
+ /* UIM CHV */
+ VAL_CHV_GET_STATUS_ERR = 0x100,
+ VAL_CHV_GET_STATUS_PRO_ERR,
+ VAL_CHV_GET_POWERUP_STATUS_PRO_ERR,
+ VAL_CHV_VERIFY_ERR,
+ VAL_CHV_CHANGE_ERR,
+ VAL_CHV_DISABLE_ERR,
+ VAL_CHV_ENABLE_ERR,
+ VAL_CHV_UNBLOCK_ERR,
+ VAL_CHV_PRO_RSP_ERR,
+ VAL_CHV_COMMON_PRO_ERR,
+ VAL_CHV_GET_ESN_ERR,
+
+ /* UIM - UTK */
+ VAL_UTK_PROACTIVE_CMD_TAG_ERR = 0x200,
+ VAL_UTK_PROACTIVE_CMD_LEN_ERR,
+ VAL_UTK_PROACTIVE_CMD_NUM_ERR,
+ VAL_UTK_PROACTIVE_CMD_TYPE_ERR,
+ VAL_UTK_PROACTIVE_CMD_SIP_TAG_ERR,
+ VAL_UTK_PROACTIVE_CMD_DEVICE_ERR,
+ VAL_UTK_PROACTIVE_CMD_MISS_DEVICE,
+ VAL_UTK_PROACTIVE_CMD_MISS_ALPHA,
+ VAL_UTK_PROACTIVE_CMD_MISS_ITEM,
+ VAL_UTK_PROACTIVE_CMD_MISS_ADDRESS,
+ VAL_UTK_PROACTIVE_CMD_MISS_RSPLEN,
+ VAL_UTK_PROACTIVE_CMD_MISS_SMSPDU,
+ VAL_UTK_PROACTIVE_CMD_MISS_EVENTLIST,
+ VAL_UTK_PROACTIVE_CMD_MISS_BEARER,
+ VAL_UTK_PROACTIVE_CMD_MISS_BUFSIZE,
+ VAL_UTK_PROACTIVE_CMD_MISS_CHANNELDATALEN,
+ VAL_UTK_PROACTIVE_CMD_MISS_CHANNELDATA,
+ VAL_UTK_CMD_DETAIL_LEN_MISMATCH,
+ VAL_UTK_DEVICE_LEN_MISMATCH,
+ VAL_UTK_ICON_LEN_MISMATCH,
+ VAL_UTK_DURATION_LEN_MISMATCH,
+ VAL_UTK_TEXTRSP_LEN_MISMATCH,
+ VAL_UTK_TONE_LEN_MISMATCH,
+ VAL_UTK_FILELIST_LEN_MISMATCH,
+ VAL_UTK_PROACTIVE_CMD_LEN_MISMATCH,
+ VAL_UTK_PRO_MENU_SELECTION_RSP_ERR,
+ VAL_UTK_EVENT_CALL_CONTROL_RSP_ERR,
+ VAL_UTK_PRO_DATA_AVAILABLE_RSP_ERR,
+ VAL_UTK_PRO_MTCALL_RSP_ERR,
+ VAL_UTK_PRO_CALL_CONN_RSP_ERR,
+ VAL_UTK_PRO_CALL_DISC_RSP_ERR,
+ VAL_UTK_PRO_LOC_STATUS_RSP_ERR,
+ VAL_UTK_PRO_ACCTECH_CHANGE_RSP_ERR,
+ VAL_UTK_PRO_TERM_RSP_RSP_ERR, /* 0x221*/
+ VAL_UIM_PARM_OPERATION_NOT_SUPPORTED = 0x222,
+
+#ifdef MTK_DEV_C2K_IRAT
+ /* VAL UIM BTSAP */
+ VAL_UIM_BTSAP_UNEXPECTED_RESULT = 0x230,
+#endif
+
+ /* VAL DBM */
+ VAL_DBM_INVALID_TASK = 0x300,
+ VAL_DBM_SET_NULL_POINTER,
+
+#ifdef MTK_CBP //MTK_DEV_C2K_IRAT
+ /* VAL IRAT */
+ VAL_IRAT_MD1_MSG_ID_INVALID = 0x310,
+ VAL_IRAT_MD1_MSG_PARAM_ERROR,
+ VAL_IRAT_MD1_MSG_SIZE_INCORRECT,
+ VAL_IRAT_MD1_MSG_SEND_FAIL,
+ VAL_IRAT_EMDSTATUS_ERR,
+#endif /* MTK_DEV_C2K_IRAT */
+
+ /* The base number for PGPS MonFault print out. */
+ VAL_ERR_PGPS_BASE = 9800,
+ VAL_ERR_MAX_NUM_ERR_CODES
+
+#ifdef MTK_CBP
+ , VAL_AT_FORCE_ASSERT = 10000,
+#endif
+} ValErrsT;
+
+/*****************************************************************************
+ End of file
+*****************************************************************************/
+#endif
+
+
diff --git a/mcu/interface/protocol/l4_c2k/valgpsapi.h b/mcu/interface/protocol/l4_c2k/valgpsapi.h
new file mode 100644
index 0000000..a928f9f
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valgpsapi.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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef VAL_GPS_API_H
+#define VAL_GPS_API_H 1
+
+/******************************************************************************
+*
+* FILE NAME : valgpsapi.c
+*
+* DESCRIPTION :
+*
+* This is the simplified command-response interface to the GPS and LBS stack.
+*
+* HISTORY :
+*
+* See Log at end of file
+*
+******************************************************************************/
+
+/*===========================================================================
+ INCLUDE FILES FOR MODULE
+===========================================================================*/
+#include "valapi.h"
+#include "valgps.h"
+#include "lecapi.h"
+
+/***************************************************************
+ 1 GPS Global Parameter Functions
+****************************************************************/
+void valapi_gps_open_device_hw_init_req(void);
+void valapi_gps_open_device_hw_init_conf(ValGpsOpenDeviceHwInitRspMsgT * MsgPtr);
+
+void valapi_gps_start_mode_set_req(ValGpsStartModeSetReqT * MsgPtr);
+void valapi_gps_start_mode_set_conf(ValGpsStartModeSetRspMsgT * MsgPtr);
+
+void valapi_gps_security_set_req(ValGpsSetSecReqT * MsgPtr);
+void valapi_gps_security_set_conf(ValGpsSetSecRspMsgT * MsgPtr);
+
+void valapi_gps_base_ssd_set_req(ValGpsBaseSSDSetReqT * MsgPtr);
+void valapi_gps_base_ssd_set_conf(ValGpsBaseSSDSetRspMsgT * MsgPtr);
+
+void valapi_gps_write_server_config_req(ValGpsWriteServerConfigReqT* MsgPtr);
+void valapi_gps_write_server_config_conf(ValGpsWriteServerConfigRspMsgT * MsgPtr);
+
+void valapi_gps_get_fix_mode_req( void );
+void valapi_gps_get_fix_mode_conf(ValGpsFixModeGetRspMsgT * MsgPtr);
+
+void Valapi_gps_Nmea_OutputSwitch_OnOff(ValGpsNmeaOuputCfgMsgT *MsgPtr);
+
+/***************************************************************
+ 2 GPS Session-specific Parameter Functions
+****************************************************************/
+
+/* 2.1 Session initialization functions*/
+void valapi_gps_session_open_req(ValGpsSessionOpenReqT * MsgPtr);
+void valapi_gps_session_open_conf(ValGpsSessionOpenRspMsgT * MsgPtr);
+
+void valapi_gps_session_enable_security_req(ValGpsEnableSecurityReqT * MsgPtr);
+void valapi_gps_session_enable_security_conf(ValGpsEnableSecurityRspMsgT * MsgPtr);
+
+void valapi_gps_session_random_period_set_req(ValGpsRandPeriodSetReqT * MsgPtr);
+void valapi_gps_session_random_period_set_conf(ValGpsRandPeriodSetRspMsgT * MsgPtr);
+
+void valapi_gps_session_configure_fix_mode_req(ValGpsFixModeConfigReqT * MsgPtr);
+void valapi_gps_session_configure_fix_mode_conf(ValGpsFixModeConfigRspMsgT * MsgPtr);
+
+void valapi_gps_session_configure_fix_rate_req(ValGpsFixRateConfigReqT * MsgPtr);
+void valapi_gps_session_configure_fix_rate_conf(ValGpsFixRateConfigRspMsgT * MsgPtr);
+
+void valapi_gps_session_configure_qos_req(ValGpsQosConfigReqT * MsgPtr);
+void valapi_gps_session_configure_qos_conf(ValGpsQosConfigRspMsgT * MsgPtr);
+
+void valapi_gps_session_start_fix_req(ValGpsStartFixReqT * MsgPtr);
+void valapi_gps_session_start_fix_conf(ValGpsStartFixRspMsgT * MsgPtr);
+
+/* 2.2 Mid-GPS-session functions*/
+/* 2.2.1 GPS Position functions */
+void valapi_gps_session_get_position_req(ValGpsPositionGetReqT * MsgPtr);
+void valapi_gps_session_get_position_conf(ValGpsPositionGetRspMsgT * MsgPtr);
+
+void valapi_gps_session_stop_fix_req(ValGpsStopFixReqT * MsgPtr);
+void valapi_gps_session_stop_fix_conf(ValGpsStopFixRspMsgT * MsgPtr);
+
+/* 2.2.2 GPS Security functions */
+void valapi_gps_session_read_security_config_req(ValGpsReadSecurityConfigReqT * MsgPtr);
+void valapi_gps_session_read_security_config_conf(ValGpsReadSecurityConfigRspWithStatusMsgT * MsgPtr);
+
+void valapi_gps_session_write_security_config_req(ValGpsWriteSecurityConfigReqT * MsgPtr);
+void valapi_gps_session_write_security_config_conf(ValGpsWriteSecurityConfigRspMsgT * MsgPtr);
+
+void valapi_gps_session_read_encrypt_config_req(ValGpsReadEncryptConfigReqT * MsgPtr);
+void valapi_gps_session_read_encrypt_config_conf(ValGpsReadEncryptConfigRspWithStatusMsgT * MsgPtr);
+void valapi_gps_reset_assistdata_conf(ValGpsResetAssistRspMsgT * MsgPtr);
+/* 2.2.3 VAL->Master Asynchronous update functions*/
+void valapi_gps_session_location_update_ind(kal_uint32 InstanceID);
+void valapi_gps_session_state_update_ind(ValGpsStateChangeParamsSpyMsgT * MsgPtr);
+void valapi_gps_session_security_update_ind(kal_uint32 InstanceID);
+void valapi_gps_session_stop_ind(kal_uint32 InstanceID);
+
+/***************************************************************
+ 3 GPS Session with AP Parameter Functions
+****************************************************************/
+/* 3.1 PGPS on AP functions */
+#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
+void valapi_gps_factory_rf_cno_msg(LecFacReportCNoMsgT* msg_buffer);
+void valgps_ap_gps_set_ion(ValGpsIonMsgT *MsgPtr);
+void valgps_ap_gps_set_eph(ValGpsEphPrnMsgT *MsgPtr);
+void valgps_ap_gps_set_alm(ValGpsAlmPrnMsgT *MsgPtr);
+void valgps_ap_gps_set_refloc(ValGpsLocMsgT *MsgPtr);
+void valgps_ap_gps_locresp(PswLocRspDataT *MsgPtr);
+
+/* 3.2 GPS on AP functions */
+#ifdef MTK_CBP
+void valapi_ap_gps_reset_assist_data(void);
+void valapi_ap_gps_fake_power_on(ValGpsFakePowerOnMsgT* FakePowerOnMsg);
+void valapi_ap_gps_emergency_call_ind(ValGpsEmergencyCallIndMsgT* EmergencyCallInd);
+#endif
+void valapi_ap_gps_power_on(ValGpsPowerOnMsgT* PowerOnMsg);
+void valapi_ap_gps_freq_aiding_req(void);
+void valapi_ap_gps_time_aiding_req(void);
+
+void valapi_ap_gps_refclock_frqcal(ValGpsFreqAidingMsgT *MsgPtr);
+void valapi_ap_gps_frame_sync(ValGpsFrameSyncMsgT *MsgPtr);
+void valapi_ap_gps_acqassist_data(ValGpsAADataMsgT *MsgPtr);
+void valapi_ap_gps_pseudorange_meast(ValGpsPRMeasMsgT *MsgPtr);
+void valapi_ap_gps_cancellation_req(void);
+void valapi_ap_gps_cp_location_response_data(ValGpsCpLocRespMsgT *MsgPtr);
+void valapi_ap_gps_reference_location_data(ValGpsRefLocRespMsgT *MsgPtr);
+void valapi_gps_ap_assist_req(ValGpsAssistReqT *MsgPtr);
+/* To BP: AP request for PPM. */
+void valapi_ap_gps_ppm_req( VAL_LCS_PPM_REQ_T *req );
+/* To AP: BP reports PPM */
+void valapi_ap_gps_ppm_response(void * res );
+
+void valapi_gps_supl_cell_info_req(void);
+void valapi_gps_supl_cell_info_rsp(ValGpsSuplCellInformationRspMsgT *MsgPtr);
+#ifdef MTK_CBP
+void val_mpc_notify_and_verify_ind(void *MsgBufferP);
+#endif
+#ifdef MTK_GPS_SYNC_DEV
+extern void valapi_ap_gps_time_ind(ValGpsTimeIndMsgT *MsgPtr);
+#endif
+void valapi_ap_gps_sv_valid_config(kal_uint8 sv_valid);
+#endif
+
diff --git a/mcu/interface/protocol/l4_c2k/valhlpapi.h b/mcu/interface/protocol/l4_c2k/valhlpapi.h
new file mode 100644
index 0000000..0f0aa52
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valhlpapi.h
@@ -0,0 +1,1758 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2005-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef VALHLP_H
+#define VALHLP_H
+/*************************************************************************************************
+*
+* FILE NAME : valhlpapi.h
+*
+* DESCRIPTION : This file contains the declarations, definitions
+* and data structures used to interface to the
+* VAL for the Network API.
+*
+*
+* HISTORY :
+* See Log at end of file
+*
+**************************************************************************************************/
+#include "kal_public_defs.h"
+
+#include "sysdefs.h"
+#include "valapi.h"
+#include "hlpapi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define NET_INADDR_ANY 0x0L
+
+#define NET_MAX_SOCKS 8
+
+#define VAL_NET_MAX_REG_TASK 5
+#define NET_MAX_LISTEN_SOCK 5
+#define NET_LINGER_TIMER 120 /*linger at most 2m*/
+#define VAL_INADDR_LOOPBACK 0x7F000001UL
+#define VAL_INVALID_LEN 0xFFFFFFFFUL
+
+#ifdef MTK_PLT_ON_PC
+#define VAL_ICMP_HEADER_LEN (8)
+#endif /* MTK_PLT_ON_PC */
+
+typedef enum
+{
+ NET_IP_PROTOCOL = 0,
+ NET_ICMP_PROTOCOL = 1,
+ NET_TCP_PROTOCOL = 6,
+ NET_UDP_PROTOCOL = 17
+} NetProtocolT;
+
+typedef enum
+{
+ NET_SOCK_STREAM_TYPE,
+ NET_SOCK_DGRAM_TYPE,
+ SOCK_ICMP_TYPE
+} NetTypeT;
+
+typedef enum
+{
+ NET_AF_INET_DOMAIN
+} NetDomainT;
+
+typedef enum
+{
+ NET_WRITE_EVENT = 0x0001, /*socket ready to write */
+ NET_READ_EVENT = 0x0002, /*socket ready to read */
+ NET_CLOSE_EVENT = 0x0004, /*socket close successfully */
+ NET_ACCEPT_EVENT = 0x0008, /*socket ready to accept connection request */
+ NET_CONNECT_EVENT = 0x0010, /*socket connect successfully */
+ NET_CREATE_EVENT = 0x0020, /*socket created successfully */
+ NET_BIND_EVENT = 0x0040, /*socket binded successfully*/
+ NET_LISTEN_EVENT = 0x0080,
+ NET_BIND_FAIL_EVENT = 0x0100,
+ NET_SHUTDOWN_FAIL_EVENT = 0x0200, /* shut down failed*/
+ NET_SHUTDOWN_SUCESS_EVENT = 0x0400,
+ NET_OPT_SET_FAIL_EVENT = 0x0800,
+ NET_OPT_SET_SUCESS_EVENT = 0x1000,
+ NET_LISTEN_FAIL_EVENT = 0x2000,
+ NET_CONNECT_FAIL_EVENT = 0x4000,
+ NET_CREATE_FAIL_EVENT = 0x8000,
+ NET_NUM_EVENT
+} NetEvenTypeT;
+
+typedef struct
+{
+ kal_uint16 SinFamily;
+ kal_uint16 SinPort;
+ kal_uint32 Address;
+ char SizeZero[8];
+} NetSockAddrT;
+
+typedef struct
+{
+ kal_uint16 SinFamily;
+ kal_uint16 SinPort;
+ kal_uint32 Address[4];
+ char SizeZero[8];
+} NetSockIPv6AddrT;
+
+
+typedef enum
+{
+ SOCKET_NULL_STATE,
+ SOCKET_OPENING_STATE,
+ SOCKET_OPEN_STATE,
+ SOCKET_CLOSING_STATE,
+ SOCKET_WAITFOR_CLOSE_STATE,
+ SOCKET_CLOSED_STATE
+} SockStateT;
+
+typedef enum
+{
+ SOCKET_OP_LISTEN = 0x0001,
+ SOCKET_OP_LINGER = 0x0002,
+ SOCKET_OP_KEEPALIVE = 0x0004,
+ SOCKET_OP_ACCEPTCONN = 0x0008,
+ SOCKET_OP_NALGE = 0x0010,
+ SOCKET_OP_RCVSIZE = 0x0020,
+ SOCKET_OP_SNDSIZE = 0x00040,
+ All_SOCKET_OP
+}SocketOptionT;
+
+typedef enum
+{
+ SOCKET_SEND_NO_DELAY = 0x01,
+ SOCKET_SEND_IDLE = 0x02
+}SocketSendTypeT;
+
+typedef enum
+{
+ SOCK_SD_NONE = 0x00,
+ SOCK_SD_RECEIVE = 0x01,
+ SOCK_SD_SEND = 0x02,
+ SOCK_SD_BOTH = 0x03
+}SockSDStateT;
+
+typedef enum
+{
+ SOCKET_FP_TOS =1, /* set IP type-of-service */
+ SOCKET_FP_TTL =2, /* set IP datagram time-to-live */
+ SOCKET_FP_FLAGS =3, /* set or clear binary option */
+ SOCKET_FP_RECVBUF =4, /* set receive buffer size */
+ SOCKET_FP_MAXSEG = 5,
+ SOCKET_FP_MAXRXTSHIFT =6, /* set maximum frame re-transmission */
+ SOCKET_FP_KEEPALIVE=7
+}SocketOpFlagT;
+
+typedef enum
+{
+ NET_SUCCESS, /* The operation was a success. */
+ NET_EBADF, /* Bad file number */
+ NET_EFAULT, /* Bad address */
+ NET_EWOULDBLOCK, /* Operation would block */
+ NET_EAFNOSUPPORT, /* Address family not supported by protocol. */
+ NET_EPROTOTYPE, /* Protocol wrong type for socket */
+ NET_ESOCKNOSUPPORT,/* Socket type not supported. */
+ NET_EPROTONOSUPPORT,/* Protocol not supported */
+ NET_EMFILE, /* Too many open files. */
+ NET_EOPNOTSUPP, /* Operation not supported on transport endpoint. */
+ NET_EADDRINUSE, /* Address already in use. */
+ NET_EADDRREQ, /* Destination address required */
+ NET_EINPROGRESS, /* Operation now in progress */
+ NET_ESHUTDOWN, /* Socket was closed */
+ NET_EISCONN, /* Transport endpoint is already connected. */
+ NET_EIPADDRCHANGED, /* Remote address changed. */
+ NET_ENOTCONN, /* Transport endpoint is not connected. */
+ NET_ECONNREFUSED, /* Connection refused. */
+ NET_ETIMEDOUT, /* Connection timed out. */
+ NET_ECONNRESET, /* Connection reset by peer. */
+ NET_ECONNABORTED, /* Software caused connection abort. */
+ NET_ENETDOWN, /* Network is down. */
+ NET_EPIPE, /* Broken pipe. */
+ NET_EMAPP, /* No mapping found. */
+ NET_EBADAPP, /* RegId invalid. */
+ NET_ESOCKEXIST, /* The socket doesn't exist. */
+ NET_EINVAL, /* Invalid argument. */
+ NET_EMSGSIZE, /* Message too long. */
+ NET_EEOF, /* End of file reached. */
+ NET_EHOSTNOTFOUND, /* The host wasn't found. */
+ NET_ETRYAGAIN, /* Try again. */
+ NET_ENORECOVERY, /* Can't recover from error. */
+ NET_ENOADDRESS, /* No address given. */
+ NET_SUCCESS_END, /*Success and have no more data left to be sent to val*/
+ NET_ENETEXIST
+} NetResultT;
+
+typedef enum
+{
+ NET_RLP_DEFAULT_SETTINGS,
+ NET_RLP_CURRENT_SETTINGS,
+ NET_RLP_NEGOTIATED_SETTINGS
+} NetRlpSettingsTypeT;
+
+typedef struct
+{
+ kal_uint8 FwdNakRounds;
+ kal_uint8 FwdNaksPerRounds[7];
+ kal_uint8 RevNakRounds;
+ kal_uint8 RevNaksPerRounds[7];
+} NetRlpSettingsT;
+
+/*This data type is the PPP connection status.
+ * NET_ISCONN_STATUS - PPP connection is established and available.
+ * NET_INPROGRESS_STATUS, - PPP connection in progress.
+ * NET_NONET_STATUS, - PPP connection disconnected.
+ * NET_CLOSEINPROGRESS_STATUS - PPP connection is closing.
+ */
+typedef enum
+{
+ NET_ISCONN_STATUS,
+ NET_INPROGRESS_STATUS,
+ NET_NONET_STATUS,
+ NET_CLOSEINPROGRESS_STATUS,
+ NET_DORMINPROGRESS_STATUS,
+ NET_INDORMANCY_STATUS,
+ NET_WAKINGUP_STATUS,
+ NET_SUSPEND_STATUS,
+ NET_IDLE_STATUS,
+ NET_DISABLED_STATUS,
+ NET_UNAVAILABLE_STATUS,
+ NET_RELEASED_STATUS,
+ NET_RESET_STATUS
+} NetStatusT;
+
+typedef enum
+{
+ NET_EVT_SOCKET,
+ NET_EVT_NET,
+ NET_EVT_DNS_LOOKUP,
+ NET_EVT_MAX
+} ValNetEventIdT;
+
+typedef struct
+{
+ kal_uint16 SockFd;
+ kal_uint32 EventMask;
+} NetSocketMsgT;
+
+
+typedef struct
+{
+ kal_uint16 SockFd;
+ kal_uint32 EventMask;
+ RegIdT RegId;
+} NetSocket2MsgT;
+
+typedef struct
+{
+ RegIdT RegId;
+ NetStatusT Status;
+} NetEventMsgT;
+
+typedef struct
+{
+ char* NameP;
+ NetSockAddrT Addr;
+} NetDnsLookupMsgT;
+
+/*some test message body - hyang*/
+typedef struct
+{
+ RegIdT regid;
+} NetTestRegIdT;
+
+typedef struct
+{
+ kal_int16 sockfd;
+} NetTestSockFdT;
+
+/*valnet call back prototype*/
+typedef void (*ValNetEventFunc)( RegIdT RegId,
+ ValNetEventIdT EventId,
+ void* EventMsgP );
+
+
+#define NET_SOCKUSABLE 0
+#define NULL_REGID -1
+#define UDP_MAX_PAYLOAD_LEN 1472
+#define MAX_IP_DATAGRAM_LEN 8192
+#define SOCKFD_BASE 100
+
+
+typedef struct
+{
+ kal_uint32 evtExpected;
+ kal_int16 sockfd;
+ RegIdT regid;
+ kal_uint8 sap;
+ NetDomainT family;
+ NetTypeT type;
+ NetProtocolT protocol;
+ kal_bool bDataReady;
+ kal_bool bDataSendReady;
+ kal_bool bSapValid;
+ kal_bool bBinded;
+ SockStateT SockState;
+ HlpAppAddrT localAddr;
+ HlpAppAddrT destAddr;
+ HlpAppAddrT destIp6Addr[4];
+
+ unsigned char bufRecvData[MAX_IP_DATAGRAM_LEN];
+ int lenRecvData;
+ int maxLenRecvData;
+ int lenBytesToBeRead;
+ unsigned char bufSendData[MAX_IP_DATAGRAM_LEN];
+ int lenSendData;
+ int maxLenSendData;
+ kal_uint16 socketOpt;
+ kal_int16 sockListenfd;
+ kal_bool bAppUsed;
+ kal_uint32 lingerTime;
+ SockSDStateT sdState;
+#ifdef MTK_DEV_GPSONE_ON_LTE
+ kal_int32 SocketHandle;
+ gps_rpc_rat_mode_t SocketRatMode;
+#endif
+} SockCtrlBlkT;
+
+/* ETS Messages
+ */
+typedef struct
+{
+ kal_uint8 result;
+} ValNetResultRspT;
+
+typedef struct
+{
+ kal_uint8 status;
+} ValNetStatusRspT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_int16 sockfd;
+ kal_uint32 evtMask;
+} ValNetEventSelectMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint16 RegId;
+ kal_uint8 domain; /* NetDomainT */
+ kal_uint8 type; /* NetTypeT */
+ kal_uint8 protocol; /* NetProtocolT */
+} ValNetSocketCreateMsgT;
+
+typedef struct
+{
+ kal_uint8 result;
+ kal_uint16 sockfd;
+} ValNetSocketCreateRspT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_int16 sockfd;
+ kal_uint16 SinFamily;
+ kal_uint16 SinPort;
+ kal_uint32 Address;
+ char SizeZero[8];
+ kal_int16 namelen;
+} ValNetConnectMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_int16 sockfd;
+} ValNetCloseMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_int16 sockfd;
+} ValNetGetSockStatusMsgT;
+
+typedef struct
+{
+ SockStateT sockState;
+} ValNetGetSockStatusRspT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_int16 sockfd;
+ kal_int32 nbytes;
+ kal_uint8* buffer;
+} ValNetRecvMsgT;
+
+typedef struct
+{
+ kal_uint8 result;
+ kal_int16 numBytesRead;
+} ValNetRecvRspT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_int16 sockfd;
+ kal_int32 nbytes;
+ kal_uint8* buffer;
+} ValNetSendMsgT;
+
+typedef struct
+{
+ kal_uint8 result;
+ kal_int16 numBytesSend;
+} ValNetSendRspT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_int16 sockfd;
+ kal_uint16 SinFamily;
+ kal_uint16 SinPort;
+ kal_uint32 Address;
+ char SizeZero[8];
+ kal_int16 namelen;
+} ValNetBindMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_int16 sockfd;
+ kal_int16 backlog;
+} ValNetListenMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_int16 sockfd;
+ kal_uint16 SinFamily;
+ kal_uint16 SinPort;
+ kal_uint32 Address;
+ char SizeZero[8];
+} ValNetAcceptMsgT;
+
+typedef struct
+{
+ kal_uint8 result;
+ kal_int16 addrlen;
+ kal_int16 newsock;
+} ValNetAcceptRspT;
+
+typedef struct
+{
+ kal_int16 sockfd;
+ int nbytes;
+ kal_uint8* buffer;
+ kal_uint16 SinFamily;
+ kal_uint16 SinPort;
+ kal_uint32 Address;
+ kal_uint8 SizeZero[8];
+ int tolen;
+} ValNetSendToMsgT;
+
+typedef struct
+{
+ kal_int16 sockfd;
+ int nbytes;
+ kal_uint8* buffer;
+ kal_uint16 SinFamily;
+ kal_uint16 SinPort;
+ kal_uint32 Address;
+ kal_uint8 SizeZero[8];
+ int tolen;
+} ValNetRecvFromMsgT;
+
+typedef struct
+{
+ kal_uint16 RegId;
+ char* HostName;
+ kal_uint32 IpAddrP;
+} ValNetGetHostByNameMsgT;
+
+typedef struct
+{
+ char* cp;
+} ValNetInetAddrMsgT;
+
+typedef struct
+{
+ int LenP;
+ char* AuthStrP;
+} ValNetGetPPPAuthParmsMsgT;
+
+typedef struct
+{
+ char* AuthStrP;
+} ValNetSetPPPAuthParmsMsgT;
+
+typedef struct
+{
+ kal_uint8 Length;
+ char DialStr[HLP_MAX_BWSR_DIG_LEN];
+} ValNetGetDialStrParmsRspMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ char DialStr[HLP_MAX_BWSR_DIG_LEN];
+} ValNetSetDialStrParmsMsgT;
+
+typedef struct
+{
+ NetResultT Result;
+} ValNetSetDialStrParmsRspMsgT;
+
+typedef struct
+{
+ kal_uint32 IpAddrPrimary;
+ kal_uint32 IpAddrSecondary;
+} ValNetGetDNSServerIpAddrRspMsgT;
+
+typedef struct
+{
+ kal_uint32 IpAddrPrimary;
+ kal_uint32 IpAddrSecondary;
+} ValNetSetDNSServerIpAddrMsgT;
+
+typedef struct
+{
+ kal_uint8 Type;
+ kal_uint8 Code;
+ kal_uint16 Checksum;
+ kal_uint16 Identifier;
+ kal_uint16 SequenceNumber;
+} IcmpPingMsgT;
+
+typedef struct
+{
+ IcmpPingMsgT msg;
+ kal_uint32 length;
+ kal_uint32 count;
+ kal_uint32 ticks;
+ kal_bool infinite;
+ kal_timerid hlp_ping_timer_id;
+ //ExeTimerT timerCallback;
+ kal_bool timerInUse;
+ kal_uint32 startTimeInMs;
+ kal_uint32 totalTxBytes;
+ kal_uint32 totalRxBytes;
+ ExeRspMsgT RspMsg;
+}ValEtsNetPingStructT;
+
+typedef struct
+{
+ ExeRspMsgT RspMsg;
+ kal_uint32 Length;
+ kal_uint32 Interval;
+ kal_int32 Times;
+} ValNetPingReqMsgT;
+
+typedef struct
+{
+ kal_uint32 totalTime;
+ kal_uint32 ulBaud;
+ kal_uint32 dlBaud;
+} ValNetPingRspMsgT;
+
+typedef struct
+{
+ NetStatusT state;
+} ValHlpDataStateMsgT;
+
+typedef struct
+{
+ kal_uint8 status; /*0-Succ, 1-Fail or released*/
+ kal_uint32 LocalIPAddr;
+ kal_uint32 RemoteIPAddr;
+ kal_uint32 PriDNSAddr;
+ kal_uint32 SecDNSAddr;
+} ValPSConnRspT;
+
+typedef enum
+{
+ VAL_PS_NO = 0, /* Release PS from existing system*/
+ VAL_PS_1X, /* PS service is on 1X */
+ VAL_PS_HRPD, /* PS service is on HRPD */
+ VAL_PS_EHRPD /* PS service is on EHRPD */
+} ValPsConnT;
+
+typedef enum
+{
+ VAL_PS_CONN_FAIL_UNUSED = 0,
+ VAL_PS_CONN_FAIL_PPP_AUTH_FAIL = 6,
+ VAL_PS_CONN_FAIL_MIP_PPP_LCP_TMO,
+ VAL_PS_CONN_FAIL_MIP_PPP_NCP_TMO,
+ VAL_PS_CONN_FAIL_SIP_PPP_LCP_TMO,
+ VAL_PS_CONN_FAIL_SIP_PPP_NCP_TMO,
+ VAL_PS_CONN_FAIL_MIP_PPP_OPT_MISMATCH,
+ VAL_PS_CONN_FAIL_SIP_PPP_OPT_MISMATCH,
+ VAL_PS_CONN_FAIL_MIP_SOL_TMO,
+ VAL_PS_CONN_FAIL_MIP_RRQ_TMO,
+ VAL_PS_CONN_FAIL_MIP_RRP_ERR,
+ VAL_PS_CONN_FAIL_MIP_LCP_FAIL,
+ VAL_PS_CONN_FAIL_SIP_LCP_FAIL,
+ VAL_PS_CONN_FAIL_MIP_NCP_FAIL,
+ VAL_PS_CONN_FAIL_SIP_NCP_FAIL,
+ VAL_PS_CONN_FAIL_PPP_A12_AUTH_FAIL,
+ VAL_PS_CONN_FAIL_PPP_EAP_AKA_AUTH_FAIL,
+ VAL_PS_CONN_FAIL_MIP_ADMIN_PROHIB_FAIL,
+ VAL_PS_CONN_FAIL_MULTI_TCH_FAIL,
+ VAL_PS_CONN_FAIL_PPP_A12_LCP_TMO
+} ValPsConnErrT;
+
+extern SockCtrlBlkT SockCtrlBlkTable[NET_MAX_SOCKS];
+
+extern SockCtrlBlkT* GetAvailableSockCtrlBlk( void );
+extern void FreeSockCtrlBlk(SockCtrlBlkT* pSCB);
+extern SockCtrlBlkT* GetSockCtrlBlkBySockfd( kal_int16 sockfd);
+extern void NetworkEventNotify(RegIdT RegId,NetStatusT NetStatus);
+extern void SocketEventNotify(kal_int16 SockFd, kal_uint32 EventMask);
+extern kal_uint32 GetSocketEventMask( SockCtrlBlkT* pSCB,
+ kal_uint32 evtExpected );
+extern kal_bool CanClosePPPSession( void );
+extern SockCtrlBlkT *GetAcceptSockCtrlBlkfd(kal_int16 sockfd, kal_int16 *clinsockfd, kal_int8 *acceptBlkNum);
+ extern kal_uint16 GetAvailableSockCtrlNum( void );
+
+/* Message handler */
+RegIdT ValNetRegister( ValNetEventFunc NetCallback );
+void NetUnregister( RegIdT RegId );
+void ValPppConnStatusMsg( void* MsgDataP );
+#ifdef MTK_DEV_C2K_IRAT
+void ValPppMruNotifyMsg(void *MsgDataP);
+#endif
+void ValSocketCreateStatusMsg( void* MsgDataP );
+void ValSocketBindStatusMsg( void* MsgDataP );
+void ValSocketConnStatusMsg( void* MsgDataP );
+void ValSocketCloseStatusMsg( void* MsgDataP );
+void ValTcpbDataRecvMsg( void* MsgDataP );
+void ValSocketInactTmoMsg(void *MsgData);
+void ValTcpbDataSendRspMsg( void* MsgDataP );
+void ValUpbRecvDataMsg( void* MsgDataP );
+void ValUdpbSentDataRspMsg( void* MsgDataP );
+void ValSocketListenStatusMsg(void* MsgDataP);
+void ValSocketOptStatusMsg(void *MsgDataP);
+void ValSocketShutdownStatusMsg(void *MsgDataP);
+void ValSocketLingerStatusMsg(void *MsgDataP);
+kal_bool ValNetGetPppConnStatus(void);
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*===========================================================================
+FUNCTION ValNetInit()
+
+DESCRIPTION
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+
+RETURN VALUE
+===========================================================================*/
+void ValNetInit( void );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetRegister
+
+ DESCRIPTION:
+ This function registers a callback for all network services related events.
+
+ PARAMETERS:
+ NetCallback - The callback function to be called for the notification of network
+ services events.
+
+ RETURNED VALUES:
+
+ The assigned registration ID of the subscriber.
+
+*****************************************************************************/
+RegIdT ValNetRegister( ValNetEventFunc NetCallback );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetUnregister
+
+ DESCRIPTION:
+ This function unregisters the given client so that it won't receive additional
+ network services related events.
+
+ PARAMETERS:
+ RegId - The assigned registration ID of the subscriber.
+
+ RETURNED VALUES:
+ void
+
+*****************************************************************************/
+void ValNetUnregister( RegIdT RegId );
+
+/***************************************************************************
+
+ FUNCTION NAME: NetPppOpen
+
+ DESCRIPTION:
+ This function opens a new PPP connection
+
+ PARAMETERS:
+ RegId - The assigned registration ID of the subscriber.
+
+ RETURNED VALUES:
+ A success or failure code from NetResultT
+
+*****************************************************************************/
+NetResultT ValNetPppOpen( RegIdT RegId );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetPppClose
+
+ DESCRIPTION:
+ This function closes a PPP connection
+
+ PARAMETERS:
+ RegId - The assigned registration ID of the subscriber.
+
+ RETURNED VALUES:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetPppClose( RegIdT RegId );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetPppDormantReq
+
+ DESCRIPTION:
+ This function request the PPP connection to enter dormancy state.
+
+ PARAMETERS:
+ RegId - The assigned registration ID of the subscriber.
+
+ RETURNED VALUES:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetPppDormantReq( RegIdT RegId );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetGetPppStatus
+
+ DESCRIPTION:
+ This function get the PPP connection status.
+
+ PARAMETERS:
+ RegId - The assigned registration ID of the subscriber.
+
+ RETURNED VALUES:
+
+
+*****************************************************************************/
+NetStatusT ValNetGetPppStatus( RegIdT RegId );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetEventSelect
+
+ DESCRIPTION:
+ This function registers the client to receive the events as indicated by the event mask.
+
+ PARAMETERS:
+ SockFd - The file decriptor ID of the socket.
+ EventMask - The event mask of the events that have occurred.
+
+ RETURNED VALUES:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetEventSelect( kal_int16 sockfd,
+ kal_uint32 evtMask );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetSocket
+
+ DESCRIPTION:
+ This function opens a socket of the specified protocol type
+
+ PARAMETERS:
+ RegId - The assigned registration ID of the subscriber.
+ Domain - The protocol family to be used.
+ Type - Stream, datagram etc.
+ Protocol - UDP, TCP, etc.
+ SockFd - [out] The new file descriptor for the socket.
+
+ RETURNED VALUES:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetSocket( RegIdT RegId,
+ NetDomainT af,
+ NetTypeT type,
+ NetProtocolT protocol,
+ kal_int16* SockFd );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetConnect
+
+ DESCRIPTION:
+ This function makes a connection the given network node
+
+ PARAMETERS:
+ SockFd - The file decriptor ID of the socket.
+ ServAddrP - The address and port of the server.
+ AddrLen - The length of the server address structure.
+
+ RETURNED VALUES:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetConnect( kal_int16 sockfd,
+ const NetSockAddrT* name,
+ kal_int16 namelen );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetClose
+
+ DESCRIPTION:
+ This function closes the given socket.
+
+ PARAMETERS:
+ SockFd - The file decriptor ID of the socket.
+
+ RETURNED VALUES:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetClose( kal_int16 sockfd );
+
+/***************************************************************************
+
+ FUNCTION NAME: NetGetSockStatus
+
+ DESCRIPTION:
+
+ This function get the status of the given socket.
+
+ PARAMETERS:
+
+ SockFd - The file decriptor ID of the socket.
+
+ RETURNED VALUES:
+
+ .
+
+*****************************************************************************/
+SockStateT ValNetGetSockStatus( kal_int16 sockfd );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetRecv
+
+ DESCRIPTION:
+
+ This function receives bytes from a socket into the given buffer
+
+ PARAMETERS:
+
+ sockfd - The file decriptor ID of the socket.
+ buffer - The buffer where incoming data is copied to.
+ nbytes - The length of BufferP.
+ NumBytesReadP - [out] The number of bytes copied into BufferP
+
+
+ RETURNED VALUES:
+
+ A success or failure code from NetResultT
+
+*****************************************************************************/
+NetResultT ValNetRecv( kal_int16 sockfd,
+ char* buffer,
+ int nbytes,
+ kal_int16* NumBytesReadP );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetSend
+
+ DESCRIPTION:
+
+ This function sends bytes through the opened socket.
+
+ PARAMETERS:
+
+ sockfd - The file decriptor ID of the socket.
+ buffer - The buffer where incoming data is copied to.
+ nbytes - The length of BufferP.
+ NumBytesReadP - [out] The number of bytes copied into BufferP
+
+
+ RETURNED VALUES:
+
+ A success or failure code from NetResultT
+
+*****************************************************************************/
+NetResultT ValNetSend( kal_int16 sockfd,
+ char* buffer,
+ int nbytes,
+ kal_int16* NumBytesSendP );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetBind
+
+ DESCRIPTION:
+
+ This function binds the given socket to a given network node
+
+ PARAMETERS:
+
+ sockfd - The file decriptor ID of the socket.
+ name - The address and port of the server.
+ namelen - The length of the server address structure.
+
+ RETURNED VALUES:
+
+ A success or failure code from NetResultT
+
+*****************************************************************************/
+NetResultT ValNetBind( kal_int16 sockfd,
+ const NetSockAddrT* name,
+ kal_int16 namelen );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetListen
+
+ DESCRIPTION:
+ This function registers the client for new connection events associated with the socket.
+
+ PARAMETERS:
+ sockfd - The file decriptor ID of the socket.
+ backlog - The maximum number of pending connections allowed.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+
+*****************************************************************************/
+NetResultT ValNetListen( kal_int16 sockfd,
+ kal_int16 backlog );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetAccept
+
+ DESCRIPTION:
+ This function accepts a new connection from another network node.
+
+ PARAMETERS:
+ sockfd - The file decriptor ID of the socket.
+ addr - The address and port of the server. This is an output parameter, so
+ it doesn't have to be initialized.
+ addrlen - The length of the server address structure. This is an output
+ parameter, so it doesn't have to be initialized.
+ newsock - Pointer to the new connetion socket when a new connection is
+ sucessfully established. This is an output parameter, so it
+ doesn't have to be initialized.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetAccept( kal_int16 sockfd,
+ NetSockAddrT* addr,
+ kal_int16* addrlen,
+ kal_int16* newsock );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetSendTo
+
+ DESCRIPTION:
+ This function sends a datagram to the specified network node
+
+ PARAMETERS:
+ sockfd - The file decriptor ID of the socket.
+ buffer - The buffer where outgoing data is copied from.
+ nbytes - The length of the data ready to be written from BufferP.
+ toAddr - The address the datagram should be sent to.
+ tolen - The length of the address in ToAddrP.
+ NumBytesSendP - The number of bytes written to the socket. This is an output
+ parameter, so it doesn't have to be initialized.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetSendTo( kal_int16 sockfd,
+ char* buffer,
+ int nbytes,
+ NetSockAddrT* toAddr,
+ int tolen,
+ kal_int16* NumBytesSendP );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetRecvFrom
+
+ DESCRIPTION:
+ This function receives a datagram from the specified network node.
+
+ PARAMETERS:
+ sockfd - The file decriptor ID of the socket.
+ buffer - The buffer where incoming data is copied to.
+ nbytes - The length of the buffer in BufferP.
+ from - The address the datagram should be recieved from.
+ fromlen - point to the length of the receive socket address. This is an
+ output parameter, so it doesn't have to be initialized.
+ NumBytesReadP - The number of bytes receiving from the socket. This is an
+ output parameter, so it doesn't have to be initialized.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetRecvFrom( int sockfd,
+ char* buffer,
+ int nbytes,
+ NetSockAddrT* from,
+ int* fromlen,
+ kal_int16* NumBytesReadP );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetGetHostByName
+
+ DESCRIPTION
+ This function converts a host name to an IP address.
+
+ PARAMETERS
+ RegId - The assigned registration ID of the subscriber.
+ HostName - The name of the host.
+ IPAddrP - The quad IP address number. This is an output parameter, so it
+ doesn't have to be initialized.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetGetHostByName( RegIdT RegId,
+ char* HostName,
+ kal_uint32* IPAddrP );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetInetAddr
+
+ DESCRIPTION
+ This function converts the Internet host address cp from numbers and
+ dots notation into binary data in network byte order.
+
+ PARAMETERS:
+ cp - The address as a string in numbers and dots notation.
+
+ RETURN VALUE:
+ Host address converted to binary or -1 (0xFFFF) if the input string is invalid.
+
+*****************************************************************************/
+kal_uint32 ValNetInetAddr( char* cp );
+
+/***************************************************************************
+
+ FUNCTION NAME: NetHToNl
+
+ DESCRIPTION:
+
+ This function converts the unsigned integer HostLong from host byte order
+ to network byte order
+
+ PARAMETERS:
+
+ HostLong - A host byte order number
+
+ RETURNED VALUES:
+
+ An unsigned long of net byte order
+
+*****************************************************************************/
+kal_uint32 NetHToNl (kal_uint32 hostlong);
+
+/***************************************************************************
+
+ FUNCTION NAME: NetHToNs
+
+ DESCRIPTION:
+
+ This function converts the unsigned short integer hostshort from host byte
+ order to network byte order
+
+ PARAMETERS:
+
+ HostLong - A host byte order number
+
+ RETURNED VALUES:
+
+ An unsigned short of net byte order
+
+*****************************************************************************/
+kal_uint16 NetHToNs(kal_uint16 hostshort);
+
+/***************************************************************************
+
+ FUNCTION NAME: NetNToHl
+
+ DESCRIPTION:
+
+ This function converts the unsigned integer netlong from network byte order
+ to host byte order.
+
+ PARAMETERS:
+
+ NetLong - A net byte order number
+
+ RETURNED VALUES:
+
+ An unsigned long of host byte order
+
+*****************************************************************************/
+kal_uint32 NetNToHl (kal_uint32 netlong);
+
+/***************************************************************************
+
+ FUNCTION NAME: NetNToHs
+
+ DESCRIPTION:
+
+ This function converts the unsigned short integer netshort from network byte
+ order to host byte order
+
+ PARAMETERS:
+
+ NetShort - A net byte order number
+
+ RETURNED VALUES:
+
+ An unsigned short of host byte order
+
+*****************************************************************************/
+kal_uint16 NetNToHs (kal_uint16 netshort);
+
+/***************************************************************************
+
+ FUNCTION NAME: NetSetPppAuthParms
+
+ DESCRIPTION:
+ This function sets the PPP authentication parameters from the protocol stack.
+
+ PARAMETERS:
+ AuthStrP - The PPP authentication parameters as a concatentation of 2 NULL
+ terminated strings "userid@domain.com\0password\0".
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetSetPppAuthParms( char* AuthStrP );
+
+/***************************************************************************
+
+ FUNCTION NAME: NetGetDialStrParms
+
+ DESCRIPTION:
+ This function gets the dial number used while setup the PPP session.
+
+ PARAMETERS:
+ DialStrP - the dial number used.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetGetDialStrParms( char* DialStrP,
+ int* LenP );
+
+/***************************************************************************
+
+ FUNCTION NAME: NetSetDialStrParms
+
+ DESCRIPTION:
+ This function Sets the dial number used while setup the PPP session.
+
+ PARAMETERS:
+ DialStrP - the dial number used.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetSetDialStrParms( char* DialStrP );
+
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetSetDormToRelTimer
+
+ DESCRIPTION:
+ To set the time duration to disconnect packet data call in dormant mode.
+
+ PARAMETERS:
+ Duration -duration bettween dormancy to release, uint: s.
+
+ RETURNED VALUES:
+ A success or failure code from NetResultT
+
+*****************************************************************************/
+NetResultT ValNetSetDormToRelTimer(kal_uint16 Duration);
+
+/***************************************************************************
+
+ FUNCTION NAME: NetSetRlpInactTmoReq
+
+ DESCRIPTION:
+ Tells the Browser and RLP to activate/deactivate its inactivity timer on
+the
+ specified channel.
+
+ PARAMETERS:
+ nInactTime - 0 : Disable Inactivity Monitor Feature.
+ Else: Enable Inactivity Monitoring for the specified number
+of seconds.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetSetRlpInactTmoReq( kal_uint16 nInactTime );
+
+/***************************************************************************
+
+ FUNCTION NAME: NetGetRlpSettings
+
+ DESCRIPTION:
+ This function gets the NAK related RLP settings from the protocol stack.
+
+ PARAMETERS:
+ RlpSettingsType - The current, default, or negotiated RLP settings.
+ SettingsP - The RLP settings. This is an output parameter, so it doesn't
+ have to be initialized.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetGetRlpSetting( NetRlpSettingsTypeT RlpSettingsType,
+ NetRlpSettingsT* SettingsP );
+
+/***************************************************************************
+
+ FUNCTION NAME: NetSetRlpSettings
+
+ DESCRIPTION:
+ This function sets the NAK related RLP settings from the protocol stack.
+
+ PARAMETERS:
+ RlpSettingsType - The current, default, or negotiated RLP settings.
+ SettingsP - The RLP settings.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValValNetSetRlpSetting( NetRlpSettingsTypeT RlpSettingsType,
+ NetRlpSettingsT* SettingsP );
+
+/***************************************************************************
+
+ FUNCTION NAME: NetGetIpAddress
+
+ DESCRIPTION:
+ This function gets the IP address of the MS if any.
+
+ PARAMETERS:
+ IpAddrP - The IP address of the MS. This is an output parameter, so it doesn't
+ have to be initialized.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetGetIpAddress( kal_uint32* IpAddrP );
+
+NetResultT ValNetGetRemoteIpAddress( kal_uint32* IpAddrP );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetGetDNSServerIpAddr
+
+ DESCRIPTION:
+ This function get the current DNS servers IP address.
+
+ PARAMETERS:
+ IpAddrP - Pointer to the DNS server's IP address. This is an output parameter,
+ so it doesn't have to be initialized.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetGetDNSServerIpAddr( kal_uint32* IpAddrP );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetGetPeerName
+
+ DESCRIPTION:
+ This function gets the peer name of the network node the socket it is associated with.
+
+ PARAMETERS:
+ SockFd - The file decriptor ID of the socket.
+ AddrP - The address of the other end of the socket connection. This
+ is an output parameter, so it doesn't have to be initialized.
+ AddrLenP - The size of the address returned. This is an output parameter, so
+ it doesn't have to be initialized.
+
+ RETURN VALUE:
+ A success or failure code from NetResultT.
+
+*****************************************************************************/
+NetResultT ValNetGetPeerName( kal_int16 SockFd,
+ NetSockAddrT* AddrP,
+ kal_int16* AddrLenP );
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetSetDNSServerIpAddr
+
+ DESCRIPTION:
+ This function Sets the current DNS servers IP address.
+
+ PARAMETERS:
+ IpAddrP - Pointer to the DNS server's IP address. This is an input parameter.
+
+ RETURN VALUE:
+ Void
+
+*****************************************************************************/
+void ValNetSetDNSServerIpAddr( kal_uint32 IpAddrPri, kal_uint32 IpAddrSec );
+
+/*===========================================================================
+FUNCTION ValNetShutdown()
+
+DESCRIPTION
+ Shut down socket descriptor.
+
+ SHUT_RD: No more receives can be issued on socket; process can still send on socket;
+ socket receive buffer discarded; any further data received is discarded by TCP;
+ no effect on socket send buffer;
+ SHUT_WR: No more sends can be issued on socket; process can still receive on socket;
+ contents of socket send buffer sent to other end, followed by normal
+ TCP connection termintation (FIN; no effect on socket recive buffer;
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+ shut dow: SHUT_RD SHUT_WR SHUT_WRRD
+
+RETURN VALUE:
+ NetResultT
+===========================================================================*/
+
+NetResultT ValNetShutdown(kal_int16 sockfd, kal_int8 how );
+
+/*===========================================================================
+FUNCTION ValNetSetNoDelay()
+
+DESCRIPTION
+ Use nagle algorthm
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+ shut dow: KAL_TRUE: no use nagle algorithm; KAL_FALSE: use nagle algorithm
+
+RETURN VALUE:
+ NetResultT
+===========================================================================*/
+
+NetResultT ValNetSetNoDelay(kal_int16 sockfd, kal_bool bNodaly);
+
+/*===========================================================================
+FUNCTION ValNetGetNoDelay()
+
+DESCRIPTION
+ get if to use nagle algorthm
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+
+RETURN VALUE:
+ kal_bool
+===========================================================================*/
+
+NetResultT ValNetGetNoDelay(kal_int16 sockfd, kal_bool* delay);
+
+/*===========================================================================
+FUNCTION ValNetSetKeepAlive()
+
+DESCRIPTION
+ Set keep Alive
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+ keepAlive: if keep alive;
+
+RETURN VALUE:
+ NONE
+===========================================================================*/
+
+NetResultT ValNetSetKeepAlive(kal_int16 sockfd, kal_bool keepAlive);
+
+/*===========================================================================
+FUNCTION ValNetGetKeepAlive()
+
+DESCRIPTION
+ get if to keep Alive
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+
+RETURN VALUE:
+ keep alive or not.
+===========================================================================*/
+
+NetResultT ValNetGetKeepAlive(kal_int16 sockfd, kal_bool* keepAlive);
+
+/*===========================================================================
+FUNCTION ValNetSetLinger()
+
+DESCRIPTION
+ set if to linger
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+ lingerOnOff: linger on or off
+ lingerTime: time to linger
+
+RETURN VALUE:
+ NetResultT
+===========================================================================*/
+
+NetResultT ValNetSetLinger(kal_int16 sockfd, kal_bool lingerOnOff, kal_uint32 lingerTime);
+
+/*===========================================================================
+FUNCTION ValNetGetLinger()
+
+DESCRIPTION
+ Get if to linger
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+ lingerOnOff: linger on or off
+ lingerTime: time to linger
+
+RETURN VALUE:
+ NONE
+===========================================================================*/
+NetResultT ValNetGetLinger(kal_int16 sockfd, kal_bool *lingerOnOff, kal_uint32 *lingerTime);
+
+/*===========================================================================
+FUNCTION ValNetSetSendBufSize()
+
+DESCRIPTION
+ set send buffer size
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+ size: buffer's size
+
+RETURN VALUE:
+ int
+===========================================================================*/
+
+NetResultT ValNetSetSendBufSize(kal_int16 sockfd, int size );
+
+/*===========================================================================
+FUNCTION NetGetSendBufSize()
+
+DESCRIPTION
+ get send buffer size
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+
+RETURN VALUE:
+ int
+===========================================================================*/
+
+int ValNetGetSendBufSize(kal_int16 sockfd);
+
+/*===========================================================================
+FUNCTION ValNetSetRecvBufSize()
+
+DESCRIPTION
+ Set receive buffer size
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+ size: buffer size
+
+RETURN VALUE:
+ NetResultT
+===========================================================================*/
+
+NetResultT ValNetSetRecvBufSize(kal_int16 sockfd, int size);
+
+/*===========================================================================
+FUNCTION ValNetGetRecvBufSize()
+
+DESCRIPTION
+ Get receive buffer size
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+ sockfd: socket ID
+
+RETURN VALUE:
+ int
+===========================================================================*/
+
+int ValNetGetRecvBufSize(kal_int16 sockfd);
+
+ /*===========================================================================
+FUNCTION ValNetGetSockName()
+
+DESCRIPTION
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+
+RETURN VALUE
+===========================================================================*/
+NetResultT ValNetGetSockName(kal_int16 sockfd, kal_uint32 *IpAddrP, kal_uint16 *port);
+
+/*===========================================================================
+FUNCTION ValNetGetConnectionType()
+
+DESCRIPTION: Gets network type when in data service.
+
+DEPENDENCIES
+ None.
+
+PARAMETERS:
+
+RETURN VALUE: ConnStateT
+===========================================================================*/
+ConnStateT ValNetGetConnectionType( void );
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+/***************************************************************************
+
+ FUNCTION NAME: ValNetProcessEvent
+
+ DESCRIPTION:
+
+ This function processes the event received and calls the registered call back
+
+ PARAMETERS:
+
+ NetEventId - The id of the val net event
+ NetEventMsgP - the event message body
+
+ RETURNED VALUES:
+ <NONE>
+
+*****************************************************************************/
+void ValNetProcessEvent( ValNetEventIdT NetEventId,
+ void* NetEventMsgP );
+#ifdef MTK_CBP //MTK_DEV_C2K_IRAT
+/*****************************************************************************
+
+ FUNCTION NAME: ValApi_Set_PS_Connection_Req2
+
+ DESCRIPTION:
+ This is used to request DO chip to start PS connection on the specified CDMA service.
+
+ PARAMETERS: None.
+
+ RETURNED VALUES: None.
+
+*****************************************************************************/
+void ValApi_Set_PS_Connection_Req2(ValPsConnT PsType, char *User, char* Password);
+#endif
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValApi_Set_PS_Connection_Req
+
+ DESCRIPTION:
+ This is used to request DO chip to start PS connection on the specified CDMA service.
+
+ PARAMETERS: None.
+
+ RETURNED VALUES: None.
+
+*****************************************************************************/
+void ValApi_Set_PS_Connection_Req(ValPsConnT PsType);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValApi_Set_PS_Connection_Rsp
+
+ DESCRIPTION:
+ This is used to send the rsult of command ValApi_Set_PS_Connection_Req.
+
+ PARAMETERS: PSConnRsp - pionter to data block of Irat_SetPSConnRspT
+ SysPri - priority of HRPD/EHRPD system. 0xff means not available.
+
+ RETURNED VALUES: None.
+
+*****************************************************************************/
+void ValApi_Set_PS_Connection_Rsp(ValPSConnRspT *PSConnRsp);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValApi_PS_Conn_MIP_Status_Rsp
+
+ DESCRIPTION:
+ This is used to send the result of MIP registration or deregistration.
+
+ PARAMETERS: rrpErr - MIP RRP error code
+ reason - Failure reason
+
+ RETURNED VALUES: None.
+
+*****************************************************************************/
+void ValApi_PS_Conn_MIP_Status_Rsp(kal_uint8 rrpErr, ValPsConnErrT reason);
+
+#ifdef MTK_CBP
+/***************************************************************************
+
+ FUNCTION NAME: ValNetSendPingReq
+
+ DESCRIPTION:
+ This function send ping command.
+
+ PARAMETERS:
+ void
+
+ RETURN VALUE:
+ Void
+
+*****************************************************************************/
+void ValNetSendPingReq(void);
+void ValNetSendPingReqExt(ValNetPingReqMsgT* MsgP);
+void ValNetPingExpiryMsg(void* MsgDataP);
+void ValStopPingTimer(void);
+void ValIncTotalTxByteCount(kal_uint32 len);
+void ValIncTotalRxByteCount(kal_uint32 len);
+#endif /*MTK_CBP*/
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /*__VAL_NET_H__*/
+
+/*****************************************************************************
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+*****************************************************************************/
+
+/*****************************************************************************
+* End of File
+*****************************************************************************/
+
+
+/**Log information: \main\Trophy\Trophy_zjiang_href22289\1 2013-10-25 07:16:24 GMT zjiang
+** HREF#22289.ÐÞ¸Ä+CMIPÃüÁÌí¼Ó+CCDATAºÍ+VCDMAIPÃüÁî.**/
+/**Log information: \main\Trophy\1 2013-10-25 07:19:11 GMT cshen
+** href#22289**/
+
diff --git a/mcu/interface/protocol/l4_c2k/valhrpdapi.h b/mcu/interface/protocol/l4_c2k/valhrpdapi.h
new file mode 100644
index 0000000..5fcd96d
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valhrpdapi.h
@@ -0,0 +1,312 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2002-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef VALHRPDAPI_H
+#define VALHRPDAPI_H
+/*****************************************************************************
+*
+* FILE NAME : valhrpdapi.h
+*
+* DESCRIPTION :
+*
+* This is the internal interface include file for EVDO stack.
+*
+* HISTORY :
+*
+* See Log at end of file
+*
+*****************************************************************************/
+#include "sysdefs.h"
+#include "valapi.h"
+#include "do_clcapi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define VAL_HRPD_MAX_REG_TASK 5
+
+typedef struct
+{
+ ValClcATStatusMsgT ATState; /*AT State*/
+ ValHrpdSessionStatusMsgT SessionState; /*Session State*/
+ kal_uint8 ProtocolRevision; /*Protocol Revision*/
+ kal_uint16 Channel; /*Channel*/
+ kal_uint8 BandClass;
+ kal_uint16 EcIo; /*EcIo, in unit of -0.5 dB*/
+ kal_int16 SINRdBQ8; /* EvDO SINR (C2I) in Q8 dB format */
+#ifdef SYS_OPTION_EVDO
+ kal_uint16 CurrPN; /*Current PN*/
+ kal_uint8 ANAuthState; /* AN Auth State*/
+ kal_uint8 ColorCode; /*ColorCode Rev State*/
+ char DrcRate[15]; /*DRC Rate*/
+ kal_uint8 DrcCover; /*DRC Cover Sector */
+ kal_uint32 UATI; /*UATI */
+#endif/*SYS_OPTION_EVDO*/
+}ValHrpdEvdoParmT;
+
+typedef struct
+{
+ kal_uint32 CDMASysRxTotalBytes;
+ kal_uint32 CDMASysRxNewDataPkts;
+ kal_uint32 CDMASysTxTotalBytes;
+ kal_uint32 CDMASysTxNewDataPkts;
+ kal_uint32 CDMASysCurFrameCnt;
+}ValHrpdDataStatT;
+/***************************************************************************
+ VAL HRPD event definitions
+****************************************************************************/
+//don't modify following Enum, brew has referred to it
+typedef enum
+{
+ VAL_HRPD_EVT_ROAM_IND_MSG,
+ VAL_HRPD_EVT_PKT_CALL_CONNECTED_MSG,
+ VAL_HRPD_EVT_PKT_CALL_ENDED_MSG,
+ VAL_HRPD_EVT_NWK_RPT_HANDOFF_MSG,
+ VAL_HRPD_EVT_SERVICE_STATUS_MSG,
+ VAL_HRPD_EVT_RMC_RSSI_RPT_MSG,
+ VAL_HRPD_EVT_PAGE_RCVD_MSG,
+ VAL_HRPD_EVT_RSSI_RPT_MSG,
+ VAL_HRPD_EVT_NTWK_ACQD_MSG,
+
+ VAL_HRPD_EVT_CONN_STAT_MSG,
+ VAL_HRPD_EVT_STAT_INFO_MSG,
+
+ VAL_HRPD_PSSTACK_STATUS_MSG,
+
+ VAL_HRPD_EV_DO_AN_AUTH_MSG,
+
+#ifdef MTK_DEV_C2K_IRAT
+ VAL_HPRD_EVT_LTE_NBR_FREQS_RPT_MSG,
+#endif
+
+#ifdef MTK_CBP
+ VAL_HRPD_EVT_DO_SECTOR_INFO_MSG,
+ VAL_HRPD_EVT_CLC_AT_STATUS_MSG,
+#endif
+
+ VAL_HRPD_EVT_MAX
+} ValHrpdEventIdT;
+
+/*===========================================================================
+ FUNCTION API
+===========================================================================*/
+/*===========================================================================
+
+FUNCTION ValHrpdInit
+
+DESCRIPTION
+ Initialize the Val HRPD module.
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ None
+
+===========================================================================*/
+void ValHrpdInit( void );
+
+//don't modify following Function, brew has referred to it
+/*===========================================================================
+
+FUNCTION ValHrpdRegister
+
+DESCRIPTION
+ register ui to the VAL HRPD module
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ register id
+
+===========================================================================*/
+RegIdT ValHrpdRegister( ValEventFunc CallBack );
+
+//don't modify following Function, brew has referred to it
+/*===========================================================================
+
+FUNCTION ValHrpdUnregister
+
+DESCRIPTION
+ Deregister ui to the VAL HRPD module
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ None
+
+===========================================================================*/
+void ValHrpdUnregister( RegIdT RegId );
+
+/*===========================================================================
+
+FUNCTION ValHrpdDeliverMail
+
+DESCRIPTION
+ Callback to support CP messages from EVDO.
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ kal_boolean indicating whether the message was handled.
+
+===========================================================================*/
+kal_bool ValHrpdDeliverMail( kal_uint32 msg_id,
+ void* msg_buffer,
+ kal_uint32 msg_size );
+
+void ValHrpPswProtocolStackEnable(kal_bool enable);
+
+/****************************************************************************
+ *
+ * Name: ValHrpdEvdoParmT ValHrpdEvdoParmReport()
+ * Description:
+ * Parameters:
+ * Returns:
+ * Notes:
+ *****************************************************************************/
+ValHrpdEvdoParmT ValHrpdEvdoParmReport(void);
+
+void ValHrpdGetEhrpdAttrInit(void);
+
+void ValHrpdGetEhrpdMode(void);
+
+#ifdef SYS_OPTION_EVDO
+void ValHrpdGetEvdoActivePnInfo(Rup2ValPnListInfoT* pActiveInfo);
+void ValHrpdGetEvdoNeighborPnInfo(Rup2ValPnListInfoT* pNghbrInfo);
+
+/****************************************************************************
+ *
+ * Name: void ValHrpdSetRevState(kal_bool Revstate)
+ * Description:
+ * Parameters:
+ * Returns:
+ * Notes:
+ *****************************************************************************/
+void ValHrpdSetRevState(kal_bool Revstate);
+
+/****************************************************************************
+ *
+ * Name: kal_bool ValHrpdGetRevState(void)
+ * Description:
+ * Parameters:
+ * Returns:
+ * Notes:
+ *****************************************************************************/
+kal_bool ValHrpdGetRevState(void);
+
+/****************************************************************************
+ *
+ * Name: void ValHrpdGetDataStat()
+ * Description: Get EVDO data statistics
+ * Parameters: kal_uint32
+ CDMASysRxTotalBytes- Total received bytes
+ CDMASysRxNewDataPkts- Total number of received new data frames
+ CDMASysTxTotalBytes- Total transmitted bytes
+ CDMASysTxNewDataPkts- Total Tx new data frames
+ CDMASysCurFrameCnt- the current HDR time (since THE BEGINNING) in frames
+
+ * Returns:
+ * Notes:
+ *****************************************************************************/
+void ValHrpdGetDataStat(ValHrpdDataStatT* pStat);
+
+/****************************************************************************
+ *
+ * Name: ValProcessRssiRpt(RssiRpt)
+ * Description: Processed the RSSI reading from RMC
+ * Parameters: Rssi reading from RMC
+ * Returns:
+ * Notes:
+ *****************************************************************************/
+void ValProcessRssiRpt( kal_int32 RssiRpt );
+
+#ifdef CBP7_EHRPD
+void ValHrpdSetInternetPdnId(kal_uint8 PdnId);
+#endif
+#ifdef LGT_EXTENSIONS
+/****************************************************************************
+ *
+ * Name: void ValHrpdSetSipRegMode()
+ * Description: set SIP Registration Mode for the coming data req: 1-SIP Registration 2-SIP Periodic Registration
+ SIP mode is cleared to NULL when data traffic setup succ
+ * Parameters: Mode=0-NULL, 1-SIP Registration, 2-SIP Periodic Registration
+ * Returns:
+ * Notes:
+ *****************************************************************************/
+void ValHrpdSetSipRegMode(kal_uint8 Mode);
+/****************************************************************************
+ *
+ * Name: void ValHrpdSetVTVoIPCallFlag()
+ * Description: set current call is VT/VoIP service, the flag is cleared when data entering dormant
+ * Parameters: bFlag : KAL_TRUE-VT/VoIP call, KAL_FALSE-non VT/VoIP call
+ * Returns:
+ * Notes:
+ *****************************************************************************/
+void ValHrpdSetVTVoIPCallFlag(kal_bool bFlag);
+kal_bool ValHrpdGetVTVoIPCallFlag(void);
+#endif
+#endif/*SYS_OPTION_EVDO*/
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
+
+
+/**Log information: \main\CBP7FeaturePhone\CBP7FeaturePhone_nicholaszhao_href17384\1 2011-07-04 08:25:30 GMT nicholaszhao
+** HREF#17384**/
+/**Log information: \main\CBP7FeaturePhone\CBP7FeaturePhone_nicholaszhao_href17384\2 2011-07-08 02:19:14 GMT nicholaszhao
+** HREF#17384**/
+/**Log information: \main\CBP7FeaturePhone\3 2011-07-12 09:40:52 GMT marszhang
+** HREF#17384**/
+/**Log information: \main\Trophy\Trophy_wzhou_href22163\1 2013-04-25 03:04:26 GMT wzhou
+** HREF#22163: add A12 auth status message in VAL**/
+/**Log information: \main\Trophy\1 2013-04-25 03:06:31 GMT jzwang
+** href#22163**/
+
diff --git a/mcu/interface/protocol/l4_c2k/vallbsapi.h b/mcu/interface/protocol/l4_c2k/vallbsapi.h
new file mode 100644
index 0000000..f1f4462
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/vallbsapi.h
@@ -0,0 +1,272 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2007-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef VALLBSAPI_H
+#define VALLBSAPI_H
+/*************************************************************************************************
+*
+* FILE NAME : vallbsapi.h
+*
+* DESCRIPTION : This file contains the declarations, definitions
+* and data structures used to interface to the
+* VAL for the location based services (LBS) API.
+*
+*
+* HISTORY :
+* See Log at end of file
+*
+**************************************************************************************************/
+
+#include "sysdefs.h"
+#include "valapi.h"
+
+#define VAL_LBS_MAX_REG_TASK 2
+
+
+/* values match return values in Brew AEEError.h API */
+#define LBS_SUCCESS 0 /* Success */
+#define LBS_FAIL 1 /* General failure */
+#define LBS_CLASSNOTSUPPORT 3 /* Specified class unsupported */
+
+typedef enum
+{
+ VAL_LBS_GET_GPS_INFO_MSG,
+ VAL_LBS_GET_SECTOR_INFO_MSG,
+ VAL_EVT_MAX
+} ValLbsEventIdT;
+
+typedef struct
+{
+ RegIdT RegId;
+ kal_uint16 Result;
+ ValLbsSectorInfo Data;
+} ValLbsGetSectorInfoT;
+
+typedef struct
+{
+ kal_uint32 dwTimeStamp; /* Time, seconds since 1/6/1980 */
+ kal_uint32 status; /* Response status; */
+ kal_int32 dwLat; /* Lat, 180/2^25 degrees, WGS-84 ellipsoid */
+ kal_int32 dwLon; /* Lon, 360/2^26 degrees, WGS-84 ellipsoid */
+ kal_int16 wAltitude; /* Alt, meters, WGS-84 ellipsoid */
+ kal_uint16 wHeading; /* Heading, 360/2^10 degrees */
+ kal_uint16 wVelocityHor; /* Horizontal velocity, 0.25 meters/second */
+ kal_int8 bVelocityVer; /* Horizontal velocity, 0.25 meters/second */
+ kal_uint8 accuracy; /* Accuracy of the data */
+ kal_uint16 fValid; /* Flags indicating valid fields in the struct. */
+ kal_uint8 bHorUnc; /* Horizontal uncertainity */
+ kal_uint8 bHorUncAngle; /* Hor. Uncertainity at angle */
+ kal_uint8 bHorUncPerp; /* Hor. uncertainty perpendicular */
+ kal_uint16 wVerUnc; /* Vertical uncertainity. */
+} ValLbsGPSInfo;
+
+typedef struct
+{
+ RegIdT RegId;
+ kal_uint16 Result;
+ ValLbsGPSInfo Data;
+} ValLbsGetGpsInfoT;
+
+typedef struct
+{
+ kal_uint32 mode; /* See AEEGPSMode (one shot, download first, track local ...) */
+ kal_uint16 nFixes;
+ kal_uint16 nInterval;
+ kal_uint32 optim; /* See AEEGPSOpt (speed, accuracy, default) */
+ kal_uint32 qos; /* See AEEGPSQos (0 -> 255, with 255 being highest quality of service. */
+ kal_uint32 svrType; /* Default: 0 / Server IP: 1 (Address provided below) */
+ kal_uint32 addr; /* IP Address */
+ kal_uint16 port; /* port number */
+} ValGPSConfig;
+
+typedef struct
+{
+ kal_uint32 Is801_IpAddr;
+ kal_uint16 Is801_PortNum;
+ kal_uint8 Is801_UserId[HLP_MAX_USRID_LEN];
+ kal_uint8 Is801_Pswd[HLP_MAX_PSWD_LEN];
+ kal_uint8 Is801_CalledNumber[HLP_MAX_BWSR_DIG_LEN];
+} ValLbsNvmParmT;
+
+typedef enum
+{
+ VAL_LBS_PPP_SUCESS_STATUS,
+ VAL_LBS_PPP_FAIL_STATUS,
+ VAL_LBS_PPP_NOT_SUPPORTED_STATUS,
+ VAL_LBS_TCP_FAIL_STATUS,
+ VAL_LBS_NOT_SUPPORTED_STATUS,
+ NUM_LBS_STATUS
+}ValLbsStatusE;
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*===========================================================================
+
+FUNCTION ValLbsInit()
+
+DESCRIPTION Initialize the LBS Val Module
+
+PARAMETERS None
+
+RETURN VALUE None
+
+===========================================================================*/
+void ValLbsInit( void );
+
+/***************************************************************************
+
+FUNCTION ValLbsRegister
+
+DESCRIPTION This function registers a callback for all LBS related events.
+
+PARAMETERS NetCallback - The callback function to be called for the notification of LBS
+ services events.
+
+RETURN VALUE The assigned registration ID of the subscriber.
+
+*****************************************************************************/
+RegIdT ValLbsRegister( ValEventFunc Callback );
+
+/***************************************************************************
+
+FUNCTION ValLbsUnregister
+
+DESCRIPTION This function unregisters the given client so that it won't receive additional
+ LBS services related events.
+
+PARAMETERS RegId - The assigned registration ID of the subscriber.
+
+RETURN VALUE None
+
+*****************************************************************************/
+void ValLbsUnregister( RegIdT RegId );
+
+/*===========================================================================
+
+FUNCTION: ValLbsGetGPSInfo()
+
+DESCRIPTION: Val API to begin LBS session over TCP/IP.
+ Same as IPOSDET_GetGPSInfo() in Brew AEE API.
+
+PARAMETERS: RegIdT RegId
+
+RETURN VALUE: None
+
+===========================================================================*/
+void ValLbsGetGPSInfo( RegIdT RegId, ValGPSConfig* Config );
+
+#ifdef SYS_OPTION_HL
+/*===========================================================================
+
+FUNCTION: ValLbsGetSectorInfo()
+
+DESCRIPTION: Same as IPOSDET_GetSectorInfo() in Brew AEE API.
+
+PARAMETERS: RegIdT RegId
+
+RETURN VALUE: None
+
+===========================================================================*/
+void ValLbsGetSectorInfo( RegIdT RegId );
+#endif
+
+/*===========================================================================
+
+FUNCTION: ValLbsGetSap()
+
+DESCRIPTION: Return ValLocSapId
+
+PARAMETERS: None
+
+RETURN VALUE: kal_uint8 ValLocSapId
+
+===========================================================================*/
+kal_uint8 ValLbsGetSap( void );
+
+/*===========================================================================
+
+FUNCTION: ValLbsProcessEvent
+
+DESCRIPTION: This function processes the event received and calls the
+ registered call back.
+
+PARAMETERS: ValLbsEventIdT EventId, void *EventMsgP
+
+RETURN VALUE: None
+
+===========================================================================*/
+void ValLbsProcessEvent( ValLbsEventIdT EventId, void* EventMsgP );
+
+/*===========================================================================
+
+FUNCTION: ValLbsProcessDbmInfo
+
+DESCRIPTION: This function processes Dbm Nvm information
+
+PARAMETERS: ValLocGetSectorInfoRspMsgT* Msg
+
+RETURN VALUE: None
+
+===========================================================================*/
+void ValLbsProcessDbmInfo(ValLbsNvmParmT *Parm);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*__VAL_LBS_H__*/
+
+/*****************************************************************************
+* $Log: vallbsapi.h $
+* Revision 1.1 2007/05/19 14:11:49 mclee
+* Initial revision
+* Initial Version
+*****************************************************************************/
+
+/*****************************************************************************
+* End of File
+*****************************************************************************/
+
+
diff --git a/mcu/interface/protocol/l4_c2k/valmiscapi.h b/mcu/interface/protocol/l4_c2k/valmiscapi.h
new file mode 100644
index 0000000..6b6a228
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valmiscapi.h
@@ -0,0 +1,139 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/**************************************************************************************************
+* %version: 5 % %instance: HZPT_2 % %date_created: Fri Apr 20 13:47:01 2007 % %created_by: dsu % %derived_by: dsu %
+**************************************************************************************************/
+
+#ifndef _VAL_MISC_API_H_
+#define _VAL_MISC_API_H_
+
+#include "sysdefs.h"
+#include "valapi.h"
+
+
+
+ /*For CBP8.2D, if 8M bytes SRAM isn't enough, please decrease the size*/
+#ifdef MTK_DEV_MEMORY_OPT
+#define VAL_MEMORY_POOL_SIZE 0xA000
+#else
+#define VAL_MEMORY_POOL_SIZE 0x32000
+#endif
+
+#define VAL_SRAM_SIZE 0x800000
+
+#define VAL_MISC_MAX_REG_TASK (5)
+
+
+#define VAL_DEFAULT_PA_TEMP_CELSIUS ((kal_int16)25) /*Default PA temperature when PS is off*/
+
+
+typedef enum
+{
+ VAL_RES_WALL_PAPER_SECTOR,
+ VAL_RES_MAIN_TOPIC_SECTOR,
+ VAL_RES_FLASH_SECTOR_MAX
+} ValResFlashSectorT;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+kal_bool ValStatusGet( void );
+RegIdT ValRegister( const ValEventHandlerT* EventHandlerP,
+ ValEventFunc CallBack );
+void ValUnRegister( const ValEventHandlerT* EventHandlerP,
+ RegIdT RegId );
+void ValProcessEvent( const ValEventHandlerT* EventHandlerP,
+ kal_uint32 Event,
+ void* EventDataP );
+void ValWatchdogKick(void);
+kal_uint32 ValGetSystemTimeInSec( void );
+kal_uint32 ValGetSystemTimeInSecEx( void );
+kal_bool ValCalendarTimeGet(ValCalendarTimeT* CalendarTimeP);
+void ValSysInteruptDisable( void );
+void ValPwrOffBoard( void );
+void* ValMalloc( kal_uint32 size );
+void ValFree(void* Ptr);
+void ValMiscLocSessionStart( void );
+void ValMiscPowerDown( ValPowerDownIdT Signal, kal_uint32 ValMsgId );
+RegIdT ValMiscRegister( ValEventFunc CallBack );
+void ValMiscUnregister( RegIdT RegId );
+void ValMiscNamRequest( void );
+void ValMiscGetEriVersion(ValEriVersionNumberMsgT *MsgP);
+kal_bool ValMiscPowerKeyExist(void);
+
+void ValGetFirmwareVersion (void);
+/*void ValTestModeStartRefurbishAging (ValRfPllBandT Band, kal_uint16 Channel);*/
+void ValTestModeStopRefurbishAging (void);
+void ValTestModeRefurbishAgingChangeTxPwr (kal_bool Increment);
+kal_int32 ValTimeZoneGet(void);
+kal_bool ValIsDaySavingActive(void);
+kal_bool ValMiscNamGet(NamNumber NamSeg, PswIs95NamT *pNamBuffer);
+/* kal_int16 ValGetPaTemp(void); */
+/*void ValMiscReadBatteryVoltage(ValBatteryReadDataMsgT *RxMsgP);*/
+void ValInitiateSilentReset(void);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValResetCpByDog
+
+ DESCRIPTION:
+
+ This routine can reset CBP chip set with watch dog. After the routine calling, the SW run from boot again.
+
+ PARAMETERS:
+
+
+ RETURNED VALUES:
+
+
+
+*****************************************************************************/
+void ValResetByWatchdog(void);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/**Log information: \main\Trophy\Trophy_ylxiao_href22033\1 2013-03-18 14:15:49 GMT ylxiao
+** HREF#22033, merge 4.6.0**/
+/**Log information: \main\Trophy\1 2013-03-19 05:20:16 GMT hzhang
+** HREF#22033 to merge 0.4.6 code from SD.**/
+
diff --git a/mcu/interface/protocol/l4_c2k/valotasp.h b/mcu/interface/protocol/l4_c2k/valotasp.h
new file mode 100644
index 0000000..644ab48
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valotasp.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) 2016
+*
+* 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 __VAL_OTASP_H__
+#define __VAL_OTASP_H__
+
+#define VAL_OTASP_MAX_REG_TASK 5
+
+
+typedef enum
+{
+ VAL_OTASP_INDICATOR_MSG
+} ValOtaspEventIdT;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*===========================================================================
+
+FUNCTION ValOtaspInit
+
+DESCRIPTION
+ Initialize the OTASP module.
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ None
+
+===========================================================================*/
+void ValOtaspInit( void );
+
+/*===========================================================================
+
+FUNCTION ValOtaspRegister
+
+DESCRIPTION
+ register application to the Otasp module
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ register id
+
+===========================================================================*/
+RegIdT ValOtaspRegister( ValEventFunc CallBack );
+
+/*===========================================================================
+
+FUNCTION ValOtaspUnregister
+
+DESCRIPTION
+ deregister application to the Otasp module
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ None
+
+===========================================================================*/
+void ValOtaspUnregister( RegIdT RegId );
+
+void ValProcessOtaspIndMsg( void* MsgDataP );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
diff --git a/mcu/interface/protocol/l4_c2k/valphbapi.h b/mcu/interface/protocol/l4_c2k/valphbapi.h
new file mode 100644
index 0000000..54e6717
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valphbapi.h
@@ -0,0 +1,489 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2006-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+
+/*****************************************************************************
+
+ FILE NAME: valphbapi.h
+
+ DESCRIPTION:
+
+This file contains all api of val phone book for upper layer
+
+*****************************************************************************/
+#ifndef VAL_PHB_API_H
+#define VAL_PHB_API_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*===========================================================================
+
+ INCLUDE FILES FOR MODULE
+
+===========================================================================*/
+#include "sysdefs.h"
+#include "valapi.h"
+
+/*===========================================================================
+
+ MARCO DEFINES
+
+===========================================================================*/
+
+/*remote uicc,needn't access phonebook */
+#if defined(SYS_OPTION_REMOTE_UICC) && !defined(MTK_DEV_C2K_IRAT)
+#define VAL_PHB_MAX_REC_NUMBER 1
+#define VAL_PHB_MAX_FLASH_REC_NUMBER 1
+#define VAL_PHB_MAX_UIM_REC_NUMBER 1
+#else
+
+#ifdef MTK_CBP
+#define VAL_PHB_MAX_FLASH_REC_NUMBER 5
+#define VAL_PHB_MAX_UIM_REC_NUMBER 300
+#define VAL_PHB_MAX_UIM_FDN_REC_NUMBER 40
+#define VAL_PHB_MAX_UIM_FLASH_REC_NUMBER (VAL_PHB_MAX_FLASH_REC_NUMBER + VAL_PHB_MAX_UIM_REC_NUMBER)
+#define VAL_PHB_MAX_REC_NUMBER (VAL_PHB_MAX_FLASH_REC_NUMBER + VAL_PHB_MAX_UIM_REC_NUMBER + VAL_PHB_MAX_UIM_FDN_REC_NUMBER)
+#else
+#define VAL_PHB_MAX_REC_NUMBER 450
+#define VAL_PHB_MAX_FLASH_REC_NUMBER 200
+#define VAL_PHB_MAX_UIM_REC_NUMBER 250
+#endif
+#endif
+
+#define EOL 0xFFFF /* stands for End Of List */
+
+/* Field struct data length defined */
+#define PHB_FIELD_ID_LEN FIELD_SIZE(ValPhbFieldT,FieldId)
+#define PHB_FIELD_TYPE_LEN FIELD_SIZE(ValPhbFieldT,FieldType)
+#define PHB_FIELD_DATALEN_LEN FIELD_SIZE(ValPhbFieldT,DataLength)
+#define PHB_FIELD_HEADER_LEN FIELD_OFFSET(ValPhbFieldT,Data)
+
+
+#define VAL_PHB_DEV_NONE 0x00
+#define VAL_PHB_MAX_REGISTERED_IDS 5 /*!< Max registered app */
+#define VAL_PHB_TELESRVID_COUNT 20 /*!< Max registered teleservice id */
+
+#define VAL_PHB_GROUP_STATE 0xF0 /* the start value of group id for record state */
+
+#define VAL_PHB_MAX_REC_BUFFER_CNT 4
+
+//don't modify following Macro, brew has referred to it
+#define VAL_PHB_MAX_FLASH_REC_CNT 500 /* Phb Flash Record counts */
+
+//don't modify following Macro, brew has referred to it
+#ifdef FEATURE_ADVANCED_CONTACT
+#define VAL_PHB_MAX_REC_SIZE 1312 /* max contact size in bytes */
+
+#define VAL_PHB_MAX_ALPHA_LENGTH 65
+#define VAL_PHB_MAX_PHONE_LENGTH 66 /* string type */
+#else
+#define VAL_PHB_MAX_REC_SIZE 196 /* max contact size in bytes */
+
+#ifdef MTK_CBP
+#define VAL_PHB_MAX_ALPHA_LENGTH 40
+#else
+#define VAL_PHB_MAX_ALPHA_LENGTH 33
+#endif
+#define VAL_PHB_MAX_PHONE_LENGTH 33 /* string type */
+#endif
+
+#ifdef MTK_CBP
+#define PHB_MAX_ALPHA_LENGTH 40
+#else
+#define PHB_MAX_ALPHA_LENGTH 15
+#endif
+
+#ifdef MTK_CBP
+#define PHB_MAX_PHONE_LENGTH 41 /*string type*/
+#define PHB_MAX_PHONE_ADN_LENGTH 21 /*string type*/
+#else
+#define PHB_MAX_PHONE_LENGTH 21 /*string type*/
+#endif
+
+#define PHB_MAX_UIM_UPDATE_RETRY_NUMBER 2
+/* It is external PHB contact structure,
+ it is used to interface with UI task or other tasks,
+ It's PhoneNumber is string type
+ */
+typedef struct
+{
+ kal_uint8 Ton;
+ kal_uint8 Npi;
+ kal_uint8 AlphaIdentifier[PHB_MAX_ALPHA_LENGTH+1]; /*Alpha Identifier*/
+ kal_uint8 PhoneNumber[PHB_MAX_PHONE_LENGTH+1]; /*Dialing Number/SSC String*/
+ kal_uint16 RecID; /*Record ID*/
+ kal_bool HasExtension;
+ kal_uint8 spdial_index; /* speed dial index, 0 if nothing */
+ kal_uint8 category; /* personal or business */
+ kal_uint8 telcategory; /* category of this phone # */
+ kal_uint8 restricted; /* is it restricted */
+ kal_uint8 Secret;
+ kal_uint32 offset; /* phone extension offset */
+} ValPhbContactFullT;
+
+/* buffer state */
+typedef enum
+{
+ VAL_PHB_BUF_FREE = 0x00,
+ VAL_PHB_BUF_USED,
+ VAL_PHB_BUF_MODIFIED,
+ VAL_PHB_BUF_MAX_STATE
+}ValPhbBufferStateT;
+
+typedef struct
+{
+ kal_uint8 BufState; /* The buffer state*/
+ kal_uint8 DeviceId; /* The device id for buffer contact */
+ kal_uint16 RecId; /* The record id for the contact in val db */
+ kal_uint16 DataLen; /* The actual length of the contact data segment */
+ kal_uint8 Data; /* The buffer for data */
+}ValPhbRecordBufferT;
+
+/* Val phb error */
+typedef enum
+{
+ VAL_PHB_ERR_NONE = 0, /* Operating success */
+ VAL_PHB_ERR_PARMETER = 1, /* Inputting invalid parameter */
+ VAL_PHB_ERR_NOT_PARA_INIT, /* val phb parameters not init(ValPhbInit has not been called) */
+
+ VAL_PHB_ERR_DEV_UNSUPPORT, /* unsupport phb device,error device id */
+ VAL_PHB_ERR_DEV_REG, /* phb device register error, register device is full */
+ VAL_PHB_ERR_DEV_ALREADY_REG, /* phb device already register */
+ VAL_PHB_ERR_DEV_NOT_REG, /* phb device not register */
+ VAL_PHB_ERR_DEV_NOT_OPEN, /* phb device not open */
+ VAL_PHB_ERR_DEV_ALREADY_OPEN, /* phb device already open */
+ VAL_PHB_ERR_DEV_OPEN, /* error when open phb device open */
+ VAL_PHB_ERR_DEV_CLOSE, /* error when close phb device failure */
+ VAL_PHB_ERR_DEV_INIT_BUSY, /* phb device initial busy */
+
+ VAL_PHB_ERR_REC_EMPTY, /* empty record of phb device */
+ VAL_PHB_ERR_REC_READ, /* read record of phb device failure */
+ VAL_PHB_ERR_REC_WRITE, /* write record of phb device failure */
+ VAL_PHB_ERR_REC_DELETE, /* delete record of phb device failure */
+
+ VAL_PHB_ERR_NO_VAL_MEMORY, /* val malloc failure */
+ VAL_PHB_ERR_NO_MEMORY, /* no memory for new phb record */
+ VAL_PHB_ERR_NO_ENOUGH_MEMORY, /* no enough memory for new phb record */
+ VAL_PHB_ERR_NO_BUFFER, /* no record buffer for field operating */
+
+ VAL_PHB_ERR_MAX_REC_SIZE, /* no more space of the record for this field */
+ VAL_PHB_ERR_FIELD_NONEXISTENCE /* no such phb field */
+
+}ValPhbResultT;
+
+typedef enum /* Return values */
+{
+ CONTACT_SUCCESS, /* success */
+ CONTACT_FULL, /* contact phonebook or item is full */
+ CONTACT_FAIL, /* fail in the PHONE file */
+ CONTACT_EXTEN_FAIL, /* fail in the EXTEN file */
+ CONTACT_SUCCESS_AND_COMPRESS, /* contact EXTEN file request to compress and success. */
+ CONTACT_EXTEN_RECOVER /* contact EXTEN file request to recover */
+} ContactResultT;
+
+
+typedef struct
+{
+ kal_uint16 PhbUimRecNum;
+ kal_uint16 PhbFlashRecNum;
+ kal_uint16 PhbUimFreeNum;
+#ifdef MTK_CBP
+ kal_uint8 FdnRecNum;
+ kal_uint8 FdnFreeNum;
+#endif
+} ValPhbCountT;
+
+//don't modify following Enum, brew has referred to it
+/* Val phb field type */
+typedef enum
+{
+ VAL_PHB_FIELD_TYPE_NAME_INTER= 0x00,
+ VAL_PHB_FIELD_TYPE_NUMBER_INTER= 0x01,
+ VAL_PHB_FIELD_TYPE_GROUP_INTER = 0x03,
+ VAL_PHB_FIELD_TYPE_MAX_INTER
+}ValPhbFieldTypeInterT;
+
+typedef struct
+{
+ kal_uint8 ValPhbAlphaLength; /* max name length */
+ kal_uint8 ValPhbPhoneLength; /* max string type phone number length */
+ kal_uint8 ValPhbMaxDevCount; /* max phb storage device count */
+ kal_uint16 ValPhbMaxRecSize; /* max record size */
+ kal_uint16 ValPhbMaxRecCount; /* max record count */
+ kal_uint16 ValPhbMaxRecBufCount; /* max record buffer count */
+ kal_uint16 ValPhbMaxPhoneNumberCnt; /* max count of phone number in phone */
+ kal_uint16 ValPhbMaxFieldType; /* max record field type */
+ kal_uint16 ValPhbMaxFieldId; /* max record field id */
+
+ kal_uint16 ValPhbRecBufSize; /* size of ValPhbRecordBufferCustT */
+
+ void* ValPhbRecBufAddress;/* record buffer address */
+}ValPhbCustParaT;
+
+/* init state */
+typedef enum
+{
+ VAL_PHB_INIT_INVALID = 0x00, /* the phb dev initial invalid */
+ VAL_PHB_INIT_VALID, /* the phb dev initial valid */
+ VAL_PHB_INIT_NOT_COMPLETE, /* the phb init not complete */
+ VAL_PHB_INIT_COMPLETE /* the phb init complete */
+}ValPhbInitStateT;
+
+
+//don't modify following Enum, brew has referred to it
+/* Val phb device type */
+/* DON'T add item value to 0, it has been define to VAL_PHB_DEV_NONE in valphbapi.c */
+typedef enum
+{
+ VAL_PHB_DEV_UIM = 0x01,
+ VAL_PHB_DEV_FLASH = 0x02,
+ VAL_PHB_DEV_MAX
+} ValPhbDeviceT;
+
+typedef struct buff_struct
+{
+ kal_uint8 unicodehead;
+ kal_uint8 str[PHB_MAX_ALPHA_LENGTH - 1 + 2];
+} buff;
+
+typedef union search_name_union
+{
+ buff buf;
+ kal_uint8 data[PHB_MAX_ALPHA_LENGTH + 2];
+} searchname_str;
+
+#ifdef MTK_CBP
+#define PHB_MAX_VAL_PHONE_LENGTH 20
+#else
+#define PHB_MAX_VAL_PHONE_LENGTH 10
+#endif
+
+//don't modify following Enum, brew has referred to it
+/* Val phb field type */
+typedef enum
+{
+ VAL_PHB_FIELD_TYPE_NAME = VAL_PHB_FIELD_TYPE_NAME_INTER,
+ VAL_PHB_FIELD_TYPE_NUMBER = VAL_PHB_FIELD_TYPE_NUMBER_INTER,
+ VAL_PHB_FIELD_TYPE_GROUP = VAL_PHB_FIELD_TYPE_GROUP_INTER,
+ VAL_PHB_FIELD_TYPE_NUMBER_INFO,
+ VAL_PHB_FIELD_TYPE_MAX = 0xF0
+}ValPhbFieldTypeT;
+
+typedef struct
+{
+ kal_uint8 Ton;
+ kal_uint8 Npi;
+ kal_uint8 AlphaIdentifier[PHB_MAX_ALPHA_LENGTH+1]; /*Alpha Identifier*/
+ kal_uint8 PhoneNumber[PHB_MAX_VAL_PHONE_LENGTH+1]; /*Dialing Number/SSC String*/
+ kal_uint16 RecID; /*Record ID*/
+ kal_bool HasExtension; /*if have extension info*/
+} ValPhbContactSummaryT;
+
+//don't modify following Enum, brew has referred to it
+/* Val phb field id */
+typedef enum
+{
+ VAL_PHB_FIELD_ID_PRIMARY_NAME = 0x00,
+ VAL_PHB_FIELD_ID_PRIMARY_NUMBER = 0x01,
+ VAL_PHB_FIELD_ID_PRIMARY_NUMBER_INFO = 0x10,
+ VAL_PHB_FIELD_ID_MAX = 0xF0
+}ValPhbFieldIdT;
+
+typedef enum
+{
+ PHB_NODE_CLEAN = 0x00,
+ PHB_NODE_USED = 0x01,
+ PHB_NODE_WRITING = 0x02,
+ PHB_NODE_WAITING_FOR_WRITE = 0x03,
+ PHB_NODE_DELETING = 0x04,
+ PHB_NODE_WAITING_FOR_DELETE = 0x05,
+ PHB_NODE_STATUS_NUM
+} ValNodeStatus;
+/* for customer */
+typedef struct
+{
+ kal_uint8 BufState; /* The buffer state*/
+ kal_uint8 DeviceId; /* The device id for buffer contact */
+ kal_uint16 RecId; /* The record id for the contact in val db */
+ kal_uint16 DataLen; /* The actual length of the contact data segment */
+ kal_uint8 Data[VAL_PHB_MAX_REC_SIZE]; /* The buffer for data */
+}ValPhbRecordBufferCustT;
+
+typedef struct
+{
+ kal_uint16 NextAddress;
+ ValNodeStatus NodeState;
+ ValPhbContactSummaryT ValPhbContact;
+} ValPhbNodeType;
+
+typedef struct
+{
+ kal_uint16 index; // id of the contact
+ kal_uint16 size; // size of the record data
+} ValContactExtenRecHeaderT;
+
+#ifdef MTK_CBP
+#define VAL_PHB_FDN_NUMBER_LEN 40
+
+typedef struct
+{
+ kal_uint8 Ton;
+ kal_uint8 Npi;
+ kal_uint8 AlphaIdentifier[PHB_MAX_ALPHA_LENGTH+1]; /*Alpha Identifier*/
+ kal_uint8 PhoneNumber[VAL_PHB_FDN_NUMBER_LEN+1]; /*Dialing Number/SSC String*/
+ kal_uint8 RecID; /*Record ID*/
+}ValFdnContactInfoT;
+
+typedef struct
+{
+ kal_bool FdnInitOk;
+ kal_bool FdnEnabled;
+ kal_uint8 FdnRecCount;
+ kal_uint8 FdnRecSize;
+}ValFdnContextT;
+#endif
+
+/* marco define for link list */
+#define VAL_PHB_EOL 0xFFFF /* end of link list */
+
+
+typedef kal_uint32 ValPhbEventIdT;
+typedef void (*ValPhbEventFunc) ( RegIdT RegId, kal_uint32 Event, void *MsgP );
+
+
+/*! Contact Event register table structure */
+typedef struct
+{
+ kal_bool IsUse; /*!< if this entry is in use */
+ kal_uint8 NumTeleSrvId; /*!< Teleservice Id count */
+ kal_uint16 TeleSrvId[VAL_PHB_TELESRVID_COUNT]; /*!< Teleservice id */
+ ValPhbEventFunc CallBack; /*!< Function to call back */
+} ValPhbRegTableT;
+
+//don't modify following Struct, brew has referred to it
+/* VAL phb filed type */
+typedef struct
+{
+ kal_uint8 FieldId;
+ kal_uint8 FieldType;
+ kal_uint16 DataLength;
+ void * Data;
+} ValPhbFieldT;
+
+/* val phb device init msg */
+typedef struct
+{
+ ValPhbInitStateT PhbInitState;
+
+} ValPhbInitStateMsgT;
+
+void ValPhbInit(void);
+void ValPhbUnInit(void);
+RegIdT ValPhbRegister(ValPhbEventFunc CallBack);
+ValPhbResultT ValPhbUnRegister(RegIdT RegId);
+kal_bool IsPhbUimInitOk(void);
+kal_bool IsPhbFlashInitOk(void);
+#ifdef SYS_OPTION_NO_UI
+kal_bool ValPhbProcessMsg( kal_uint32 MsgId, void* MsgBufP, kal_uint32 MsgLen );
+#endif
+/*flash*/
+kal_uint32 ValPhbOpenFlashFile(void);
+kal_uint32 ValPhbCloseFlashFile(void);
+kal_bool ValPhbDeleteFlashData(void);
+kal_uint32 ValPhbDbFlush(void);
+
+ValPhbResultT ValPhbGetFlashRecord(kal_uint16 RecId, void *BufferP, kal_uint32 *LengthP);
+ValPhbResultT ValPhbEraseFlashRecord(kal_uint16 RecId);
+ValPhbResultT ValPhbUpdateFlashRecord(kal_uint16 RecId, void *BufferP, kal_uint32 Length);
+/*Field */
+ValPhbResultT ValPhbSetField(kal_uint16 DevId, kal_uint16 RecId, ValPhbFieldT Field);
+ValPhbResultT ValPhbGetField(kal_uint8 DeviceId, kal_uint16 RecordId,ValPhbFieldT *FieldP);
+ValPhbResultT ValPhbClearField(kal_uint8 DeviceId, kal_uint16 RecordId,kal_uint8 FieldId);
+ValPhbResultT ValPhbFlushRecord(kal_uint8 DeviceId, kal_uint16 RecordId);
+
+/*Uim*/
+ValPhbResultT ValPhbGetUimRecParams(void);
+ValPhbResultT ValPhbGetUimRecord(kal_uint16 RecId);
+ValPhbResultT ValPhbEraseUimRecord(kal_uint16 RecId);
+ValPhbResultT ValPhbUpdateUimRecord(kal_uint16 RecId, kal_uint8 * NameP, kal_uint8 * PhNumP, kal_uint8 TON, kal_uint8 NPI);
+
+#ifdef MTK_CBP
+kal_uint8 ValGetPhbAlphaLen(kal_uint8 *pAlpha);
+kal_uint8 PhbGetAlphaIdLenByAddress(kal_uint16 nAddress);
+#endif
+
+/*-------------------------------------*/
+
+void ValPhbInitAllContact( void );
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValPhbFindContactByNumber
+
+ DESCRIPTION:
+ update a phone book contact info
+
+ PARAMETERS:
+ pPhbContact: A pointer to a phone book Contact.
+
+ RETURNED VALUES:
+ KAL_TRUE is success, and KAL_FALSE is error
+
+*****************************************************************************/
+kal_bool ValPhbFindContactByNumber( ValPhbContactFullT* pPhbContact,
+ kal_uint8* pNumber );
+#ifdef MTK_CBP
+extern kal_bool ValGetFdnStatus(void);
+#endif
+
+#ifdef __cplusplus
+
+}
+#endif /* __cplusplus */
+#endif
+
+
+
+
diff --git a/mcu/interface/protocol/l4_c2k/valpswapi.h b/mcu/interface/protocol/l4_c2k/valpswapi.h
new file mode 100644
index 0000000..935bdff
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valpswapi.h
@@ -0,0 +1,1720 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2005-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef VALPSW_H
+#define VALPSW_H
+/*****************************************************************************
+*
+* FILE NAME : valpswapi.h
+*
+* DESCRIPTION :
+*
+* This is the internal interface include file for PSW.
+*
+* HISTORY :
+*
+* See Log at end of file
+*
+*****************************************************************************/
+#include "sysdefs.h"
+#include "valapi.h"
+#include "pswapi.h"
+#ifdef SYS_PTION_RLP
+#include "rlpwapi.h"
+#endif
+/*for call control*/
+#ifdef FEATURE_UTK
+#include "valutkapi.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define VAL_PSW_MAX_REG_TASK 5
+#define BYTE_MASK(offset, len) \
+((0xff >> offset) & (0xff << (8 - (offset + len))))
+
+/***************************************************************************
+ VAL PSW event definitions
+****************************************************************************/
+
+typedef enum
+{
+ VAL_PSW_EVT_INCOMING_CALL_ALERT_WITH_INFO_MSG,
+ VAL_PSW_EVT_INCOMING_CALL_ALERT_WITH_MORE_INFO_MSG,
+ VAL_PSW_EVT_CALL_DIALING_MSG, /*A new event added by Chengzhen Huang. MS is on dialing.*/
+ VAL_PSW_EVT_CALL_CONNECTED_MSG,
+ VAL_PSW_EVT_CALL_ANSWERED_MSG, /*MS is on conversation.*/
+ VAL_PSW_EVT_CALL_ENDED_MSG, /*The call is ended.*/
+ VAL_PSW_EVT_NWK_RPT_BURST_DTMF_MSG,
+ VAL_PSW_EVT_FLASH_ALERT_WITH_INFO_MSG,
+ VAL_PSW_EVT_FLASH_ALERT_WITH_MORE_INFO_MSG,
+ VAL_PSW_EVT_FEATURE_NOTIFICATION_MSG,
+ VAL_PSW_EVT_FEAT_NOTIF_MORE_INFO_MSG,
+ VAL_PSW_EVT_NWK_RPT_HANDOFF_MSG,
+ VAL_PSW_EVT_NWK_RPT_LOCK_MSG,
+ VAL_PSW_EVT_NWK_RPT_UNLOCK_MSG,
+ VAL_PSW_EVT_NWK_RPT_MAINTENANCE_REQUIRED_MSG,
+ VAL_PSW_EVT_NWK_RPT_START_CONTINUOUS_DTMF_MSG,
+ VAL_PSW_EVT_NWK_RPT_STOP_CONTINUOUS_DTMF_MSG,
+ VAL_PSW_EVT_ROAM_INDICATION_MSG,
+ VAL_PSW_EVT_PSW_E911_MODE_MSG,
+ VAL_PSW_EVT_SERVICE_MSG,
+ VAL_PSW_EVT_IN_SERVICE_MSG,
+ VAL_PSW_EVT_VOICE_PRIVACY_MSG,
+ VAL_PSW_EVT_FLASH_STATUS_MSG,
+ VAL_PSW_EVT_PSSTACK_STATUS_MSG,
+ VAL_PSW_EVT_AKEY_CHANGE_RSP_MSG,
+ VAL_PSW_EVT_NAM_MSG,
+ VAL_PSW_EVT_BS_CO_ORD_MSG,
+ VAL_PSW_EVT_L1D_RSSI_RPT_MSG,
+ VAL_PSW_EVT_EV_MAINTENANCE_MSG,
+ VAL_PSW_EVT_EV_PAGE_RECEIVED,
+ VAL_PSW_EVT_REGISTRATION_ACCEPT_MSG,
+ VAL_PSW_EVT_REGISTRATION_REJECT_MSG,
+ VAL_PSW_EVT_ADC_MEAS_RESPONSE_MSG,
+ /*HDQ ADDED for Keypad service provisioning module on 20040622*/
+ VAL_PSW_EVT_SERVICE_CONFIG_MSG,
+ VAL_PSW_EVT_NAM_RPT_ACTIVE_NAM_MSG,
+ VAL_PSW_EVT_NAM_RPT_LOCKSTATUS_MSG,
+ VAL_PSW_EVT_LOCK_NAM_RSP_MSG,
+ VAL_PSW_EVT_ACTIVE_NAM_RSP_MSG,
+ VAL_PSW_EVT_GET_AKEY_CHECKSUM_RSP_MSG,
+ /*end*/
+ VAL_PSW_EVT_OTASP_IND_MSG,
+ VAL_PSW_EVT_OTASP_CON_MSG,
+ VAL_PSW_EVT_OTASP_DISCON_MSG,
+ VAL_PSW_EVT_SYSTEM_ERROR_IND_MSG,
+ VAL_PSW_EVT_NETWOKR_PRE_MSG,
+ VAL_PSW_EVT_CUR_PRL_INFO_MSG,
+ VAL_PSW_EVT_NONACTIVE_PRL_INFO_MSG,
+ VAL_PSW_EVT_SERVICE_STATUS_MSG,
+ VAL_PSW_EVT_AMPS_EXT_PROTO_MSG,
+ VAL_PSW_EVT_NWK_RPT_MCC_MNC_MSG,
+
+ VAL_PSW_EVT_LOC_RESP_MSG,
+ VAL_PSW_EVT_LOC_ERROR_MSG,
+ VAL_PSW_EVT_RPT_DATA_INFO_MSG,
+ VAL_PSW_EVT_LOC_PILOT_PHASE_MEAS_MSG,
+ VAL_PSW_EVT_LOC_PSEUDO_RANGE_MSG,
+ VAL_PSW_EVT_RPT_PKT_STATE_MSG,
+
+ VAL_PSW_EVT_PSWPOWERON_IND_MSG,
+ VAL_PSW_EVT_PSWPOWEROFF_IND_MSG,
+ VAL_PSW_EVT_REG_SUCCESS_MSG,
+ VAL_PSW_EVT_ENTER_OOSA,
+ VAL_PSW_EVT_RPT_DATA_CALL_EVT_MSG,
+
+ VAL_PSW_RLP_RATE_INFO_MSG,
+ VAL_PSW_EVT_RPT_DATA_PREARRANGE_MSG,
+
+ VAL_PSW_EVT_GET_MOBILE_ID_RSP_MSG,
+
+
+ VAL_PSW_EVT_PKT_ACTIVE_IND_MSG, /*VAL_PSW_EVT_NOT_DORMANT_IND_MSG,*/
+ VAL_PSW_EVT_PKT_DORMANT_IND_MSG,
+ VAL_PSW_EVT_PKT_RELEASED_IND_MSG,
+
+ VAL_PSW_EVT_NOT_DORMANT_IND_MSG,
+ VAL_PSW_EVT_DORMANT_IND_MSG,
+ VAL_PSW_EVT_CP_STATUS_MSG,
+ VAL_PSW_EVT_EV_CHECK_FEATURE_LOCK,
+ VAL_PSW_EVT_RPT_RLP_STAT_MSG, /* Message definition: RlpQueryStatIndMsgT */
+ VAL_PSW_EVT_POWERUP_NV_READ_COMPLETE,
+ VAL_PSW_TRANSMIT_INFO_MSG,
+ VAL_PSW_EVT_NWK_RPT_CP_RESPONSE_MSG,
+#ifdef FEATURE_UTK
+ VAL_PSW_EVT_CALL_CONTROL_RSP_MSG,
+#endif
+ VAL_PSW_EVT_TIME_ZONE_CHANGED_MSG,
+#ifdef MTK_CBP
+ VAL_PSW_EVT_NWK_EXISTENCE_INFO_MSG,
+ VAL_PSW_EVT_EV_ASSIGNED_MSG,
+ VAL_PSW_EVT_PRL_LIST_ID_UPDATED_MSG,
+#endif
+#ifdef MTK_CBP_ENCRYPT_VOICE
+ VAL_PSW_EVT_TC_ASSIGNED,
+ VAL_SMS_EVENT_CALLED_SEC_IND_MSG,
+ VAL_SMS_EVENT_SECURITY_INFO_ERASE_MSG,
+ VAL_SMS_EVENT_PASSWORD_RESET_MSG,
+ VAL_SMS_EVENT_SEND_STATUS_SPESMS_MSG,
+ VAL_SMS_EVENT_GET_ENCRYPT_KEY_SUCESS_IND,
+ VAL_SMS_EVENT_MT_ENCRYPT_NOTIFICATION_MSG_RECVD_IND,
+ VAL_SMS_EVENT_P101_MSG,
+ VAL_SMS_EVENT_P201_MSG,
+ VAL_SMS_EVENT_P301_MSG,
+ VAL_SMS_EVENT_P401_MSG,
+#endif
+ VAL_PSW_EVT_MAX
+} ValPswEventIdT;
+
+typedef enum
+{
+ VAL_PSW_OTASP_A_BAND,
+ VAL_PSW_OTASP_B_BAND,
+ VAL_PSW_OTASP_A_BLOCK,
+ VAL_PSW_OTASP_B_BLOCK,
+ VAL_PSW_OTASP_C_BLOCK,
+ VAL_PSW_OTASP_D_BLOCK,
+ VAL_PSW_OTASP_E_BLOCK,
+ VAL_PSW_OTASP_F_BLOCK,
+ VAL_PSW_OTASP_PREFERRED,
+ VAL_PSW_MAX_OTASP_CODE
+} ValPswOtaspCodeT;
+
+ typedef struct
+ {
+ const kal_char *OtaspDigits;
+ ValPswOtaspCodeT SystemCode;
+ } OtaspItemT;
+
+typedef enum {
+ VAL_PSW_DISABLED,
+ VAL_PSW_NO_SERVICE_STATE,
+ VAL_PSW_IDLE_STATE,
+ VAL_PSW_CALL_ORIGINATE_WAIT_STATE,
+ VAL_PSW_DEDICATED_CALL_STATE,
+ VAL_PSW_CALL_ALERT_WAIT_STATE,
+/*for call control*/
+#ifdef FEATURE_UTK
+ VAL_PSW_CALL_CONTROL_WAIT_STATE,
+#endif
+ VAL_PSW_CALL_ORIGINATE_SEND_STATE,
+ VAL_PSW_STATE_NUM
+} ValPswStateT;
+
+#ifdef MTK_CBP
+/* Item of NAM */
+typedef enum
+{
+ VAL_NV_ITEM_ID_UNKNOWN = 0,
+ VAL_NV_ITEM_ID_P_PREV,
+ VAL_NV_ITEM_ID_MDN,
+ VAL_NV_ITEM_ID_HOME_SID,
+ VAL_NV_ITEM_ID_MCC,
+ VAL_NV_ITEM_ID_MNC, /*5*/
+ VAL_NV_ITEM_ID_MIN_1,
+ VAL_NV_ITEM_ID_MIN_2,
+ VAL_NV_ITEM_ID_IMSI_T_MCC,
+ VAL_NV_ITEM_ID_IMSI_T_MNC,
+ VAL_NV_ITEM_ID_IMSI_T_S_1, /*10*/
+ VAL_NV_ITEM_ID_IMSI_T_S_2, /*11*/
+ VAL_NV_ITEM_ID_TEST_CALL,
+ VAL_NV_ITEM_ID_EVRC_CAPABLE,
+ VAL_NV_ITEM_ID_HOME_PAGE_SO,
+ VAL_NV_ITEM_ID_HOME_ORIG_SO, /*15*/
+ VAL_NV_ITEM_ID_ROAM_ORIG_SO,
+ VAL_NV_ITEM_ID_EVDO_REVISION,
+ VAL_NV_ITEM_ID_PREF_FWD_RC,
+ VAL_NV_ITEM_ID_ACCOLC,
+ VAL_NV_ITEM_ID_SCI, /*20*/
+ VAL_NV_ITEM_ID_SCM,
+ VAL_NV_ITEM_ID_EVRCB_SWITCH,/*22*/
+ VAL_NV_ITEM_ID_SLOTTED_MODE,
+ VAL_NV_ITEM_ID_HOME_NID,
+ VAL_NV_ITEM_ID_HOME_SID_REG,/*25*/
+ VAL_NV_ITEM_ID_FSID_REG,
+ VAL_NV_ITEM_ID_FNID_REG,
+ VAL_NV_ITEM_ID_LOCK_CODE, /*28*/
+ VAL_NV_ITEM_ID_EVRC_SWITCH, /*29*/
+
+ VAL_NV_ITEM_ID_INVALID
+}ValNvIden;
+
+typedef enum
+{
+ VAL_MSID_MCC_FIELD = 0,
+ VAL_MSID_MNC_FIELD,
+ VAL_MSID_IMSI_S1_FIELD,
+ VAL_MSID_IMSI_S2_FIELD,
+ VAL_MSID_IMSI_CLASS_FIELD,
+ VAL_MSID_ADDR_NUM_FIELD,
+
+ VAL_MSID_INVAILD_FIELD
+}ValMSidField;
+
+typedef enum
+{
+ VAL_PREF_RC_1 = 1,
+ VAL_PREF_RC_2 = 2,
+ VAL_PREF_RC_3 = 3,
+ VAL_PREF_RC_4 = 4,
+ VAL_PREF_RC_5 = 5,
+
+ VAL_PREF_RC_11 = 11,
+
+ VAL_PREF_RC_INVAILD
+}ValPrefRC;
+
+typedef enum
+{
+ VAL_TEST_CALL_DEFAULT = 0, /*defualt */
+ VAL_TEST_CALL_SIMPLE_TDSO = 1, /*Simple TDSO(32776) NOT Support*/
+ VAL_TEST_CALL_FULL_TDSO = 2, /*FULL TDSO(32)*/
+ VAL_TEST_CALL_LOOP_BACK_8K = 3, /*loopback 8k(2)*/
+ VAL_TEST_CALL_LOOP_BACK_13K = 4, /*loopback 13k(9)*/
+ VAL_TEST_CALL_LOOP_BACK_SO55 = 5, /*loopback SO55*/
+ VAL_TEST_CALL_MARKOV_8K = 6, /*Markov 8k(32798) Not Support*/
+ VAL_TEST_CALL_MARKOV_13K = 7, /*Markov 13k(32798) Not Support*/
+ VAL_TEST_CALL_MARKOV_SO54 = 8, /*Markov SO54 Not Support*/
+
+ VAL_TEST_CALL_INVALID
+}ValTestCallSo;
+
+
+#define VAL_SO_FULL_TDSO 32
+#define VAL_SO_LOOP_BACK_8K 2
+#define VAL_SO_LOOP_BACK_13K 9
+#define VAL_SO_LOOP_BACK_SO55 55
+#define VAL_SO_8K_EVRC 3
+#define VAL_SO_13K_QCELP 17
+#define VAL_SO_WILD_CARD 0
+#define VAL_SO_EVRCB 68
+
+/*the bit 5 is Slotted Class of Station Class Mark
+ Non-Slotted xx0xxxxx
+ slotted xx1xxxxx
+*/
+#define VAL_SLOTTED_MODE_ENABLE_MASK 0x20
+#define VAL_SLOTTED_MODE_DISABLE_MASK 0xDF
+
+#endif
+
+
+/***************************************************************************
+
+ Basic Data Types for PSWF events
+
+***************************************************************************/
+/* Cellular System types */
+#define VAL_PSW_CP_SYSTEM_PCS 0 /* Band 1 and Band 4 CDMA */
+#define VAL_PSW_CP_SYSTEM_CELLULAR 1 /* Band 0 CDMA */
+#define VAL_PSW_CP_SYSTEM_ANALOG 2 /* Band 0 Analog */
+
+/* CDMA Blocks */
+#define VAL_PSW_A_BLOCK 0
+#define VAL_PSW_D_BLOCK 1
+#define VAL_PSW_B_BLOCK 2
+#define VAL_PSW_E_BLOCK 3
+#define VAL_PSW_F_BLOCK 4
+#define VAL_PSW_C_BLOCK 5
+#define VAL_PSW_G_BLOCK 6
+#define VAL_PSW_H_BLOCK 7
+#define VAL_PSW_I_BLOCK 8
+#define VAL_PSW_J_BLOCK 9
+#define VAL_PSW_K_BLOCK 10
+#define VAL_PSW_L_BLOCK 11
+#define VAL_PSW_M_BLOCK 12
+#define VAL_PSW_N_BLOCK 13
+
+
+#define VAL_PSW_ALL_BLOCKS 255
+#define OTA_ALERT_WITH_INFO_MESSAGE 1
+
+#ifdef MTK_CBP
+#define VAL_PSW_MAX_CALLING_PARTY_NUMBER_SIZE 50
+#else
+#define VAL_PSW_MAX_CALLING_PARTY_NUMBER_SIZE 32
+#endif
+
+/* Call Processing Response Types */
+#define VAL_PSW_RSP_BURST_DTMF 1
+#define VAL_PSW_RSP_CONT_DTMF_ON 2
+#define VAL_PSW_RSP_CONT_DTMF_OFF 3
+#define VAL_PSW_RSP_DATA_BURST 4
+#define VAL_PSW_RSP_DATA_BURST_SENT 5
+#define VAL_PSW_RSP_FLASH 6
+#define VAL_PSW_RSP_VP 7
+#define VAL_PSW_REJ_INVALID_STATE 8
+#define VAL_PSW_REJ_TC_TXQ_FULL 9
+#define VAL_PSW_REJ_FC_ERROR 10
+#define VAL_PSW_REJ_ORDER_ERROR 11
+#define VAL_PSW_REJ_FMT_OVERFLOW 12
+
+#ifdef MTK_DEV_C2K_IRAT
+#define VAL_CSS_BOTH_POWER_OFF 0x0 /*defualt */
+#define VAL_CSS_1X_POWER_ON 0x1 /*CSS_1X is powered on*/
+#define VAL_CSS_DO_POWER_ON 0x2 /*CSS_DO is powered on*/
+#define VAL_CSS_BOTH_POWER_ON (VAL_CSS_1X_POWER_ON | VAL_CSS_DO_POWER_ON)
+
+#define VAL_LOCATION_ALL_RECVED 0x7
+#define VAL_LOCATION_SID_NID_RECVED 0x1
+#define VAL_LOCATION_MCC_MNC_RECVED 0x2
+#define VAL_LOCATION_BASE_INFO_RECVED 0x4
+
+#define ValSetLocationMask(X) (ValLocationMask |= (0x7 & X))
+#define ValClearLocationMask(X) (ValLocationMask &= ~(0x7 & X))
+
+#define POWER_OFF_SPEECH_TIMEOUT (8000) /* # of msec before power off speech driver */
+#endif
+#define BURST_TYPE_SMS 0x03
+
+#define C2K_XCAL_SMS_DEFAULT_MSG_NUMBER 1
+
+#define C2K_XCAL_SMS_DEFAULT_NUM_MSGS 1
+
+/***************************************************************************
+
+ EVENT NAME: VAL_PSW_EVT_CALL_ENDED_MSG
+ DESCRIPTION:
+ Sent when the call is ended for any reason.
+ MESSAGE TYPE:
+ PswFCallEndedMsgT - Contains reason for the call ending.
+
+****************************************************************************/
+typedef enum
+{
+ VAL_PSW_ORIG_FAIL=0,
+ VAL_PSW_ORIG_CANCELED_NDSS,
+ VAL_PSW_ORIG_CANCELED,
+ VAL_PSW_INTERCEPT,
+ VAL_PSW_REORDER,
+ VAL_PSW_CC_RELEASE,
+ VAL_PSW_CC_RELEASE_SO_REJ,
+ VAL_PSW_FNM_RELEASE,
+ VAL_PSW_DIALING_COMPLETE,
+ VAL_PSW_DIALING_CONTINUE,
+ VAL_PSW_MAINTENANCE,
+ VAL_PSW_VP_ON,
+ VAL_PSW_VP_OFF,
+ VAL_PSW_PSIST_FAIL,
+ VAL_PSW_TC_RELEASE_MS,
+ VAL_PSW_TC_RELEASE_PDOWN,
+ VAL_PSW_TC_RELEASE_DISABLE,
+ VAL_PSW_TC_RELEASE_BS,
+ VAL_PSW_TC_RELEASE_SO_REJECT,
+ VAL_PSW_TC_RELEASE_TIMEOUT,
+ VAL_PSW_TC_RELEASE_ACK_FAIL,
+ VAL_PSW_TC_RELEASE_FADE,
+ VAL_PSW_TC_RELEASE_LOCK,
+ VAL_PSW_PAGE_FAIL,
+ VAL_PSW_RETRY_TIMER_ACTIVE,
+ VAL_PSW_RETRY_TIMER_INACTIVE,
+ VAL_PSW_AMPS_INSVC,
+ VAL_PSW_ORIG_REJECTED,
+ VAL_PSW_ORIG_REJECTED_SO_NOT_SUPPORTED,
+ VAL_PSW_EV_ORIG_RETRY_ORDER,
+ VAL_PSW_BUSY_ORIG_FAIL,
+ VAL_PSW_LOCKED_ORIG_FAIL,
+ VAL_PSW_TC_RELEASE_MT_CALL,
+ VAL_PSW_ORIG_BLOCKED_BY_IRAT,
+ VAL_PSW_ACCT_ORIG_FAIL,
+#ifdef MTK_CBP
+ VAL_PSW_SMS_CANCEL_BY_PWRDOWN,
+#endif
+ VAL_PSW_CALL_FAIL_MAX_PROBE,
+ VAL_PSW_SR_FINISHED_MSG=100,
+} ValPswCallEndReasonT;
+
+typedef struct
+{
+ ValPswCallEndReasonT CallEndReason;
+ PswServiceT CallType;
+ kal_uint8 SO;
+} ValPswCallEndedMsgT;
+
+typedef enum
+{
+ VAL_SO_ACCEPT = 0,
+ VAL_SO_REJECT
+}ValPswSoActionT;
+
+/* message type for VAL_SET_DEFAULT_SO_MSG */
+typedef struct
+{
+ ValPswSoActionT Action;
+ PswServiceOptionT ServiceOption;
+ PswServiceT ServiceType;
+} ValSetDefaultSOMsgT;
+
+/***************************************************************************
+
+ EVENT NAME: VAL_PSW_EVT_VOICE_PRIVACY_MSG
+ DESCRIPTION:
+ This message is used by VAL to UI callback interface to indicate whether
+ voice privacy is on or off based on VAL_EV_VP_ON/VAL_EV_VP_OFF PSW events
+ MESSAGE TYPE:
+ PswVoicePrivacyMsgT - Indicates whether voice privacy is on or off.
+
+****************************************************************************/
+typedef struct
+{
+ kal_bool VoicePrivacyOn;
+} ValPswVoicePrivacyMsgT;
+
+
+/***************************************************************************
+
+ EVENT NAME: VAL_PSW_EVT_PSSTACK_STATUS_MSG
+ DESCRIPTION:
+ This message is used by PSW to indicate the current protocol stack status.
+ MESSAGE TYPE:
+ PswPsStackStatusMsgT - Indicates the protocol stack status.
+
+****************************************************************************/
+typedef enum
+{
+ VAL_PSW_CP_ENABLED,
+ VAL_PSW_CP_SHUTTING_DOWN,
+ VAL_PSW_CP_SHUTDOWN_COMPLETE
+} ValPswPsStackStatusT;
+
+/* VAL_PSW_OTASP_IND_MSG */
+typedef enum
+{
+ VAL_PSW_OTASP_Connect,
+ VAL_PSW_OTA_Disconnect,
+ VAL_PSW_OTAPA_SessionStart,
+ VAL_PSW_OTAPA_SessionStop,
+ VAL_PSW_OTAPA_VerifyOK,
+ VAL_PSW_OTA_AkeyEx,
+ VAL_PSW_OTA_SPLUnlock,
+ VAL_PSW_OTA_SSDUpd,
+ VAL_PSW_OTA_NAMDownload,
+ VAL_PSW_OTA_MDNDownload,
+ VAL_PSW_OTA_IMSIDownload,
+ VAL_PSW_OTA_PRLDownload,
+ VAL_PSW_OTA_DataMaskCommitToNVRAM,
+ VAL_PSW_OTA_CommitOK,
+ VAL_PSW_OTA_ExcessSPCFailure,
+ VAL_PSW_OTA_AnalogCDMADownload
+} ValPswOtaStatusIndT;
+
+typedef struct
+{
+ kal_uint16 ServiceOption;
+ kal_bool ToNegotiate;
+ kal_uint8 forRc;
+ kal_uint8 revRc;
+} ValPswUpdateServiceConfigMsgT;
+
+typedef struct
+{
+ ValPswOtaStatusIndT status;
+} ValPswOtaspIndMsgT;
+
+typedef struct
+{
+ ValPswPsStackStatusT PsStackStatus;
+} ValPswPsStackStatusMsgT;
+
+/***************************************************************************
+
+ EVENT NAME: VAL_PSW_EVT_FLASH_STATUS_MSG
+ DESCRIPTION:
+ This message is used by PSW to indicate whether flash succeeded or not.
+ MESSAGE TYPE:
+ PswFlashStatuMsgT - Indicates whether flash succeeded or not.
+
+****************************************************************************/
+typedef struct
+{
+ kal_bool Succeeded;
+} ValPswFlashStatusMsgT;
+
+ /***************************************************************************
+
+ EVENT NAME: VAL_PSW_EVT_SERVICE_MSG
+ DESCRIPTION:
+ This message is used by PSW to indicate whether we have service or not.
+ MESSAGE TYPE:
+ PswServiceMsgT - Indicates the type of service we have acquired.
+
+****************************************************************************/
+
+
+/*----------------------------------------------------------------------------------------
+|Question: |
+| what's the difference between PSW_NO_SERVICE and PSW_OOSA? |
+---------------------------------------------------------------------------------------| */
+
+typedef enum
+{
+ VAL_PSW_CDMA_SERVICE_TYPE,
+ VAL_PSW_AMPS_SERVICE_TYPE
+} ValUIPswServiceT;
+
+typedef struct
+{
+ ValPswServiceStatusT ServiceStatus;
+ ValUIPswServiceT ServiceType;
+ kal_uint8 Roam; /* ROAM Status */
+ kal_uint16 Band; /* Current Operating Band */
+ kal_uint16 Channel; /* Current Channel Number */
+ kal_uint8 Mode; /* current mode: PCS/CellularAnalog */
+ kal_uint8 Block; /* current CDMA block (if CDMA system) */
+ kal_uint8 ServingSystem; /* Serving System/Block */
+ kal_uint16 SysID; /* Last-Received System ID (sid) */
+ kal_uint16 LocArea; /* Current Location Area ID (nid) */
+ kal_uint16 PilotPn; /* PILOT_PN */
+ kal_uint8 pRevInUse; /* CDMA Protocol Revision that MS uses */
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+ kal_uint16 RegZone;
+#endif
+} ValPswServiceMsgT;
+
+typedef struct
+{
+ PswServiceT CallType;
+ PswServiceOptionT ServiceOption;
+} ValPswEvtCallConnectedMsgT;
+
+typedef struct _VALRECORD_INDEX
+{
+ kal_uint8* pByteOffset;
+ kal_uint16 bitOffset;
+ kal_uint16 recNum;
+ kal_uint16 recSize;
+} VALRECORD_INDEX;
+
+typedef struct
+{
+ kal_bool valid;
+ kal_uint16 PR_LIST_SIZEs;
+ kal_uint16 PR_LIST_IDs;
+ kal_bool PREF_ONLYs;
+ kal_uint8 DEF_ROAM_INDs;
+ kal_uint16 NUM_ACQ_RECSs;
+ kal_uint16 NUM_SYS_RECSs;
+ VALRECORD_INDEX acquireTableStart;
+ VALRECORD_INDEX systemTableStart;
+ kal_uint16 PR_LIST_CRCs;
+ kal_uint16 NUM_GEO_AREASs;
+} VALPRL_HEADER;
+
+typedef struct
+{
+ kal_uint32 RegId;
+ PswCallModeT CallMode;
+ PswRequestModeT RequestMode;
+ PswServiceOptionT ServiceOpt;
+ kal_uint8 NumDigits;
+ kal_uint8 DigitsP[32];
+ PswServiceT ServiceType;
+ ValPswOtaspCodeT OtaspCode;
+} ValInitiateCallMsgT;
+
+/* ETS Message Types
+ */
+typedef struct
+{
+ RegIdT RegId;
+ kal_uint64 Akey;
+ kal_uint32 Checksum;
+} ValChangeAkeyMsgT;
+
+typedef struct
+{
+ NamNumber NamId;
+ PswNamChangedMsgT Nam;
+} ValWriteNamMsgT;
+
+typedef struct
+{
+ kal_bool PrlEnable;
+} ValSetPrlEnableMsgT;
+
+typedef struct
+{
+ NamNumber NamId;
+} ValSetActiveNamMsgT;
+
+typedef struct
+{
+ kal_uint64 Akey;
+ kal_uint32 Esn;
+} ValGetAkeyChecksumMsgT;
+
+typedef struct
+{
+ kal_uint8 numRetries;
+ kal_uint8 timeBetweenAttempts;
+ kal_uint8 timeBeforeAbort;
+} ValAutoRetryEnableMsgT;
+
+typedef struct
+{
+ kal_bool TxtMsgStatus;
+ kal_bool VoiceMsgStatus;
+ kal_bool RingAlertStatus;
+} ValAlertStatusRspMsgT;
+
+typedef struct
+{
+ kal_uint16 PrefHomeMOServiceOption;
+ kal_uint16 PrefHomeMTServiceOption;
+ kal_uint16 PrefRoamMOServiceOption;
+} ValPrefVoiceServiceOptionT;
+
+typedef struct
+{
+ kal_uint8 Response;
+ kal_uint8 Request;
+} ValPswNwkRptCpResponseMsgT;
+
+/*for call control*/
+#ifdef FEATURE_UTK
+typedef enum
+{
+ CALL_CONTROL_ALLOW_NOT_MODIFY_MSG = 0, /* the UICC responds with "allowed, no modification"*/
+ CALL_CONTROL_NOT_ALLOW_MSG, /*the UICC responds with "not allowed"*/
+ CALL_CONTROL_ALLOW_MODIFY_NOT_BEYOND_MSG,/*the UICC responds with "allowed, with modifications", and the modified request is within the terminal's capabilities*/
+ CALL_CONTROL_ALLOW_MODIFY_BEYOND_MSG, /*the UICC responds with "allowed, with modifications" , and the modified user request is beyond the terminal's capabilities,*/
+ CALL_CONTROL_RESULT_NUM
+} ValPswCallControlResultT;
+typedef struct
+{
+ ValPswCallControlResultT Result;
+ kal_bool AlphaPre; /*KAL_TRUE: alpha exist, KAL_FALSE: not exist*/
+ ValUtkTextT Alpha;
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+ kal_bool AddressPre;
+ ValUtkAddressT Address;
+ kal_bool CapCfgParamPre1;
+ ValUtkCapCfgParamT CapCfgParam1;/*Capability configuration parameters*/
+ kal_bool SubaddressPre;
+ ValUtkSubaddressT Subaddress;
+ kal_bool BC_RepeatIndPresent;
+ ValUtkBC_RepeatIndT BC_RepeatIndTLV;
+ kal_bool CapCfgParamPre2;
+ ValUtkCapCfgParamT CapCfgParam2;/*Capability configuration parameters*/
+#endif
+} ValPswEvtCallControlRspMsgT;
+typedef struct
+{
+ RegIdT RegId; /* the client ID */
+ PswCallModeT CallMode; /* Voice call type */
+ PswRequestModeT RequestMode; /* requested call type - cast to PswRequestModeT */
+ PswServiceOptionT ServiceOption; /* requested service option - cast to PswServiceOptionT */
+ ValUtkAddressT Address;
+ PswServiceT ServiceType; /* cast to PswServiceT */
+ ValPswOtaspCodeT otasp_code;
+}VapPswInitiateCallParaT;
+
+#endif
+
+typedef struct
+{
+ kal_bool (*CheckFunc)(kal_char*) ;
+} ValDialNumCheckRegMsgT;
+#ifdef MTK_DEV_C2K_IRAT
+typedef enum
+{
+ VAL_BOOT_UP_NORMAL = 0,
+ VAL_BOOT_UP_EXCEPTION,
+ VAL_BOOT_UP_NUM
+} ValBootUpModeE;
+#endif
+
+#ifdef MTK_CBP_REL_OPTIMIZE
+typedef struct
+{
+ kal_bool isMoCall; /* to indicate the released call is MO call or MT call
+ TRUE: MO call
+ FALSE:MT call
+ */
+
+ ValPswCallEndReasonT eReason;/* to indicate the release reason */
+}ValPswVsRelIndMsgT;
+#endif
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+/* Enhanced Roaming Indicators (ERI) */
+#define VAL_ERI_VERSION_WIDTH 16
+#define VAL_ERI_NUM_ENTRIES_WIDTH 6
+#define VAL_ERI_TYPE_WIDTH 3
+#define VAL_NUM_ICON_IMAGES_WIDTH 4
+#define VAL_ICON_IMAGE_TYPE_WIDTH 3
+#define VAL_ERI_INDICATOR_ID_WIDTH 8
+#define VAL_ERI_ICON_IMAGE_ID_WIDTH 4
+#define VAL_ERI_ICON_MODE_WIDTH 2
+#define VAL_ERI_CALL_PROMPT_ID_WIDTH 2
+#define VAL_ERI_ALERT_CALL_COUNTER_ID_WIDTH 3
+#define VAL_ERI_CHAR_ENCODING_TYPE_WIDTH 5
+#define VAL_ERI_TEXT_LENGTH_WIDTH 8
+#define VAL_ERI_RESERVED_FOR_CALL_PROMPT_TABLE_WIDTH 96
+
+#define VAL_MAX_ERI_TEXT_LENGTH 49
+#define VAL_MAX_ERI_ENTRIES 30
+
+/* Enhanced Roaming Indicator Parms */
+typedef struct
+{
+ kal_bool valid_entry; /* Indicates Valid Entry */
+ kal_uint8 indicator_id;
+ kal_uint8 icon_image_id;
+ kal_uint8 icon_mode;
+ kal_uint8 call_prompt_id;
+ kal_uint8 alert_call_counter_id;
+ kal_uint8 char_encoding_type;
+ kal_uint8 text_length;
+ kal_uint8 text[VAL_MAX_ERI_TEXT_LENGTH];
+}ValRoamIndicatorTable;
+
+typedef struct
+{
+ kal_uint16 version_number;
+ kal_uint8 num_entries;
+ kal_uint8 eriType;
+ kal_uint8 num_icon_images;
+ kal_uint8 icon_image_type;
+ ValRoamIndicatorTable table[VAL_MAX_ERI_ENTRIES] ;
+}ValEriFileContents;
+#endif
+/*===========================================================================
+ FUNCTION API
+===========================================================================*/
+
+/*===========================================================================
+
+FUNCTION ValPswInit
+
+DESCRIPTION
+ Initialize the Val PSW module.
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ None
+
+===========================================================================*/
+void ValPswInit( void );
+
+/*===========================================================================
+
+FUNCTION ValPswRegister
+
+DESCRIPTION
+ register ui to the VAL PSW module
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ register id
+
+===========================================================================*/
+RegIdT ValPswRegister( ValEventFunc CallBack );
+
+/*===========================================================================
+
+FUNCTION ValPswUnregister
+
+DESCRIPTION
+ Deregister ui to the VAL PSW module
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ None
+
+===========================================================================*/
+void ValPswUnregister( RegIdT RegId );
+
+/***************************************************************************
+ FUNCTION NAME: ValPswProtocolStackEnable
+ DESCRIPTION:
+ Enables or disables the protocol stack.
+
+ PARAMETERS:
+ Enable - Whether to enable or disable the protocol stack.
+ RETURNS:
+ None.
+***************************************************************************/
+void ValPswProtocolStackEnable( kal_bool Enable );
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValPswChangeServiceOption
+ DESCRIPTION: Sends a message to PSW to change the prefered service option
+ PARAMETERS: ServiceOption,
+ ToNegotiate - KAL_TRUE enables negotiation
+ forRc,
+ revRc
+ RETURNS: None
+
+*****************************************************************************/
+void ValPswChangeServiceOption( kal_uint16 ServiceOption,
+ kal_bool ToNegotiate,
+ kal_uint8 forRc,
+ kal_uint8 revRc );
+kal_bool ValPswRegDataDialNumCheckFunc(kal_bool (*CheckFunc) (kal_char*));
+void ValPswGetMobileId(void);
+
+/***************************************************************************
+ FUNCTION NAME: ValPswInitiateCall
+ DESCRIPTION:
+ Originates a phone call.
+ PARAMETERS:
+ RegId - the client ID
+ CallMode - voice call type (e.g. Normal, E911, OTASP, WPS)
+ RequestMode - requested call type
+ NumDigits - number of digits to be dialled
+ DigitsP - CP_MAX_CALLING_PARTY_NUMBER_SIZE + 1 array of ascii digits,
+ null terminated string
+ ServiceType - call type (e.g. voice, async, fax, hspd, SMS, loopback)
+ otasp_code - target system for OTASP Orig.
+ RETURNS:
+ True if the message for originating call is sent to PSW
+***************************************************************************/
+kal_bool ValPswInitiateCall(RegIdT RegId, /* the client ID */
+ PswRequestModeT RequestMode, /* requested call type*/
+ PswServiceOptionT SO, /* requested service option */
+ kal_bool PrivacyMode, /* voice privacy indicator */
+ kal_bool DigitMode, /* digit encoding indicator */
+ PswNumberTypeT NumberType, /* type of number */
+ PswNumberPlanT NumberPlan, /* numbering plan */
+ kal_uint8 NumDigits, /* number of digits to be dialled */
+ kal_uint8* DigitsP, /* CP_MAX_CALLING_PARTY_NUMBER_SIZE + 1 array */
+ /* of ascii digits, null terminated string */
+ PswServiceT SrvTyp,
+ kal_bool E911,
+ kal_bool Otasp,
+ ValPswOtaspCodeT OtaspCode );
+
+/***************************************************************************
+ FUNCTION NAME: ValPswAnswerCall
+ DESCRIPTION:
+ Answer the incoming call.
+
+ PARAMETERS:
+ RegId - the client ID.
+
+ RETURNS:
+ True if the message for answering call is sent to PSW
+***************************************************************************/
+kal_bool ValPswAnswerCall( RegIdT RegId );
+
+/***************************************************************************
+ FUNCTION NAME: ValPswHangupCall
+ DESCRIPTION:
+ End the current call.
+ PARAMETERS:
+ RegId - the client ID.
+ RETURNS:
+ True if the Nam could be written.
+***************************************************************************/
+kal_bool ValPswHangupCall( RegIdT RegId );
+
+/***************************************************************************
+ FUNCTION NAME: ValPswHookFlash
+ DESCRIPTION:
+ Sends a hookflash message with parameters to the base station
+ (CDMA 2000 Layer 3 2.7.4).
+ VAL_PSW_FLASH_STATUS_MSG returns the status.
+ PARAMETERS:
+ RegId - the client ID
+ KeypadFacilityP - the information to be sent in the message "flash with information"
+ RETURNS
+ True if the message for ending call is sent to PSW
+***************************************************************************/
+kal_bool ValPswHookFlash( RegIdT RegId, /* the client ID */
+ kal_uint8* KeypadFacilityP ); /* Incl NULL terminator */
+
+
+/***************************************************************************
+ FUNCTION NAME: ValPswSendBurstDTMF
+ DESCRIPTION:
+ Send burst DTMF tone to the base station.
+ PARAMETERS:
+ RegId - the client ID.
+ NumDigits - Number of digits in the Digits array.
+ DtmfOnLength - Length each tone/digit should be on for.
+ DtmfOffLength - Length the tone generator should be off for between tones
+ Digits - Which digits should be sent.
+ RETURNS:
+ True if the message for playing burst DTMF is sent to PSW
+***************************************************************************/
+kal_bool ValPswSendBurstDTMF( RegIdT RegId,
+ kal_uint8 NumDigits,
+ kal_uint8 DtmfOnLength,
+ kal_uint8 DtmfOffLength,
+ kal_uint8* DigitsP );
+
+/***************************************************************************
+ FUNCTION NAME: ValPswSendContDTMFOn
+ DESCRIPTION:
+ Send a continuous DTMF tone to the base station.
+ PARAMETERS:
+ RegId - the client ID.
+ Digit - Which digit should be sent.
+ RETURNS:
+ True if the message for playing continual DTMF is sent to PSW
+***************************************************************************/
+kal_bool ValPswSendContDTMFOn( RegIdT RegId,
+ kal_uint8 Digit );
+
+/***************************************************************************
+ FUNCTION NAME: ValPswSendContDTMFOff
+ DESCRIPTION:
+ Stop sending a continuous DTMF tone to the base station.
+ PARAMETERS:
+ RegId - the client ID.
+ RETURNS:
+ True if the Nam could be written.
+***************************************************************************/
+kal_bool ValPswSendContDTMFOff();
+
+kal_bool ValContinualDtmfStatus(void);
+
+/***************************************************************************
+ FUNCTION NAME: ValPswReadNam
+ DESCRIPTION:
+ Fills in the given NAM structure with the NAM information
+----------------------------------------------------------------------------------------
+| The procedure is as follows: |
+| 1. VAL sends message to get NAM and return. |
+| 2. After getting NAM PSW sends a message to VAL. |
+| 3. VAL forwords this message to UI |
+---------------------------------------------------------------------------------------|
+ PARAMETERS:
+ RegId - the client ID.
+ NamNumber - Number of the NAM requested starting at NAM 0.
+ RETURNS:
+ True if the message for stopping burst DTMF is sent to PSW
+***************************************************************************/
+kal_bool ValPswReadNam( RegIdT RegId,
+ NamNumber NamId );
+
+/***************************************************************************
+ FUNCTION NAME: ValPswWriteNam
+ DESCRIPTION:
+ Writes the given NAM structure.
+----------------------------------------------------------------------------------------
+|Attention: |
+| The procedure is as follows: |
+| 1. VAL sends message to update Akey and return. |
+| 2. After updating Akey PSW sends a message to VAL. |
+| 3. VAL forwards this message to UI |
+---------------------------------------------------------------------------------------|
+ PARAMETERS:
+ RegId - the client ID.
+ NamP - a pointer to the NAM structure that needs to be filled in.
+
+ RETURNS:
+ True if the Nam is read.
+***************************************************************************/
+kal_bool ValPswWriteNam( RegIdT RegId,
+ PswNamChangedMsgT* NamP );
+
+void ValPswGetActiveNam( void );
+
+void ValPswSetActiveNam( NamNumber NamId );
+
+void ValPswCPPowerCtrl (kal_bool PowerUpCtrl);
+
+#ifdef MTK_DEV_C2K_IRAT
+kal_bool ValPswGetPowerCycleInfo(void);
+kal_bool ValPswGetPowerOnNeedInfo(void);
+void ValPswSetPowerCycleInfo(kal_bool Needed);
+void ValPswSetPowerOnNeedInfo(kal_bool Needed);
+#endif
+
+#if 0
+/* under construction !*/
+#endif
+
+/***************************************************************************
+FUNCTION NAME:
+ ValPswGetAKeyChecksum
+
+DESCRIPTION:
+ Send a message to the protocol stack to get the Akey Checksum.
+ This is necessary to provide the UI with a mechanism to check the checksum
+ input by the user versus the calculated checksum produced by this interface.
+
+PARAMETERS:
+ Akey - 20 digit Authentication KEY
+ Esn - Electronic Serial Number
+
+RETURN VALUE:
+ <NONE>
+***************************************************************************/
+void ValPswGetAKeyChecksum( kal_uint64 AKey,
+ kal_uint32 Esn );
+
+/***************************************************************************
+ FUNCTION NAME: ValPswChangeAKey
+ DESCRIPTION:
+ Change the Akey and Akey checksum
+----------------------------------------------------------------------------------------
+|Attention: |
+| The procedure is as follows: |
+| 1. VAL sends message to write NAM and return. |
+| 2. After writting NAM PSW sends a message to VAL. |
+| 3. VAL forwords this message to UI |
+---------------------------------------------------------------------------------------|
+ PARAMETERS:
+ RegId - the client ID.
+ Akey - The new Akey.
+ Checksum - The new Checksum that corresponds to the Akey and ESN combo.
+ RETURNS:
+ True if the Nam is written.
+***************************************************************************/
+kal_bool ValPswChangeAKey( RegIdT RegId,
+ kal_uint64 Akey,
+ kal_uint32 Checksum );
+
+/***************************************************************************
+FUNCTION NAME:
+ ValPswSetPrlEnable
+
+DESCRIPTION:
+ Send a message to the protocol stack to enable/disable Preferred Roaming List(s).
+
+PARAMETERS:
+ Nam1PrlEnable - KAL_TRUE to enable PRL for NAM 1
+ Nam2PrlEnable - KAL_TRUE to enable PRL for NAM 2
+
+RETURN VALUE:
+ <NONE>
+***************************************************************************/
+void ValPswSetPrlEnable( kal_bool PrlEnable );
+
+/*===========================================================================
+
+FUNCTION ValPswDeliverMail
+
+DESCRIPTION
+ Callback to support CP messages from PSW.
+
+DEPENDENCIES
+ None
+
+RETURN VALUE
+ kal_boolean indicating whether the message was handled.
+
+===========================================================================*/
+kal_bool ValPswDeliverMail( kal_uint32 msg_id,
+ void* msg_buffer,
+ kal_uint32 msg_size );
+
+/*===========================================================================
+
+FUNCTION ValPswE911Disable
+
+DESCRIPTION:
+ Send a message to the protocol stack to disable Emergency 911 Mode.
+
+PARAMETERS:
+ <NONE>
+
+RETURN VALUE:
+ <NONE>
+===========================================================================*/
+void ValPswE911Disable( void );
+void ValPswE911Enable( void );
+/*===========================================================================
+
+FUNCTION ValTstModeSetMobPRev
+
+DESCRIPTION:
+ Send a message to the protocol stack to force the Mobile PREV to a certain revision.
+
+PARAMETERS:
+ <kal_uint8 PRev>
+
+RETURN VALUE:
+ <NONE>
+===========================================================================*/
+void ValTstModeSetMobPRev(kal_uint8 p_rev);
+
+#ifdef MTK_CBP
+/***************************************************************************
+ FUNCTION NAME: ValPswModeSetMobPRev()
+
+ DESCRIPTION: the API to set MS Prev Supported in the Nam
+
+ PARAMETERS: p_rev
+
+ RETURNS: void
+***************************************************************************/
+void ValPswModeSetMobPRev(kal_uint8 uPrev);
+
+#endif
+
+/*===========================================================================
+
+FUNCTION ValPswAutoRetryEnable
+
+DESCRIPTION:
+ Send a message to the protocol stack to Enable Auto Retry and set the retry
+ attempt parameters.
+
+PARAMETERS:
+ numRetries - number of times to attempt to retry origination before
+ aborting
+ timeBetweenAttempts - time (in seconds) between retries
+ timeBeforeAbort - total time (in seconds) between original origination
+ request and abort.
+
+ NOTE: Abortion is determined by whichever comes first - number of retries
+ reaches numRetries OR time from original request reaches timeBeforeAbort.
+
+RETURN VALUE:
+ <NONE>
+===========================================================================*/
+void ValPswAutoRetryEnable( kal_uint8 numAttempts,
+ kal_uint8 timeBetweenAttempts,
+ kal_uint8 timeBeforeAbort );
+
+/*===========================================================================
+FUNCTION
+ ValPswAutoRetryDisable
+
+DESCRIPTION:
+ Send a message to the protocol stack to disable Auto Retry
+
+PARAMETERS:
+ <NONE>
+
+RETURN VALUE:
+ <NONE>
+===========================================================================*/
+void ValPswAutoRetryDisable( void );
+
+/*===========================================================================
+FUNCTION
+ ValPswAutoRetryDisable
+
+DESCRIPTION:
+Check the Silent Retry status.
+
+PARAMETERS:
+ <NONE>
+
+RETURN VALUE:
+ Boolean indicating whether Silent Retry is enabled.
+===========================================================================*/
+kal_bool ValPswIsSilentRetryEnabled( void );
+
+/*===========================================================================
+ FUNCTION
+ ValPswSetPrivacyMode
+
+ DESCRIPTION:
+ Enable/Disable Call Privacy Mode.
+
+ PARAMETERS:
+ Mode - call privacy mode enable(KAL_TRUE)/disable(KAL_FALSE)
+
+ RETURNS:
+ <NONE>
+===========================================================================*/
+void ValPswSetPrivacyMode( kal_bool Mode );
+
+
+
+/*===========================================================================
+ FUNCTION
+ ValPswSetDDTMMode
+
+ DESCRIPTION:
+ Enable/Disable DDTM Mode.
+
+ PARAMETERS:
+ Mode - DDTM mode enable(TRUE)/disable(FALSE)
+
+ RETURNS:
+ <NONE>
+===========================================================================*/
+
+void ValPswSetDDTMMode( kal_bool Mode );
+
+
+/*===========================================================================
+FUNCTION
+ ValPswServiceOption
+
+DESCRIPTION:
+ Get the current service option
+
+PARAMETERS:
+ <NONE>
+
+RETURN VALUE:
+ the current service option
+===========================================================================*/
+PswServiceOptionT ValPswServiceOption( void );
+#if (defined(__TC10__) && defined(MTK_CBP))
+
+void ValPswSetServiceOption( PswServiceOptionT SO );
+
+#endif
+
+/*===========================================================================
+FUNCTION
+ ValPswServiceType
+
+DESCRIPTION:
+ Send a message to the protocol stack to disable Auto Retry
+
+PARAMETERS:
+ <NONE>
+
+RETURN VALUE:
+ the current Service Type
+===========================================================================*/
+PswServiceT ValPswServiceType( void );
+
+/*===========================================================================
+
+FUNCTION ValPswLocationSvcCfg
+
+DESCRIPTION
+ Set location privacy flag in loc_svc
+
+DEPENDENCIES
+ Mode - KAL_TRUE if privacy is on
+
+RETURN VALUE
+ void
+
+===========================================================================*/
+extern void ValPswLocationSvcCfg( kal_bool Mode );
+
+/*===========================================================================
+
+FUNCTION ValHrpPswProtocolStackEnable
+
+DESCRIPTION
+
+DEPENDENCIES
+
+RETURN VALUE
+
+===========================================================================*/
+void ValHrpPswProtocolStackEnable(kal_bool enable);
+
+/*===========================================================================
+
+FUNCTION ValPswIsEmergencyCall
+
+DESCRIPTION
+ Check to see if it's an emergency call.
+
+DEPENDENCIES
+ Valid input parameters.
+
+RETURN VALUE
+ kal_bool - KAL_TRUE : if in the table; KAL_FALSE : otherwise
+
+===========================================================================*/
+ kal_bool ValPswIsEmergencyCall(kal_uint8 NumDigits, kal_uint8 *DigitsP);
+ kal_bool ValPswAndUimIsEmergencyCall(kal_uint8 NumDigits, kal_uint8 *DigitsP);
+#ifdef MTK_CBP
+kal_bool ValNumIsEmergencyCall(kal_uint8 NumDigits, kal_uint8 *DigitsP);
+#endif
+
+void ValPswCustomFeature(kal_uint32 MsgCustomFeature);
+void ValPswHangupDataCall(RegIdT RegId);
+void ValPswDataCallPreArrange(RegIdT RegId,DsPreArangT paType);
+/*===========================================================================
+FUNCTION ValGetAlertStatusMsg
+DESCRIPTION UTS Alert Status API support.
+DEPENDENCIES ValGetAlertStatusMsgT* MsgDataP
+RETURN VALUE None
+===========================================================================*/
+void ValGetAlertStatusMsg(ValGetAlertStatusMsgT* MsgDataP);
+
+/***************************************************************************
+ FUNCTION NAME: ValPswPowerCycle
+
+ DESCRIPTION: Execute virtual power down then power up
+
+ PARAMETERS: None
+
+ RETURNS: kal_uint8
+***************************************************************************/
+void ValPswPowerCycle(void);
+kal_int32 PswFGetTimeZone(void);
+/*for call control*/
+#ifdef FEATURE_UTK
+/*===========================================================================
+FUNCTION ValPswSetCallControl
+
+DESCRIPTION: Set the call control enable or disable flag;
+
+DEPENDENCIES:
+ flag - true means user enable call control, false means user disable call control.
+RETURN VALUE:
+ null
+===========================================================================*/
+void ValPswSetCallControl(kal_bool flag);
+/*===========================================================================
+FUNCTION ValPswSetCallControl
+
+DESCRIPTION: get the call control enable or disable flag;
+
+DEPENDENCIES:
+ null
+RETURN VALUE:
+ KAL_TRUE or KAL_FALSE
+===========================================================================*/
+kal_bool ValPswGetCallControl(void);
+
+/*===========================================================================
+FUNCTION ValPswProCallControlRsp
+
+DESCRIPTION: process the call control rsp
+
+DEPENDENCIES:
+ null
+RETURN VALUE:
+ KAL_TRUE or KAL_FALSE
+===========================================================================*/
+void ValPswProCallControlRsp(ValUtkCallControlIndT* pCallControl );
+
+/***************************************************************************
+ FUNCTION NAME: ValPswGetLocationInfo
+
+ DESCRIPTION: Return the Current Local Information in PSW.
+
+ PARAMETERS:
+ ValUtkLocInfoCmdQualT Type,
+ ValUtkLocalInfoT * Info
+
+ RETURNS: ValUtkGenResultT
+***************************************************************************/
+ValUtkGenResultT ValPswGetLocationInfo( ValUtkLocInfoCmdQualT Type, ValUtkLocalInfoT * Info);
+
+/***************************************************************************
+ FUNCTION NAME: ValPswGetProRevInUse
+
+ DESCRIPTION: Return the Current protocol revision in use
+
+ PARAMETERS:
+ None
+
+ RETURNS: kal_uint8
+***************************************************************************/
+kal_uint8 ValPswGetProRevInUse(void);
+
+/*===========================================================================
+ FUNCTION: ValPswGetAccInfo()
+ DESCRIPTION: Transfer Location format from structure to array.
+ DEPENDENCIES: None
+ RETURN VALUE None
+===========================================================================*/
+void ValPswGetAccInfo(kal_uint8 *AccessInfo);
+#endif
+
+kal_bool ValGetNeedSleepReqFlag(void);
+void ValSetNeedSleepReqFlag(kal_bool needCall);
+kal_int32 ValPswGetTimeZone(void);
+#ifdef SYS_OPTION_ENHANCEDAT
+kal_int32 ValATPswGetTimeZone(void); /* Time Zone -47~48 (uint 30 minutes) */
+kal_bool ValPswGetVP(void);
+kal_int8 ValATGetLtm(void);
+kal_uint8 ValATGetDaylt(void);
+#endif
+void ValSetATUimState(ATUimStateT stat);
+#ifdef MTK_CBP
+ATUimStateT ValMapCardStatusToATUimState(kal_uint32 uimCardType);
+#endif
+void ValDeepSleepRequest( kal_int32 SleepDuration);
+ATUimStateT ValGetATUimState(void);
+#ifdef MTK_CBP
+extern kal_bool EpofReceived;
+void ValFlightModeSleep(kal_int32 SleepDuration);
+#endif
+#ifdef MTK_DEV_C2K_IRAT
+extern kal_bool CcIrqClosed;
+extern kal_bool ValIsDefaultEmdstatusFlowVersion(void);
+extern void ValCssCsRegStatusNotifyIndMsg(ValCssCsRegStatusNotifyIndMsgT* csRegStatusP);
+#endif
+
+#ifdef MTK_CBP
+ATUimStateT ValATConvertUimStateForApUse(void);
+#endif
+CTATUimStateT ATtoCTUimState(ATUimStateT uimState);
+void SendSIMSTToAtc(ATUimStateT uimState);
+#if 0
+/* under construction !*/
+#endif
+#ifdef MTK_DEV_FACTORY_MODE
+void SendESIMSToAtc(ATUimStateT uimState);
+#endif
+#ifdef MTK_CBP
+void SendEvocdToAtc (EvocdCodec codec);
+#endif
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+ValCarrierIdEnumT ValGetCarrierIdFromMccMnc(void);
+#endif
+kal_uint32 TimeDivide(kal_uint32 Second, kal_uint32 value, kal_uint32 *returnValue);
+kal_uint8 ValGetMonthFromDays(kal_uint32 days,kal_uint32 year, kal_uint32 *returnDays);
+void GetDateFromSeconds (kal_uint32 totalSeconds, kal_uint32* yearP, kal_uint32* dayP, kal_uint32* monthP);
+void ValMccToAsc(kal_uint8 *buf, kal_uint16 mcc);
+void ValMncToAsc(kal_uint8 *buf, kal_uint16 mnc);
+void ValMin2ToAsc(kal_uint8 *buf, kal_uint16 area_code);
+void ValMin1ToAsc(kal_uint8 *buf, kal_uint32 phone_no);
+kal_uint8 ValAscToMnc(kal_uint8 *buf);
+kal_uint16 ValAscToMcc(kal_uint8 *buf);
+kal_uint16 ValAscToMin2(kal_uint8 *buf);
+kal_uint32 ValAscToMin1(kal_uint8 *buf);
+kal_int32 text_to_7bit_char_stream (kal_uint8* p_dest, const kal_uint8* p_src, kal_int32 numFields);
+void ValCssMarkCurrent1XSystemAsNegative(CssMarkSystemMsgT * MsgP );
+ValPswStateT ValPswGetPswState(void);
+void ValPswProcessRssiReport(kal_int16 Rssi);
+void ValSet_LTETxPwrInfoReportMode(kal_uint8 Mode);
+void ValGet_LTETxPwrInfo(void);
+void ValPswOosaWakeupReq(void);
+void ValPswManualAvoid(void);
+#ifdef SYS_OPTION_ENHANCEDAT
+void ATCmdSmsRegister(void);
+#endif
+#ifdef SYS_OPTION_RLP
+void ValPswResetRlpStat( void );
+void ValPswQueryRlpStat( void );
+void ValPswGetRlpStat(RlpQueryStatIndMsgT *DataP);
+
+#endif
+void ValPswSetEmergenceCardInit(kal_uint8 IsEmergence);
+void ValPswRegResume(void);
+#ifdef MTK_CBP
+void ValPswOtaSetPowerUpMode(kal_uint8 mode );
+kal_bool ValIsActivedBand(SysCdmaBandT band);
+kal_bool ValIsBandChannelActivate(SysBandChannelT *bandChannel);
+kal_uint32 ValGetAllSupportedBand(void);
+kal_uint32 ValGetAllActivedBand(void);
+kal_bool ValSetActivedBand(kal_uint32 uBandMask);
+
+kal_bool ValIsRegTypeEnabled(reg_type_enum enRegType);
+kal_bool ValSetRegTypeValue(reg_type_enum enRegType, kal_uint8 regTypeValue);
+
+
+void ValPswModeSetMobPRev(kal_uint8 uPrev);
+kal_uint8* ValPswModeGetMobPRev(void);
+kal_uint8 ValPswGetMdn(kal_char *pMdnStr);
+kal_bool ValPswSetMdn(kal_char *pMdnStr);
+//kal_uint16 ValPswGetHomeSid(void);
+kal_bool ValPswSetHomeSid(kal_uint16 uSid);
+
+kal_bool ValPswSetIMSIS1(kal_char* pImsiS1Str, PswMsidFieldToUpdate UpdateField);
+kal_bool ValPswSetIMSIS2(kal_char* pImsiS2Str, PswMsidFieldToUpdate UpdateField);
+void ValPswSetMSIDUpdateField
+(
+ PswSetEncodedMSID_APIStruct *stEnCodeMSid,
+ kal_uint8 enMSidField,
+ kal_uint32 uMSidValue
+);
+
+kal_bool ValPswSetMSID
+(
+ PswMsidFieldToUpdate UpdateField,
+ kal_uint8 enMSidField,
+ kal_uint32 uMSidValue
+);
+
+kal_bool ValPswSetAccolc
+(
+ kal_uint8 uAccolc
+);
+
+kal_bool ValPswSetSCI
+(
+ kal_uint8 uSci
+);
+
+kal_bool ValPswSetSCM
+(
+ kal_uint8 *pScm
+);
+
+kal_bool ValPswSetPrefHomeMTSo
+(
+ kal_uint16 uHomeMtSo
+);
+
+kal_bool ValPswSetPrefHomeMOSo
+(
+ kal_uint16 uHomeMoSo
+);
+
+kal_bool ValPswSetPrefRoamMOSo
+(
+ kal_uint16 uRoamMoSo
+);
+
+kal_bool ValPswSetPrefSo
+(
+ kal_uint16 uPrefSo
+);
+
+kal_bool ValPswSetPrefRC
+(
+ kal_uint8 uPrefRC
+);
+
+kal_bool GetEVRCState(void);
+
+kal_bool ValPswSetEVRCape
+(
+ kal_bool bEvrcCape
+);
+
+kal_bool ValPswSetEvrcbSwitch
+(
+ kal_bool bSupport
+);
+kal_bool ValPswSetEvrcSwitch
+(
+ kal_bool bSupport
+);
+
+
+void ValUpdateSoForVoiceCall(kal_uint16 ServiceOption, kal_bool bSupport);
+
+kal_bool ValPswSetSlottedMode
+(
+ kal_bool bSlottedModeAllowed
+);
+
+void ValPswGetSlottedMode
+(
+ void
+);
+
+void ValPswSetSltModeBitOfScm
+(
+ kal_uint8 *pScm,
+ kal_bool bSltModeflag
+);
+
+kal_bool ValPswSetHomeSysReg
+(
+ kal_bool bHomeSysReg
+);
+
+void ValPswGetHomeSysReg
+(
+ void
+);
+
+kal_bool ValPswSetForeignSidReg
+(
+ kal_bool bFSidReg
+);
+
+void ValPswGetForeignSidReg
+(
+ void
+);
+
+kal_bool ValPswSetForeignNidReg
+(
+ kal_bool bFNidReg
+);
+
+void ValPswGetForeignNidReg
+(
+ void
+);
+kal_bool ValPswSetHomeNid(kal_uint16 uNid);
+
+kal_uint16 ValPswGetPrefHomeMTSo(void);
+kal_uint16 ValPswGetPrefHomeMOSo(void);
+kal_uint16 ValPswGetPrefRoamMOSo(void);
+kal_uint16 ValPswGetPrefSo(void);
+kal_bool ValIsLTEActivate(void);
+
+extern void UpdatePrefFwdRCForVoiceCall(kal_uint8 forRc);
+extern void UpdatePrefTestSO(kal_uint16 ServiceOption);
+
+kal_bool ValNoNeedPowerOffRegister(void);
+
+#endif
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+/*ERI feature*/
+void ValEriTableInit(void);
+#endif
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+
+/*****************************************************************************
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+*****************************************************************************/
+
+/*****************************************************************************
+* End of File
+*****************************************************************************/
+#endif
+/**Log information: \main\CBP80\cbp80_cshen_scbp10098\1 2012-07-26 06:27:51 GMT cshen
+** cbp80_cshen_scbp10098**/
+/**Log information: \main\CBP80\cbp80_gdeng_scbp10325\1 2012-09-20 06:30:03 GMT gdeng
+** HREF#10325**/
+/**Log information: \main\Trophy\Trophy_hjin_href1623\1 2013-04-03 02:28:49 GMT hjin
+** HANDROID#1623: bug fix for MO,MT call conflict**/
+/**Log information: \main\Trophy\1 2013-04-03 02:43:01 GMT cshen
+** href#1623**/
+/**Log information: \main\Trophy\SMART\1 2013-04-25 09:46:47 GMT yxma
+** HREF#22182, add custom lock feature to smartfren
+|**/
+
diff --git a/mcu/interface/protocol/l4_c2k/valsmsapi.h b/mcu/interface/protocol/l4_c2k/valsmsapi.h
new file mode 100644
index 0000000..7ea5e2a
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valsmsapi.h
@@ -0,0 +1,831 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2006-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef VALSMSAPI_H
+#define VALSMSAPI_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*===========================================================================
+
+ V A L S M S A P I H E A D E R F I L E
+
+ This file contains the exported interfaces for the SMS
+ module of the VIA Abstraction Layer.
+
+
+===========================================================================*/
+
+#include "sysdefs.h"
+#include "valapi.h"
+#include "valsmsdefine.h"
+#include "c2k_nvram_def.h"
+#include "c2k_sms_struct.h"
+#include "kal_public_defs.h"
+
+
+#define VAL_SMS_MAX_REGISTERED_IDS 10 /*!< Max registered app */
+#define VAL_SMS_TELESRVID_COUNT 20 /*!< Max registered teleservice id */
+#define VAL_SMS_MAX_SMS_PDU_LEN 253 /*!< Max sms pdu length */
+#define VAL_SMS_CLASS_SUCESS 0
+#define VAL_SMS_CAUSECODE_SUCESS 32768
+#define VAL_SMS_MOSEQ_ID_MAX 0xFE
+#define VAL_MAX_SAVED_SMS_ID_PAIR 20
+#define VAL_SMS_MO_TYPE_3GPP2 01
+#define VAL_SMS_TRANS_LEN 10
+#define CNMATIMEOUT 2000 /* according 3gpp2 spec, SMS ack should be returned in 2 seconds. */
+
+/*Timer duration of CNMA for UIM related MT SMS, sometimes SIM takes more than 2s to handle the data.*/
+#define CNMA_TIMEOUT_FOR_UIM_SMS 5000
+
+
+#ifdef MTK_CBP_ENCRYPT_VOICE
+#define MODE_MANUAL 0
+#define MODE_AUTO 1
+#define NUMBER_MAX_LEN 11
+
+typedef enum
+{
+ VAL_SMS_MODE_ERROR,
+ VAL_SMS_DECRYPT_ERROR,
+ VAL_SMS_SIGNATURE_VERFY_ERROR,
+ VAL_SMS_SEND_FAIL,
+ VAL_SMS_OTHER_ERROR,
+} ValSmsReportErrClassT;
+
+#endif
+
+/*! Sms in PDU format*/
+typedef struct
+{
+ kal_uint8 SmsState;
+#ifdef MTK_CBP_ENCRYPT_VOICE
+ kal_bool CryptSmsPres;
+#endif
+ kal_uint8 SmsLength;
+ kal_uint8 SmsData[VAL_SMS_MAX_SMS_PDU_LEN];
+} ValSmsPduRecordT;
+
+typedef struct
+{
+ kal_uint16 SeqNum;
+ ValSmsPduRecordT PduRecord;
+}ValSmsRecordT;
+
+/*! Val sms sending info */
+typedef struct
+{
+ kal_bool Acked; /*!< Acked flag */
+ kal_uint16 MoSeqNum; /*!< Sending equence number */
+#ifdef SYS_OPTION_NO_UI
+ kal_uint16 StoredRecId;
+#endif
+} ValSmsSendInfoT;
+
+/*! Val sms Updating status */
+typedef enum
+{
+ VAL_SMS_UPDATE_NONE, /*!< Free for update */
+ VAL_SMS_UPDATE_BUSY /*!< Busy for update */
+}ValSmsUpdateStatusIdT;
+
+/*! Val sms update info */
+typedef struct
+{
+ kal_uint16 UpdateRecId; /*!< Update recored id */
+ ValSmsUpdateStatusIdT UpdateStatus; /*!< Update status */
+} ValSmsUpdateInfoT;
+
+#ifdef SYS_OPTION_NO_UI
+typedef enum
+{
+ VAL_SMS_EVENT_INCOMING_MESSAGE = 0x00000001,
+ VAL_SMS_EVENT_SEND_STATUS_MESSAGE,
+ VAL_SMS_EVENT_MEM_STATUS_MESSAGE,
+ VAL_SMS_EVENT_SMS_WRITE_ERR_MESSAGE, /*incoming msg write error event*/
+ VAL_SMS_EVENT_SMS_SRV_READY_MESSAGE, /*the vsms service is ready*/
+ VAL_SMS_EVENT_SMS_RECEIVED_BUT_MEM_FULL, /*received a msg, but memory full, so the msg lost*/
+ VAL_SMS_MAX_EVENTS
+} ValSmsEventIdT;
+#else
+typedef kal_uint32 ValSmsEventIdT;
+#endif
+/*! SMS callback function structure */
+typedef void (*ValSmsEventFunc) ( RegIdT RegId, ValSmsEventIdT Event, void *MsgP );
+
+/*! SMS Event register table structure */
+typedef struct
+{
+ kal_bool IsUse; /*!< if this entry is in use */
+ kal_uint8 NumTeleSrvId; /*!< Teleservice Id count */
+ kal_uint16 TeleSrvId[VAL_SMS_TELESRVID_COUNT]; /*!< Teleservice id */
+ ValSmsEventFunc CallBack; /*!< Function to call back */
+} ValSmsRegTableT;
+
+/*! VAL SMS general result type */
+typedef enum
+{
+ VAL_SMS_SUCCESS,
+ VAL_SMS_ERR_SMS_NOT_READY,
+ VAL_SMS_ERR_MSG_FORMAT,
+ VAL_SMS_ERR_INVALID_PARAMETER,
+ VAL_SMS_ERR_BUSY_SENDING, /* while a register application send a sms message while the previous was not acknowleged*/
+ VAL_SMS_ERR_DESTINATION_BUSY,
+ VAL_SMS_ERR_NO_MEMORY,
+ VAL_SMS_FDN_APPROVE_REQ_SENT,
+ VAL_SMS_FDN_APPROVE_FAILED = 14,
+ VAL_SMS_ERR_OTHER_FAILED
+#ifdef __TC10_IPC_CDMA_SUPPORT__
+ ,VAL_SMS_ERR_FDN
+#endif
+} ValSmsResultT;
+
+/*! Sms terminal status */
+typedef enum
+{
+ VAL_SMS_NO_TERMINAL_PROBLEMS,
+ VAL_SMS_DESTINATION_RESOURSE_SHORTAGE,
+ VAL_SMS_DESTINATION_OUT_OF_SERVICE,
+ VAL_SMS_MAX_TERM_STATUS
+} ValSmsTermStatusT;
+
+#define IS_VALID_SMS_TERM_STATUS(a) ((VAL_SMS_NO_TERMINAL_PROBLEMS <= (a)) && ((a) < VAL_SMS_MAX_TERM_STATUS))
+
+/*! Val sms cause code define */
+typedef enum
+{
+ VAL_SMS_CC_ADDRESS_VACANT = 0,
+ VAL_SMS_CC_ADDRESS_TRANSLATION_FAILURE = 1,
+ VAL_SMS_CC_NETWORK_RESOURCE_SHORTAGE = 2,
+ VAL_SMS_CC_NETWORK_FAILURE = 3,
+ VAL_SMS_CC_INVALID_TELESERVICE_ID = 4,
+ VAL_SMS_CC_OTHER_NETWORK_PROBLEM = 5,
+ VAL_SMS_CC_OTHER_NETWORK_PROBLEM_MORE_FIRST = 6,
+ VAL_SMS_CC_OTHER_NETWORK_PROBLEM_MORE_LAST = 31,
+ VAL_SMS_CC_NO_PAGE_RESPONSE_S = 32,
+ VAL_SMS_CC_DESTINATION_BUSY = 33,
+ VAL_SMS_CC_NO_ACKNOWLEDGEMENT = 34,
+ VAL_SMS_CC_DESTINATION_RESOURCE_SHORTAGE = 35,
+ VAL_SMS_CC_SMS_DELIVERY_POSTPONED = 36,
+ VAL_SMS_CC_DESTINATION_OUT_OF_SERVICE = 37,
+ VAL_SMS_CC_DESTINATION_NO_LONGER_AT_THIS_ADDRESS = 38,
+ VAL_SMS_CC_OTHER_TERMINAL_PROBLEM = 39,
+ VAL_SMS_CC_OTHER_TERMINAL_PROBLEM_FIRST = 40,
+ VAL_SMS_CC_OTHER_TERMINAL_PROBLEM_LAST = 47,
+ VAL_SMS_CC_SMS_DELIVER_POSTPONED_MORE_FIRST = 48,
+ VAL_SMS_CC_SMS_DELIVER_POSTPONED_MORE_LAST = 63,
+ VAL_SMS_CC_RADIO_INTERFACE_RESOURCE_SHORTAGE = 64,
+ VAL_SMS_CC_RADIO_INTERFACE_INCOMPATIBILITY = 65,
+ VAL_SMS_CC_OTHER_RADIO_INTERFACE_PROBLEM = 66,
+ VAL_SMS_CC_OTHER_RADIO_IF_PROBLEM_MORE_FIRST = 67,
+ VAL_SMS_CC_OTHER_RADIO_IF_PROBLEM_MORE_LAST = 95,
+ VAL_SMS_CC_ENCODING_PROBLEM = 96,
+ VAL_SMS_CC_SMS_ORIGINATION_DENIED = 97,
+ VAL_SMS_CC_SMS_TERMINATION_DENIED = 98,
+ VAL_SMS_CC_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED = 99,
+ VAL_SMS_CC_SMS_NOT_SUPPORTED = 100,
+ VAL_SMS_CC_RESERVED = 101,
+ VAL_SMS_CC_MISSING_EXPECTED_PARAMETER = 102,
+ VAL_SMS_CC_MISSING_MANDATORY_PARAMETER = 103,
+ VAL_SMS_CC_UNRECOGNIZED_PARAMETER_VALUE = 104,
+ VAL_SMS_CC_UNEXPECTED_PARAMETER_VALUE = 105,
+ VAL_SMS_CC_USER_DATA_SIZE_ERROR = 106,
+ VAL_SMS_CC_OTHER_GENERAL_PROBLEMS = 107,
+ VAL_SMS_CC_OTHER_GENERAL_PROBLEMS_MORE_FIRST = 108,
+ VAL_SMS_CC_OTHER_GENERAL_PROBLEMS_MORE_LAST = 255,
+ VAL_SMS_CC_MESSAGE_DELIVERED_SUCCESSFULLY = 32768,
+ VAL_SMS_CC_WAITING_FOR_TL_ACK = 32769,
+ VAL_SMS_CC_OUT_OF_RESOURCES = 32770,
+ VAL_SMS_CC_ACCESS_TOO_LARGE = 32771,
+ VAL_SMS_CC_DRC_TOO_LARGE = 32772,
+ VAL_SMS_CC_NETWORK_NOT_READY = 32773,
+ VAL_SMS_CC_PHONE_NOT_READY = 32774,
+ VAL_SMS_CC_NOT_ALLOWED_IN_AMPS = 32775,
+ VAL_SMS_CC_NOT_SUPPORTED = 32776,
+ VAL_SMS_CC_INVALID_TRANSACTION = 32777,
+ VAL_SMS_CC_MESSAGE_NOT_SENT = 32778,
+ VAL_SMS_CC_MESSAGE_BEGIN_SENT = 32779,
+ VAL_SMS_MAX_CC
+} ValSmsCCT;
+
+/*! Macro for validating ValSmsCauseCodeT */
+#define IS_VALID_SMS_CAUSE_CODE(a) \
+ (((VAL_SMS_CC_ADDRESS_VACANT == (a)) || ((VAL_SMS_CC_ADDRESS_VACANT <(a)) && \
+ ((a) <= VAL_SMS_CC_OTHER_NETWORK_PROBLEM))) || \
+ ((VAL_SMS_CC_NO_PAGE_RESPONSE_S <= (a)) && \
+ ((a) <= VAL_SMS_CC_OTHER_TERMINAL_PROBLEM)) || \
+ ((VAL_SMS_CC_RADIO_INTERFACE_RESOURCE_SHORTAGE <= (a)) && \
+ ((a) <= VAL_SMS_CC_SMS_NOT_SUPPORTED)) || \
+ ((VAL_SMS_CC_MISSING_EXPECTED_PARAMETER <= (a)) && ((a) < VAL_SMS_MAX_CC)))
+
+
+/*! Send status */
+/*val sms event message type for ui*/
+typedef struct
+{
+ ValSmsRecIdT recid;
+} ValSmsIncomingMsgT;
+
+typedef struct
+{
+ kal_uint8 SeqNum; /* The PSW-MMI SeqNum id used in msg assembly */
+ ValSmsErrClassT ErrClass;
+ ValSmsCauseCodeT CauseCode;
+} ValSmsSendStatusMsgT;
+
+/* val message type for sms uint */
+typedef struct
+{
+ ValDeviceT device;
+ kal_bool MemStatusFull; /*KAL_TRUE for memory full, KAL_FALSE for memory enough */
+} ValSmsMemStatMsgT;
+
+typedef struct
+{
+ kal_bool SmsMemFull; /*KAL_TRUE for no memory, KAL_FALSE for memory enough */
+ ValDeviceT device;
+} ValSmsMemStatusMsgT;
+
+typedef struct
+{
+ ValDeviceT device;
+} ValSmsWriteErrMsgT;
+
+/*----------------------------------
+message storage type define
+------------------------------------*/
+
+typedef enum
+{
+ /*VAL SMS Msg type teleservice value in IS-637:*/
+
+ MSG_IS91_PAGE_MSG,
+ MSG_IS91_VOICE_MAIL, /* analog mode teleservice */
+ MSG_IS91_SHORT_MESSAG,
+ MSG_VOICE_MAIL_MWI,
+
+ MSG_TELE_SRV_IS91, /* IS91_TS_ID_IS91 = 4096, */
+ MSG_TELE_SRV_PAGE, /* VAL_SMS_TS_ID_PAGE = 4097, */
+ MSG_TELE_SRV_MESSAGE, /* VAL_SMS_TS_ID_MESSAGE = 4098, */
+ MSG_TELE_SRV_VMN, /* VAL_SMS_TS_ID_VOICE_MAIL = 4099, */
+ MSG_TELE_SRV_WAP, /* VAL_SMS_TS_ID_WAP, */
+ MSG_TELE_SRV_WEMT, /* VAL_SMS_TS_ID_WEMT, */
+ MSG_TELE_SRV_SCPT, /* VAL_SMS_TS_ID_SCPT, */
+ MSG_TELE_SRV_CATPT, /* VAL_SMS_TS_ID_CATPT */
+ MSG_BROAD_CAST_SRV, /* broadcast SMS service, not a teleservice, here for the purpose of management for all SMS service */
+#if defined(LGT_EXTENSIONS)
+ MSG_TELE_SRV_UNKNOWN, /* VAL_SMS_LGT_UNKNOWN */
+#endif
+ MSG_TELE_SRV_UNICOM,
+ MSG_AUTO_REG_SRV,
+ MSG_AUTO_DM_PUSH,
+ MSG_TELE_SRV_GPS,
+ MSG_TELE_SRV_DANDCN,
+ MAX_REG_MSG
+} ValSmsTeleSrvType;
+
+typedef struct
+{
+ kal_bool isUse;
+#ifdef SYS_OPTION_NO_UI
+ ValSmsTeleSrvIdT TeleSrvId;
+#else
+ kal_uint16 TeleSrvId;
+#endif
+ kal_uint8 RegIdCount;
+ kal_bool NeedSave;
+ kal_uint8 NeedSaveCount;
+} RegEvtInfoT;
+
+
+/*the memory status*/
+typedef struct
+{
+ kal_uint16 nFlashMaxSmsRec;
+ kal_uint16 nFlashFreeSmsRec;
+ kal_uint16 nUimMaxSmsRec;
+ kal_uint16 nUimFreeSmsRec;
+} ValSmsStorParamsT;
+
+
+typedef struct
+{
+ kal_int16 refNum;
+ kal_uint8 maxNum;
+ kal_uint8 seqNum;
+ kal_uint8 numSegments;
+ kal_uint16 recid;
+}ValEmsHeaderT;
+
+typedef enum
+{
+ Unused =0,
+ RxUnReadBox,
+ RxReadBox,
+ TxSentBox,
+ DraftBox,
+ RxUnRead,
+ DuplicateUnRead,
+ RxRead,
+ DuplicateRead,
+ TxSent,
+ TxNotSent,
+ SentDelivered,
+ SentIncompleteDelivery,
+ SentDeliveryFailed,
+ SentNoServicePending,
+ DraftRead,
+ DraftSent,
+ DraftNotSent,
+ NUM_ETS_SMS_BOX
+} ValSmsEtsMsgTypeT;
+
+
+typedef enum
+{
+ SMS_ETS_EVT_ADDED,
+ SMS_ETS_EVT_DELETED,
+ SMS_ETS_EVT_MODIFIED,
+ SMS_ETS_EVT_RECEIVED,
+ SMS_ETS_EVT_SENT
+} ValSmsEtsEventT;
+
+typedef enum
+{
+ /*=== General errors ===*/
+
+ UI_General_SUCCESS,
+ UI_General_Index_Out_Of_Range,
+ UI_General_Not_Implemented,
+ UI_General_Storage_Full,
+ UI_General_Empty_Index,
+
+ /*=== SMS errors ===*/
+
+ /*Network Problems*/
+ UI_SMS_ADDRESS_VACANT,
+ UI_SMS_ADDRESS_TRANSLATION,
+ UI_SMS_NETWORK_RESOURCE_SHORTAGE,
+ UI_SMS_NETWORK_FAILURE,
+ UI_SMS_INVALID_TELESERVICE_ID,
+ UI_SMS_OTHER_NETWORK_PROBLEM,
+ UI_SMS_OTHER_NETWORK_PROBLEM_MORE_FIRST,
+ UI_SMS_OTHER_NETWORK_PROBLEM_MORE_LAST,
+
+ /*General Problems*/
+ UI_SMS_NO_PAGE_RESPONSE,
+ UI_SMS_DESTINATION_BUSY,
+ UI_SMS_NO_ACKNOWLEDGEMENT,
+ UI_SMS_DESTINATION_RESOURCE_SHORTAGE,
+ UI_SMS_DELIVERY_POSTPONED,
+ UI_SMS_DESTINATION_OUT_OF_SERVICE,
+ UI_SMS_DESTINATION_NO_LONGER_AT_THIS_ADDRESS,
+ UI_SMS_OTHER_TERMINAL_PROBLEM,
+ UI_SMS_OTHER_TERMINAL_PROBLEM_MORE_FIRST,
+ UI_SMS_OTHER_TERMINAL_PROBLEM_MORE_LAST,
+ UI_SMS_DELIVER_POSTPONED_MORE_FIRST,
+ UI_SMS_DELIVER_POSTPONED_MORE_LAST,
+ UI_SMS_RADIO_INTERFACE_RESOURCE_SHORTAGE,
+ UI_SMS_RADIO_INTERFACE_INCOMPATIBILITY,
+ UI_SMS_OTHER_RADIO_INTERFACE_PROBLEM,
+ UI_SMS_OTHER_RADIO_INTERFACE_PROBLEM_MORE_FIRST,
+ UI_SMS_OTHER_RADIO_INTERFACE_PROBLEM_MORE_LAST,
+ UI_SMS_ENCODING_PROBLEM,
+ UI_SMS_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED,
+ UI_SMS_RESERVED,
+ UI_SMS_MISSING_EXPECTED_PARAMETER,
+ UI_SMS_MISSING_MANDATORY_PARAMETER,
+ UI_SMS_UNRECOGNIZED_PARAMATER_VALUE,
+ UI_SMS_UNEXPECTED_PARAMATER_VALUE,
+ UI_SMS_OTHER_GENERAL_PROBLEMS,
+ UI_SMS_OTHER_GENERAL_PROBLEMS_MORE_FIRST,
+ UI_SMS_OTHER_GENERAL_PROBLEMS_MORE_LAST,
+
+ /*SERVICE NOT AVAILABLE*/
+ UI_SMS_ORIGINATION_DENIED,
+
+ /*INVALID DESTINATION*/
+ UI_SMS_TERMINATION_DENIED,
+
+ /*SERVICE NOT SUPPORTED*/
+ UI_SMS_NOT_SUPPORTED,
+
+ /*MESSAGE TOO LONG FOR NETWORK*/
+ UI_SMS_USER_DATA_SIZE_ERROR,
+
+ /*Other Messages*/
+ UI_SMS_WAITING_FOR_TL_ACK,
+ UI_SMS_OUT_OF_RESOURCES,
+ UI_SMS_ACCESS_TOO_LARGE,
+ UI_SMS_DRC_TOO_LARGE,
+ UI_SMS_NETWORK_NOT_READY,
+ UI_SMS_PHONE_NOT_READY,
+ UI_SMS_NOT_ALLOWED_IN_AMPS,
+ UI_SMS_INVALID_TRANSACTION,
+ UI_SMS_MESSAGE_NOT_SENT,
+ UI_SMS_MESSAGE_BEGIN_SENT,
+ UI_SMS_MAX_NUMBER_OF_DESTINATIONS_IS_10,
+ UI_SMS_MESSAGE_DELIVERY_FAILED
+} ValSmsEtsStatT;
+
+/* VAL_SMS_GET_COUNT_MSG */
+typedef struct
+{
+ kal_uint8 Storage;
+} ValSmsEtsGetCountMsgT;
+
+typedef struct
+{
+ kal_uint32 MsgCount[NUM_ETS_SMS_BOX];
+} ValSmsEtsGetCountRspMsgT;
+
+/* VAL_SMS_GET_FIRST_MSG */
+typedef struct
+{
+ kal_uint8 Type;
+ kal_uint8 Storage;
+} ValSmsEtsGetFirstMsgT;
+
+typedef struct
+{
+ kal_uint8 Status;
+ kal_uint8 Type;
+ kal_uint8 Storage;
+ kal_uint16 Index;
+ kal_uint8 EmsFlag;
+ kal_uint8 EmsSegment;
+ kal_uint8 EmsLast;
+ kal_uint8 PhbType;
+ kal_uint8 PhbByteCount;
+ kal_uint8 Pb_Pdu_data[1];
+} ValSmsEtsGetMsgRspMsgT;
+
+/* VAL_SMS_GET_NEXT_MSG */
+
+/* VAL_SMS_WRITE_MSG */
+typedef struct
+{
+ kal_uint8 Type;
+ kal_uint8 Storage;
+ kal_uint16 Index; /* for EMS only? */
+ kal_uint8 EmsFlag;
+ kal_uint8 EmsSegment;
+ kal_uint8 EmsLast;
+ kal_uint8 pdu_len;
+ kal_uint8 Pdu[VAL_SMS_MAX_SMS_PDU_LEN];
+} ValSmsEtsWriteMsgT;
+
+typedef struct
+{
+ kal_uint8 Status;
+ kal_uint8 Storage;
+ kal_uint16 Index;
+ kal_uint8 EmsSegment;
+ kal_uint16 RefNum;
+} ValSmsEtsWriteRspMsgT;
+
+/* VAL_SMS_DEL_ALL_MSG */
+typedef struct
+{
+ kal_uint8 Type;
+ kal_uint8 Storage;
+} ValSmsEtsDelAllMsgT;
+
+typedef struct
+{
+ kal_uint8 Status;
+ kal_uint8 Type;
+ kal_uint8 Storage;
+} ValSmsEtsDelAllRspMsgT;
+
+/* VAL_SMS_DEL_MSG */
+typedef struct
+{
+ kal_uint16 Index;
+ kal_uint8 Storage;
+} ValSmsEtsDelMsgT;
+
+typedef struct
+{
+ kal_uint8 Status;
+ kal_uint16 Index;
+ kal_uint8 Storage;
+} ValSmsEtsDelRspMsgT;
+
+/* VAL_SMS_SEND_MSG */
+typedef struct
+{
+ kal_uint8 Storage;
+ kal_uint16 Index; /* for EMS only? */
+ kal_uint8 EmsFlag;
+ kal_uint8 EmsSegment;
+ kal_uint8 EmsLast;
+ kal_uint8 Save;
+ kal_uint8 Confirmation;
+ kal_uint8 pdu_len;
+ kal_uint8 Pdu[VAL_SMS_MAX_SMS_PDU_LEN];
+} ValSmsEtsSendMsgT;
+
+typedef struct
+{
+ kal_uint8 Status;
+ kal_uint8 Storage;
+ kal_uint16 Index;
+ kal_uint8 EmsSegment;
+ kal_uint16 RefNum;
+ kal_uint8 ErrorClass;
+} ValSmsEtsSendRspMsgT;
+
+/* VAL_SMS_SEND_INDEX_MSG */
+typedef struct
+{
+ kal_uint8 Storage;
+ kal_uint16 Index;
+ kal_uint8 Save;
+ kal_uint8 Confirmation;
+} ValSmsEtsSendIndexMsgT;
+
+typedef struct
+{
+ kal_uint8 Status;
+ kal_uint8 Storage;
+ kal_uint16 Index;
+} ValSmsEtsSendIndexRspMsgT;
+
+/* VAL_SMS_SET_STATUS_MSG */
+typedef struct
+{
+ kal_uint8 Storage;
+ kal_uint16 Index;
+ kal_bool Read;
+} ValSmsEtsSetStatusMsgT;
+
+typedef struct
+{
+ kal_uint8 Status;
+ kal_uint8 Storage;
+ kal_uint16 Index;
+} ValSmsEtsSetStatusRspMsgT;
+
+/* VAL_SMS_SPY_MSG */
+typedef struct
+{
+ kal_uint8 Event;
+ kal_uint8 Storage;
+ kal_uint16 Index;
+} ValSmsEtsSpyMsgT;
+
+#ifdef MTK_CBP_ENCRYPT_VOICE
+typedef struct
+{
+ kal_uint8 len;
+ kal_uint8 CallNum[NUMBER_MAX_LEN];
+} ValSmsMocKeyReqMsgT;
+typedef struct
+{
+ kal_uint8 OpType;
+ kal_uint8 Result;
+} ValSmsRemoteCtrlInsRspMsgT;
+
+typedef ValSmsRemoteCtrlInsRspMsgT ValEncrySmsRemoteCtrlInsRspMsgT;
+
+typedef struct
+{
+ kal_uint8 len;
+ kal_uint8 CallNum[NUMBER_MAX_LEN];
+} ValMtEncryptNotificationIndMsgT;
+
+typedef struct
+{
+ kal_uint8 keyReqtype;/*1 MO,0 MT*/
+ kal_uint8 mode; /*0: MANUAL,1: auto*/
+ kal_uint8 calledNum[NUMBER_MAX_LEN];/*number ,max =11*/
+ kal_uint8 calledBytes;
+} ValSmsEncryKeyReqMsgT;
+
+typedef struct
+{
+ kal_uint8 mode;/*1 MO,0 MT*/
+} ValSmsModuleClearContextMsgT;
+
+#endif
+
+
+typedef struct {
+ kal_uint8 sms_format; /* reply sequence used in bearer reply opt */
+ kal_uint8 sms_status;
+ kal_uint16 msg_id;
+ kal_uint8 seq_id; /* SMS sequence Number */
+ kal_bool is_used;
+ kal_uint8 pduLen;
+ kal_uint8 *pduPt;
+} ValSmsTransAseT;
+
+typedef struct {
+ kal_uint16 msg_id;
+ kal_uint16 seq_id;
+ kal_bool is_used;
+} ValSmsIdPairT;
+#if (defined MTK_DEV_CCCI_FS) || (defined MTK_PLT_ON_PC_UT)
+void valsmsDbmResponse(ilm_struct* current_ilm);
+#endif
+
+typedef PACKED_PREFIX struct {
+
+ kal_uint8 send_over_ims_cs;
+ kal_uint16 length;
+ kal_uint8 pdu[VAL_SMS_MAX_SMS_PDU_LEN];
+ kal_bool is_no_error; //KAL_TRUE: no error, KAL_FALSE: has error
+} PACKED_POSTFIX ValC2kSmsRspT;
+
+typedef PACKED_PREFIX struct {
+ kal_uint16 length;
+ kal_uint8 pdu[VAL_SMS_MAX_SMS_PDU_LEN];
+} PACKED_POSTFIX SdmValC2kSmsSendReqT ;
+
+/* MSG_ID_IMCSMS_VAL_C2K_SMS_SEND_REQ */
+typedef PACKED_PREFIX struct {
+ kal_uint16 length;
+ kal_uint8 data[VAL_SMS_MAX_SMS_PDU_LEN];
+} PACKED_POSTFIX ImcValC2kSmsSendReqT;
+
+typedef struct {
+ kal_uint16 length;
+ kal_uint8 pdu[MAX_C2K_SMS_PDU_LEN];
+ c2k_sms_rat_enum send_over_ims_cs;
+} SdmCvalC2kSmsSendReqT;
+
+typedef struct{
+ kal_uint16 length;
+ kal_uint8 data[MAX_C2K_SMS_PDU_LEN];
+} ImcsmsCvalC2kSmsSendReqT;
+
+typedef struct{
+ kal_uint16 length;
+ kal_uint8 data[MAX_C2K_SMS_PDU_LEN];
+} ImcsmsCvalC2kSmsRecvReqT;
+
+typedef struct
+{
+ kal_uint16 msg_id;
+ kal_uint16 pdulen;
+ kal_uint8 pdumsg[VAL_SMS_MAX_SMS_PDU_LEN];
+} ValSmsSdmSendReqPendingInfoT;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint8 src_id; /* Required for L4C*/
+ l4_addr_bcd_struct tel_number; /* The telephone number to be approved*/
+ kal_uint8 is_retrieve; /* Whether retrieving the hit entry of the given number is required*/
+ l4c_phb_approval_type_enum approval_type; /* l4c_phb_approval_type_enum */
+} l4cphb_approve_req_struct;
+
+typedef struct {
+ kal_uint8 src_id; /* The `src_id' of the corresponding reqest is forwarded back in this field.*/
+ phb_errno_enum result; /* phb_errno_enum; Operation result*/
+ kal_uint16 cause;
+ phb_type_enum type; /* phb_type_enum; Type of phone number entries*/
+ kal_uint8 esc;
+} l4cphbapprovecnftT;
+
+typedef struct {
+ c2k_sms_rat_enum send_over_ims_cs;
+ kal_uint16 length;
+ kal_uint8 pdu[MAX_C2K_SMS_PDU_LEN];
+ kal_bool is_no_error; //KAL_TRUE: no error, KAL_FALSE: has error
+} SdmCvalC2kSmsRspT;
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValSmsGetStorParams
+
+ DESCRIPTION:
+
+ To get current storage memory statue parameters.
+
+ PARAMETERS:
+
+ pSmsStorParams: the buffer where to write the ValSmsStorParamsT info back
+
+ RETURNED VALUES:
+ success is true.failed is false
+
+*****************************************************************************/
+kal_bool ValSmsGetStorParams( ValSmsStorParamsT* pSmsStorParams );
+
+/*! Macro for valid sms service option */
+#define IS_VALID_SMS_SO(a) (((a) == 0) || ((a) == VAL_SERVICE_OPTION_6) || ((a) == VAL_SERVICE_OPTION_14))
+
+void ValSmsInitUimSms( void );
+void ValSmsInit( void );
+kal_bool ValSmsProcessMsg( kal_uint32 MsgId, void *MsgBufP, kal_uint32 MsgLen );
+void ValSmsSendCbsCfgToPsw(ValSmsCbsInfoT* CbsInfo);
+
+RegIdT ValSmsRegister( ValSmsEventFunc CallBack );
+//don't modify following Function, brew has referred to it
+ValSmsResultT ValSmsUnregister( RegIdT RegId );
+ValSmsResultT ValSmsStartRegSrv( RegIdT RegId, ValSmsTeleSrvIdT TeleSrvId);
+ValSmsResultT ValSmsStopRegSrv( RegIdT RegId, ValSmsTeleSrvIdT TeleId );
+
+//don't modify following Function, brew has referred to it
+kal_bool ValSmsGetSmsStatus( void );
+void ValSmsSetSmsStatus(kal_bool Flg);
+
+void ValSmsSetSendOnTraffic( kal_bool sendOnTraffic );
+ValSmsResultT ValSmsSetPrefSvcOpt( ValServiceOptionT SmsSo );
+ValSmsResultT ValSmsSetBroadcastParams( kal_uint32 SvcMask, kal_uint32 LangMask, kal_uint8 Priority );
+ValSmsResultT ValSmsUpdateTxtMessage(ValSmsTxtRecordT *pSmsTxtMsg,kal_uint16 recId);
+ValSmsResultT ValSmsUpdatePduMessage(ValSmsPduRecordT *pSmsRecord,kal_uint16 recId);
+ValSmsResultT ValSmsReadTxtMessage(ValSmsTxtRecordT *pSmsMessage,kal_uint16 recId);
+ValSmsResultT ValSmsReadPduMessage(ValSmsPduRecordT *pSmsRecord,kal_uint16 recId);
+
+#ifdef SYS_OPTION_NO_UI
+ValSmsResultT ValSmsSendPduMessage( RegIdT RegId, ValSmsRecIdT* recidP, kal_uint8* MsgBufP, kal_uint8 nbytes, kal_uint16* MsgId, kal_bool ToBeSave );
+ValSmsResultT ValSmsSendTxtMessage( RegIdT RegId, ValSmsRecIdT* recid, ValSmsTxtRecordT* SmsTxtMsgP, kal_uint16* MsgId, kal_bool ToBeSave);
+#else
+ValSmsResultT ValSmsSendPduMessage(RegIdT RegId, kal_uint8 *MsgBufP, kal_uint8 MsgLength);
+ValSmsResultT ValSmsSendTxtMessage(RegIdT RegId, ValSmsTxtRecordT *TxtRecord);
+#endif
+kal_bool ValSmsProcessMsg( kal_uint32 MsgId, void* MsgBuf, kal_uint32 MsgLen );
+void ValSmsSendAck(ValSmsResultT Result, kal_uint32 SeqNumber);
+
+ValSmsTeleSrvIdT ValSmsGetTeleSrvFromPdu(kal_uint8 *DataP, kal_uint8 Length);
+
+kal_bool CheckSmsPdu(kal_uint8 *ValSmsPduP, kal_uint8 Length);
+ValDeviceT ValSmsGetStorage( void );
+void ValSmsSetMultiSMSMode(kal_bool IsMultiSMS);
+
+int ValSmsSendMessage( ValSmsTxtRecordT *MessageP );
+
+
+
+#ifdef MTK_DEV_C2K_IRAT
+void valProcSdmC2kSmsSendReqMsg(kal_uint16 length,kal_uint8* pdu);
+void valProcSdmC2kSmsOverImsSendReqMsg(kal_uint16 length,kal_uint8 *pdu);
+void valProcImcsmsC2kSmsSendReqMsg(kal_uint16 length,kal_uint8 *pdu);
+void valProcSdmC2kSmsSendIndMsg(kal_uint8 format,kal_uint16 length,kal_uint8* pdu);
+void valProcSdmC2kSmsSendRspMsg(kal_uint8 send_over_ims_cs,kal_uint16 length,kal_uint8 *pdu);
+void valProcSdmC2kSmsRspMsg(SdmCvalC2kSmsRspT* pValSmsRsp);
+void valProcUiccPPdownLoadRspMsg(kal_uint8 *pdu,kal_uint8 length,kal_uint8 seq_id);
+void valPreProcPPdownloadMsg(kal_uint8 *pdu,kal_uint8 length,kal_uint8 seq_id);
+void valProcUtkSmsMsg(kal_uint8 *pdu,kal_uint8 length);
+void valProcImcsmsC2kSmsRecvReqMsg(kal_uint16 length,kal_uint8 *data);
+void SendSmsAckForIms(kal_uint8 *ackPdu, kal_uint8 pduLen);
+
+#endif
+
+void CNMASendSMSMsg(kal_uint8 length, kal_uint8 *pduBuf,kal_uint16 seqNum);
+kal_bool ValSmsIsAddrE911(kal_uint8 *data, kal_uint16 length);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+#endif /* VALSMSAPI_H */
+
+
+
diff --git a/mcu/interface/protocol/l4_c2k/valsmscust.h b/mcu/interface/protocol/l4_c2k/valsmscust.h
new file mode 100644
index 0000000..401c65a
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valsmscust.h
@@ -0,0 +1,145 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2003-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+/**************************************************************************************************
+* %version: 3 % %instance: HZPT_2 % %date_created: Mon Apr 9 17:19:02 2007 % %created_by: rli % %derived_by: rli %
+**************************************************************************************************/
+
+#ifndef VAL_SMS_CUST_H
+#define VAL_SMS_CUST_H
+/******************************************************************************
+*
+* FILE NAME : valsmscust.h
+*
+*
+* DESCRIPTION :
+* user dependence variable define.
+*
+* HISTORY :
+*
+*
+*
+******************************************************************************/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+//don't modify following macro, brew has referred to it
+////////////////////////////////////////////////////////
+/* max record count for sms in flash db file */
+#define VAL_SMS_MAX_FLASH_REC_CNT 500
+/* sms flash record size */
+#define VAL_SMS_FLASH_REC_SIZE sizeof(ValSmsRecordT)
+
+#define VAL_SMS_MAX_FLASH_BC_REC_CNT 0
+
+#define VAL_SMS_MAX_UIM_REC_CNT 255
+#define VAL_SMS_MAX_UIM_REC_SIZE sizeof(ValSmsRecordT)
+
+#define VAL_SMS_MAX_RAM_REC_CNT 10 //!< max ram record count
+
+/* for sms flash db file,include one voice mail */
+#define VAL_SMS_MAX_FLASH_FILE_REC_CNT VAL_SMS_MAX_FLASH_REC_CNT + 1
+
+#define VAL_SMS_MAX_REC_CNT (VAL_SMS_MAX_UIM_REC_CNT + VAL_SMS_MAX_FLASH_REC_CNT)
+
+/* extra recor for all record in flash( sms + one voic mail ) */
+#define VAL_SMS_EXTRA_REC_CNT VAL_SMS_MAX_FLASH_REC_CNT
+
+/*the voice mail position in flash db file ,the last one*/
+#define VAL_SMS_VMN_ADDRESS VAL_SMS_MAX_FLASH_REC_CNT
+
+#define VAL_SMS_MAX_ADDRESS_LEN 32
+#define VAL_SMS_MAX_SUBADDR_LEN 30
+#define VAL_SMS_MAX_USER_DATA_LEN 255 /* changed from 200 to 255 in attempt to fix Bug 1007 (F.Hou) */
+#define VAL_SMS_CALLBACK_NUMBER_MAX_DIGITS 30
+#define VAL_SMS_MAX_CATEGORIES 10
+#define VAL_SMS_MAX_CHAR_IN_CATEGORY 20
+#define VAL_SMS_TL_MAX_MSG_LENGTH 255 /* teleservice layer pdu max len */
+#define VAL_SMS_MAX_NUM_DATA_MSGS 2
+/////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
+
+/*****************************************************************************
+* $Log: valsmscust.h $
+* Revision 1.1 2007/10/29 11:53:09 binye
+* Initial revision
+* Revision 1.1 2007/10/12 14:05:33 yjin
+* Initial revision
+* Revision 1.1 2006/12/25 11:10:18 yjin
+* Initial revision
+* Revision 1.1 2006/12/04 20:30:56 xuhua
+* Initial revision
+* Revision 1.1 2006/11/29 18:49:00 rli
+* Initial revision
+*****************************************************************************/
+/**Log information: D:\projects\vtui2_5x\gzhu_view\HZREF\cp\inc\valsmscust.h@@\main\vtui2_5x\2 2008-05-14 09:04:36 GMT gzhu
+** HREF#178**/
+/**Log information: \main\vtui2_5x\3 2008-06-03 06:27:28 GMT pchen
+** HREF#32**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory\1 2008-08-12 06:39:08 GMT pchen
+** HREF#1445**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory\2 2008-10-23 05:56:26 GMT pchen
+** HREF#1445**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory\3 2009-03-04 11:41:13 GMT pchen
+** HREF#1445**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory\4 2009-03-06 08:03:56 GMT pchen
+** HREF#1445**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory_1\1 2009-03-19 08:08:06 GMT yfan
+** HREF#1580**/
+/**Log information: \main\helios_dev\touchflow\1 2009-06-05 05:57:31 GMT yfan
+** HREF#1580**/
+/**Log information: \main\CBP7FeaturePhone\CBP7FeaturePhone_nicholaszhao_href17384\1 2011-07-04 08:32:13 GMT nicholaszhao
+** HREF#17384**/
+/**Log information: \main\CBP7FeaturePhone\3 2011-07-12 09:41:56 GMT marszhang
+** HREF#17384**/
+/**Log information: \main\2 2012-04-09 02:56:12 GMT pchen
+** HREF# change sms record to 500**/
+
diff --git a/mcu/interface/protocol/l4_c2k/valsmsdefine.h b/mcu/interface/protocol/l4_c2k/valsmsdefine.h
new file mode 100644
index 0000000..d49ed93
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valsmsdefine.h
@@ -0,0 +1,720 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2006-2012 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+
+/*===========================================================================
+
+ V A L S M S DEFINE H E A D E R F I L E
+
+ This file contains the definitions for the SMS
+ module of the VIA Abstraction Layer.
+
+===========================================================================*/
+#ifndef VALSMSDEFINE_H
+#define VALSMSDEFINE_H
+
+#include "valapi.h"
+#include "valsmscust.h"
+
+//don't modify following macro, brew has referred to it
+/* field mask definitions */
+#define SERVICE_CAT_PRESENT 0x00000001
+#define ADDRESS_PRESENT 0x00000002
+#define SMS_SUBADDRESS_PRESENT 0x00000004
+#define USER_DATA_PRESENT 0x00000008
+#define USER_RESP_CODE_PRESENT 0x00000010
+#define MC_TIME_STAMP_PRESENT 0x00000020
+#define ABS_VAL_PERIOD_PRESENT 0x00000040
+#define REL_VAL_PERIOD_PRESENT 0x00000080
+#define ABS_DEF_DEL_TIME_PRESENT 0x00000100
+#define REL_DEF_DEL_TIME_PRESENT 0X00000200
+#define PRIORITY_IND_PRESENT 0x00000400
+#define PRIVACY_IND_PRESENT 0x00000800
+#define REPLY_OPTION_PRESENT 0x00001000
+#define NUM_MESSAGES_PRESENT 0x00002000
+#define ALERT_MSG_DEL_PRESENT 0x00004000
+#define LANGUAGE_IND_PRESENT 0x00008000
+#define CALLBACK_NUM_PRESENT 0x00010000
+#define MSG_DISP_MODE_PRESENT 0x00020000
+#define MULT_ENCODE_USER_DATA_PRESENT 0x00040000
+#define MESSAGE_DEPOSIT_INDEX_PRESENT 0x00080000
+#define MESSAGE_STATUS_PRESENT 0x00400000
+#define SER_CAT_PROGRAM_RESULT_PRESENT 0x00800000
+#define SER_CAT_PROGRAM_DATA_PRESENT 0x01000000
+#define BEARER_REPLY_OPTION_PRESENT 0x02000000
+#ifdef KDDI_EXTENSIONS
+#define IP_ADDRESS_PRESENT 0x04000000
+#define NOTIFY_FLAG_PRESENT 0x08000000
+#define UIM_ID_PRESENT 0x10000000
+#endif
+
+typedef kal_uint16 ValSmsRecIdT;
+
+//don't modify following Enum, brew has referred to it
+/*! txt message type define
+*/
+typedef enum
+{
+ EMPTY = 0, /* the block has not occupied by a sms message */
+ READ = 0x01,
+ TO_BE_READ = 0x03,
+ SENT = 0x05,
+ TO_BE_SENT = 0x07,
+ DUPLICATE_READ=0x0F,
+ DUPLICATE_TO_BE_READ=0x11,
+ DRAFT = 0x15,
+
+ ARCHIVE_READ = 0x21,
+ ARCHIVE_TO_BE_READ = 0x23,
+ ARCHIVE_SENT = 0x25,
+ ARCHIVE_TO_BE_SENT = 0x27,
+
+ NOT_COMPLETE = 0x33,
+
+ TO_BE_DELETED = 0x40,
+
+ VAL_SMS_MAX_STATE
+} ValSmsStatT;
+
+//don't modify following Enum, brew has referred to it
+/*sms message type*/
+typedef enum
+{
+ VAL_SMS_SMS_MSG_TYPE_POINT_TO_POINT = 0,
+ VAL_SMS_SMS_MSG_TYPE_BROADCAST,
+#if defined(LGT_EXTENSIONS)
+ VAL_SMS_SMS_MSG_TYPE_UNKNOWN,
+#endif
+ VAL_SMS_SMS_MSG_TYPE_ACKNOWLEDGE,
+ VAL_SMS_MAX_SMS_MSG_TYPE
+} ValSmsTransMsgTypeT;
+
+/* Macro to validate ValSmsMsgTypeT */
+#define IS_VALID_VSMS_MSG_TYPE(a) ((VAL_SMS_SMS_MSG_TYPE_POINT_TO_POINT == (a)) || \
+ ((VAL_SMS_SMS_MSG_TYPE_POINT_TO_POINT < (a)) && \
+ ((a) < VAL_SMS_MAX_SMS_MSG_TYPE)))
+
+//don't modify following Enum, brew has referred to it
+typedef enum
+{
+ VAL_SMS_MSG_TYPE_RESERVED = 0,
+ VAL_SMS_MSG_TYPE_TERMINATION_DELIVER,
+ VAL_SMS_MSG_TYPE_ORIGINATION_SUBMIT,
+ VAL_SMS_MSG_TYPE_ORIGINATION_CANCELLATION,
+ VAL_SMS_MSG_TYPE_TERMINATION_DELIVERY_ACK,
+ VAL_SMS_MSG_TYPE_USER_ACK,
+ VAL_SMS_MSG_TYPE_READ_ACK,
+ VAL_SMS_MAX_MSG_TYPE
+} ValSmsTeleMsgT;
+
+/* Macro for validating vsms msg type */
+#define IS_VALID_SMS_MSG(a) \
+ ((VAL_SMS_MSG_TYPE_RESERVED == (a)) || ((VAL_SMS_MSG_TYPE_RESERVED < (a)) && ((a) < VAL_SMS_MAX_MSG_TYPE)))
+
+//don't modify following Enum, brew has referred to it
+/*! Val sms teleservice id define */
+typedef enum
+{
+ /*----------------------------------------------------------------
+ The following are not defined as a teleservice in IS-637,
+ but they are used to indicate the teleservice type in Analog mode.
+ -----------------------------------------------------------------*/
+ VAL_SMS_TS_ID_IS91_PAGE = 0,
+ VAL_SMS_TS_ID_IS91_VOICE_MAIL = 1,
+ VAL_SMS_TS_ID_IS91_SHORT_MESSAGE = 2,
+
+ /*----------------------------------------------------------------
+ Voice mail notification through Message Waiting Indication in
+ CDMA mode or Analog mode
+ -----------------------------------------------------------------*/
+ VAL_SMS_TS_ID_VOICE_MAIL_MWI = 3,
+
+ /*----------------------------------------------------------------
+ IS-637 Teleservices
+ -----------------------------------------------------------------*/
+ VAL_SMS_TS_ID_IS91 = 4096,
+ VAL_SMS_TS_ID_PAGE = 4097,
+ VAL_SMS_TS_ID_MESSAGE = 4098,
+ VAL_SMS_TS_ID_VOICE_MAIL = 4099,
+ VAL_SMS_TS_ID_WAP,
+ VAL_SMS_TS_ID_WEMT , /*add for EMS*/
+ VAL_SMS_TS_ID_SCPT, /*add for SCPT*/
+ VAL_SMS_TS_ID_CATPT, /*add for UIM card application*/
+ VAL_SMS_BROAD_CAST_SRV, /*add for the broadcast service*/
+ VAL_SMS_TS_ID_IMSSRV = 4242,
+#if defined(LGT_EXTENSIONS)
+ VAL_SMS_LGT_UNKNOWN = 32521, /* FEATURE_UNKNOWN_TID_SUPPORT */
+#endif
+ VAL_SMS_MPC_ID = 65001,
+ VAL_SMS_TS_ID_PUSH= 65002, /*sms push for China Telecom*/
+ VAL_SMS_REGISTER_SRV =65005, /*add for register message service*/
+ VAL_SMS_TS_ID_DM_PUSH = 65009,
+
+ VAL_SMS_MAX_TS_ID
+} ValSmsTeleSrvIdT;
+
+/*! Macro for validating vsms teleservice id type */
+#define IS_VALID_SMS_TELESERVICE_ID(a) \
+ ((VAL_SMS_TS_ID_IS91_PAGE == (a)) || ((VAL_SMS_TS_ID_IS91_PAGE < (a)) && ((a) < VAL_SMS_MAX_TS_ID)))
+
+
+typedef enum
+{
+ VAL_SMS_SVR_CAT_UNKNOWN = 0,
+ VAL_SMS_SVR_CAT_EMERGENCIES,
+ VAL_SMS_SVR_CAT_ADMINISTRATIVE,
+ VAL_SMS_SVR_CAT_MAINTENANCE,
+ VAL_SMS_SVR_CAT_GEN_NEWS_LOCAL,
+ VAL_SMS_SVR_CAT_GEN_NEWS_REGIONAL,
+ VAL_SMS_SVR_CAT_GEN_NEWS_NATIONAL,
+ VAL_SMS_SVR_CAT_GEN_NEWS_INTERNATIONAL,
+ VAL_SMS_SVR_CAT_FINANCE_NEWS_LOCAL,
+ VAL_SMS_SVR_CAT_FINANCE_NEWS_REGIONAL,
+ VAL_SMS_SVR_CAT_FINANCE_NEWS_NATIONAL,
+ VAL_SMS_SVR_CAT_FINANCE_NEWS_INTERNATIONAL,
+ VAL_SMS_SVR_CAT_SPORTS_NEWS_LOCAL,
+ VAL_SMS_SVR_CAT_SPORTS_NEWS_REGIONAL,
+ VAL_SMS_SVR_CAT_SPORTS_NEWS_NATIONAL,
+ VAL_SMS_SVR_CAT_SPORTS_NEWS_INTERNATIONAL,
+ VAL_SMS_SVR_CAT_ENTERTAINMENT_NEWS_LOCAL,
+ VAL_SMS_SVR_CAT_ENTERTAINMENT_NEWS_REGIONAL,
+ VAL_SMS_SVR_CAT_ENTERTAINMENT_NEWS_NATIONAL,
+ VAL_SMS_SVR_CAT_ENTERTAINMENT_NEWS_INTERNATIONAL,
+ VAL_SMS_SVR_CAT_LOCAL_WEATHER,
+ VAL_SMS_SVR_CAT_TRAFFIC,
+ VAL_SMS_SVR_CAT_FLIGHT_SCHEDULE,
+ VAL_SMS_SVR_CAT_RESTAURANTS,
+ VAL_SMS_SVR_CAT_LODGINGS,
+ VAL_SMS_SVR_CAT_RETAIL_DIRECTORY,
+ VAL_SMS_SVR_CAT_ADVERTISEMENT,
+ VAL_SMS_SVR_CAT_STOCK_QUOTES,
+ VAL_SMS_SVR_CAT_EMPLOYMENT_OPPORTUNITIES,
+ VAL_SMS_SVR_CAT_MEDICAL_HEALTH,
+ VAL_SMS_SVR_CAT_TECH_NEWS,
+ VAL_SMS_SVR_CAT_MULTI_CATEGORY,
+ VAL_SMS_SVR_CAT_CMAS_PRESIDENT_ALERT = 0X1000, /* 3GPP2 C.R1001-G SPEC */
+ VAL_SMS_SVR_CAT_CMAS_EXTREME_THREAT_TO_LIFE,
+ VAL_SMS_SVR_CAT_CMAS_SEVERE_THREAT_TO_LIFE,
+ VAL_SMS_SVR_CAT_CMAS_CHILD_ABDUCTION_EMERGNY,
+ VAL_SMS_SVR_CAT_CMAS_TEST_MESSAGE,
+ VAL_SMS_SVR_CAT_CMAS_RESERVED_MAX =0X10FF,
+ VAL_SMS_MAX_SVR_CAT
+} ValSmsSrvCatT;
+
+/* Macro for validating ValSmsSrvCatT */
+#define IS_VALID_SMS_SERVICE_CAT(a) \
+ ((VAL_SMS_SVR_CAT_UNKNOWN == (a)) || ((VAL_SMS_SVR_CAT_UNKNOWN <(a)) && ((a) < VAL_SMS_MAX_SVR_CAT)))
+//don't modify following Enum, brew has referred to it
+typedef enum
+{
+ VAL_SMS_NUMBER_PLAN_UNKNOWN = 0,
+ VAL_SMS_NUMBER_PLAN_TELEPHONY,
+ VAL_SMS_NUMBER_PLAN_DATA = 3,
+ VAL_SMS_NUMBER_PLAN_TELEX,
+ VAL_SMS_NUMBER_PLAN_PRIVATE = 9,
+ VAL_SMS_MAX_NUMBER_PLAN
+} ValSmsNumPlanT;
+
+/* Macro for validating ValSmsNumPlanT */
+#define IS_VALID_SMS_NUMBER_PLAN(a) \
+ ((VAL_SMS_NUMBER_PLAN_UNKNOWN == (a)) || ((VAL_SMS_NUMBER_PLAN_UNKNOWN <(a)) && ((a) < VAL_SMS_MAX_NUMBER_PLAN)))
+
+//don't modify following Enum, brew has referred to it
+typedef enum
+{
+ VAL_SMS_DIGIT_MODE_4_BIT = 0,
+ VAL_SMS_DIGIT_MODE_8_BIT,
+ VAL_SMS_MAX_DIGIT_MODE
+} ValSmsDigitModeT;
+
+/* Macro for validating VAL_SMS digit mode type */
+#define IS_VALID_SMS_DIGIT_MODE(a) \
+ ((VAL_SMS_DIGIT_MODE_4_BIT ==(a))|| ((VAL_SMS_DIGIT_MODE_4_BIT <(a)) && ((a) < VAL_SMS_MAX_DIGIT_MODE)))
+
+typedef enum
+{
+ VAL_SMS_NUMBER_MODE_ANSI_T1_607 = 0,
+ VAL_SMS_NUMBER_MODE_DATA_NETWORK,
+ VAL_SMS_MAX_NUMBER_MODE
+} ValSmsNumModeT;
+
+/* Macro for validating vsms number mode type */
+#define IS_VALID_SMS_NUMBER_MODE(a) \
+ ( (VAL_SMS_NUMBER_MODE_ANSI_T1_607 == (a)) || ((VAL_SMS_NUMBER_MODE_ANSI_T1_607 <(a)) && ((a) < VAL_SMS_MAX_NUMBER_MODE)))
+
+//don't modify following Enum, brew has referred to it
+typedef enum
+{
+ VAL_SMS_NUMBER_TYPE_UNKNOWN = 0,
+ VAL_SMS_NUMBER_TYPE_INTERNATIONAL,
+ VAL_SMS_NUMBER_TYPE_NATIONAL,
+ VAL_SMS_NUMBER_TYPE_NETWORK_SPECIFIC,
+ VAL_SMS_NUMBER_TYPE_SUBSCRIBER,
+ VAL_SMS_NUMBER_TYPE_RESERVED,
+ VAL_SMS_NUMBER_TYPE_ABBREVIATED,
+ VAL_SMS_MAX_NUMBER_TYPE
+} ValSmsNumberT;
+
+/* Macro for validating ValSmsNumberT */
+#define IS_VALID_SMS_NUMBER_TYPE(a) \
+ ((VAL_SMS_NUMBER_TYPE_UNKNOWN == (a)) || ((VAL_SMS_NUMBER_TYPE_UNKNOWN <(a)) && ((a) < VAL_SMS_MAX_NUMBER_TYPE)))
+
+typedef enum
+{
+ VAL_SMS_DATA_NUM_TYPE_UNKNOWN = 0,
+ VAL_SMS_DATA_NUM_TYPE_RFC_791, /* Internet Protocol */
+ VAL_SMS_DATA_NUM_TYPE_RFC_822, /* Internet Email Address */
+ VAL_SMS_MAX_DATA_NUM_TYPE
+} ValSmsDataNumberT;
+
+/* Macro for validating ValSmsDataNumberT */
+#define IS_VALID_SMS_DATA_NUMBER_TYPE(a) \
+ ((VAL_SMS_DATA_NUM_TYPE_UNKNOWN == (a)) ||((VAL_SMS_DATA_NUM_TYPE_UNKNOWN <(a)) && ((a) < VAL_SMS_MAX_DATA_NUM_TYPE)))
+
+//don't modify following Struct, brew has referred to it
+typedef struct
+{
+ ValSmsDigitModeT DigitMode;
+ ValSmsNumModeT NumberMode;
+ union
+ {
+ ValSmsNumberT NumType;
+ ValSmsDataNumberT DataNumType;
+ } NumberType;
+ ValSmsNumPlanT NumberPlan;
+ kal_uint8 NumFields;
+ kal_uint8 Address[VAL_SMS_MAX_ADDRESS_LEN];
+} ValSmsAddressT;
+
+typedef enum
+{
+ VAL_SMS_SUBADDR_TYPE_NSAP = 0,
+ VAL_SMS_SUBADDR_TYPE_USER,
+ VAL_SMS_MAX_SUBADDR_TYPE
+} ValSmsSubAddrT;
+
+/* Macro for validating ValSmsSubAddrT */
+#define IS_VALID_SMS_SUBADDR_TYPE(a) \
+ ((VAL_SMS_SUBADDR_TYPE_NSAP ==(a)) || ((VAL_SMS_SUBADDR_TYPE_NSAP < (a)) && ((a) < VAL_SMS_MAX_SUBADDR_TYPE)))
+
+
+typedef struct
+{
+ ValSmsSubAddrT SubaddrType;
+ kal_uint8 Odd;
+ kal_uint8 NumFields;
+ kal_uint8 Address[VAL_SMS_MAX_SUBADDR_LEN];
+} ValSmsSubaddressT;
+
+ typedef struct
+ {
+ kal_uint8 replySeq;
+ } ValSmsBearerRlyOptionT;
+
+//don't modify following Enum, brew has referred to it
+typedef enum
+{
+ VAL_SMS_MSG_ENCODE_OCTET = 0,
+ VAL_SMS_MSG_ENCODE_IS91_EXT_PROT_MSG,
+ VAL_SMS_MSG_ENCODE_7BIT_ASCII,
+ VAL_SMS_MSG_ENCODE_IA5,
+ VAL_SMS_MSG_ENCODE_UNICODE,
+ VAL_SMS_MSG_ENCODE_SHIFT_JIS,
+ VAL_SMS_MSG_ENCODE_KS_C_5601,
+ VAL_SMS_MSG_ENCODE_LATIN_HEBREW,
+ VAL_SMS_MSG_ENCODE_LATIN,
+ VAL_SMS_MSG_ENCODE_GSM_7BIT,
+#ifdef MTK_CBP
+ VAL_SMS_MSG_ENCODE_GSM_DCS, /* KWID867 */
+#endif
+ VAL_SMS_MAX_MSG_ENCODE
+} ValSmsMsgEncodeT;
+
+/* Macro for validating vsms message encode type */
+#define IS_VALID_SMS_MSG_ENCODE(a) \
+ ((VAL_SMS_MSG_ENCODE_OCTET == (a)) || ((VAL_SMS_MSG_ENCODE_OCTET <(a)) && ((a) < VAL_SMS_MAX_MSG_ENCODE)))
+
+//don't modify following Struct, brew has referred to it
+typedef struct
+{
+ ValSmsMsgEncodeT MessageEncoding;
+ kal_uint8 MessageType;
+ kal_uint8 NumFields;
+ kal_uint8 Data[VAL_SMS_MAX_USER_DATA_LEN];
+} ValSmsUserDataT;
+
+//don't modify following Enum, brew has referred to it
+typedef enum
+{
+ VAL_SMS_PRIORITY_NORMAL = 0,
+ VAL_SMS_PRIORITY_INTERACTIVE,
+ VAL_SMS_PRIORITY_URGENT,
+ VAL_SMS_PRIORITY_EMERGENCY,
+ VAL_SMS_MAX_PRIORITY
+} ValSmsPriorityT;
+
+/* Macro for validating vsms priority type */
+#define IS_VALID_SMS_PRIORITY(a) \
+ ((VAL_SMS_PRIORITY_NORMAL == (a)) ||((VAL_SMS_PRIORITY_NORMAL <(a)) && ((a) < VAL_SMS_MAX_PRIORITY)))
+
+//don't modify following Enum, brew has referred to it
+typedef enum
+{
+ VAL_SMS_PRIVACY_NOT_RESTRICTED = 0,
+ VAL_SMS_PRIVACY_RESTRICTED,
+ VAL_SMS_PRIVACY_CONFIDENTIAL,
+ VAL_SMS_PRIVACY_SECRET,
+ VAL_SMS_MAX_PRIVACY
+} ValSmsPrivacyT;
+
+/* Macro for validating vsms privacy type */
+#define IS_VALID_SMS_PRIVACY(a) \
+ ((VAL_SMS_PRIVACY_NOT_RESTRICTED == (a)) ||((VAL_SMS_PRIVACY_NOT_RESTRICTED <(a)) && ((a) < VAL_SMS_MAX_ERRCLASS)))
+
+typedef struct
+{
+ kal_bool UserAckReq; /*true for user ack is required*/
+ kal_bool DakReq; /*true for delivery ack is required*/
+ kal_bool ReadAckReq; /*true for read ack is required*/
+} ValSmsRplOptionT;
+
+typedef enum
+{
+ VAL_SMS_ALERT_MOBILE_DEFAULT = 0,
+ VAL_SMS_ALERT_LOW_PRIORITY,
+ VAL_SMS_ALERT_MEDIUM_PRIORITY,
+ VAL_SMS_ALERT_HIGH_PRIORITY,
+ VAL_SMS_MAX_ALERT
+} ValSmsAlertT;
+
+/* Macro for validating vsms alert type */
+#define IS_VALID_SMS_ALERT(a) \
+ ((VAL_SMS_ALERT_MOBILE_DEFAULT == (a)) || \
+ ((VAL_SMS_ALERT_MOBILE_DEFAULT < (a)) && ((a) < VAL_SMS_MAX_ALERT)))
+
+//don't modify following Enum, brew has referred to it
+typedef enum
+{
+ VAL_SMS_LANGUAGE_UNKNOWN = 0,
+ VAL_SMS_LANGUAGE_ENGLISH,
+ VAL_SMS_LANGUAGE_FRENCH,
+ VAL_SMS_LANGUAGE_SPANISH,
+ VAL_SMS_LANGUAGE_JAPANESE,
+ VAL_SMS_LANGUAGE_KOREAN,
+ VAL_SMS_LANGUAGE_CHINESE,
+ VAL_SMS_LANGUAGE_HEBREW,
+#if defined(LGT_EXTENSIONS)
+ VAL_SMS_LANGUAGE_KOREAN_LGT=64,
+#endif
+ VAL_SMS_MAX_LANGUAGE
+} ValSmsLanguageT;
+
+/* Macro for validating vsms language type */
+#define IS_VALID_SMS_LANGUAGE(a) \
+ ((VAL_SMS_LANGUAGE_UNKNOWN == (a)) || \
+ ((VAL_SMS_LANGUAGE_UNKNOWN <(a)) && ((a) < VAL_SMS_MAX_LANGUAGE)))
+
+//don't modify following Struct, brew has referred to it
+typedef struct
+{
+ ValSmsDigitModeT DigitMode;
+ ValSmsNumberT NumberType;
+ ValSmsNumPlanT NumberPlan;
+ kal_uint8 NumFields;
+ kal_uint8 Digits[VAL_SMS_CALLBACK_NUMBER_MAX_DIGITS];
+} ValSmsCbNumberT;
+
+//don't modify following Enum, brew has referred to it
+typedef enum
+{
+ VAL_SMS_DISP_MODE_IMMEDIATE = 0,
+ VAL_SMS_DISP_MODE_DEFAULT,
+ VAL_SMS_DISP_MODE_USER_INVOKE,
+ VAL_SMS_DISP_MODE_RESERVED,
+ VAL_SMS_MAX_DISP_MODE
+} ValSmsDisplayModeT;
+
+/* Macro for validating vsms mssage display mode type */
+#define IS_VALID_SMS_MSG_DISP_MODE(a) \
+ ((VAL_SMS_DISP_MODE_IMMEDIATE == (a)) || \
+ ((VAL_SMS_DISP_MODE_IMMEDIATE <(a)) && ((a) < VAL_SMS_MAX_DISP_MODE)))
+
+//don't modify following Enum, brew has referred to it
+typedef struct
+{
+ ValSmsDisplayModeT SmsDispMode;
+ kal_uint8 Reserved;
+} ValSmsDispModeT;
+
+/*! Error class */
+typedef enum
+{
+ VAL_SMS_ERRCLASS_NO_ERROR,
+ VAL_SMS_ERRCLASS_TEMPORARY = 2,
+ VAL_SMS_ERRCLASS_PERMANENT = 3,
+ VAL_SMS_MAX_ERRCLASS
+} ValSmsErrClassT;
+
+/*! Macro to validate ValSmsErrClassT */
+#define IS_VAL_SMS_NO_ERR_CLASS(a) (VAL_SMS_ERRCLASS_NO_ERROR == (a))
+#define IS_VAL_SMS_ERR_CLASS(a) ((VAL_SMS_ERRCLASS_TEMPORARY <= (a)) && ((a) < VAL_SMS_MAX_ERRCLASS))
+#define IS_VALID_SMS_ERR_CLASS(a) (IS_VAL_SMS_NO_ERR_CLASS(a) || IS_VAL_SMS_ERR_CLASS(a))
+
+typedef enum
+{
+ VAL_SMS_MSGSTATUS_ACCEPTED,
+ VAL_SMS_MSGSTATUS_DEPOSITED_TO_INTERNET,
+ VAL_SMS_MSGSTATUS_DELIVERED,
+ VAL_SMS_MSGSTATUS_CANCELLED,
+ VAL_SMS_MSGSTATUS_NETWORK_CONGESTION,
+ VAL_SMS_MSGSTATUS_NETWORK_ERROR,
+ VAL_SMS_MSGSTATUS_CANCEL_FAILED,
+ VAL_SMS_MSGSTATUS_BLOCKED_DESTINATION,
+ VAL_SMS_MSGSTATUS_TEXT_TOO_LONG,
+ VAL_SMS_MSGSTATUS_DUPLICATE_MESSAGE,
+ VAL_SMS_MSGSTATUS_INVALID_DESTINATION,
+ VAL_SMS_MSGSTATUS_EXPIRED,
+ VAL_SMS_MAX_MSGSTATUS
+} ValSmsMsgStatusCodeT;
+
+//don't modify following Struct, brew has referred to it
+typedef struct
+{
+ ValSmsErrClassT ErrorClass;
+ ValSmsMsgStatusCodeT MsgStatusCode;
+} ValSmsMsgStatusT;
+
+typedef enum
+{
+ VAL_SMS_CATRESULT_SUCCESS,
+ VAL_SMS_CATRESULT_MEMORY_EXCEEDED,
+ VAL_SMS_CATRESULT_LIMIT_EXCEEDED,
+ VAL_SMS_CATRESULT_ALREADY_PROGRAMMED,
+ VAL_SMS_CATRESULT_NOT_PREVIOUSLY_PROGRAMMED,
+ VAL_SMS_CATRESULT_INVALID_MAX_MESSAGES,
+ VAL_SMS_CATRESULT_INVALID_ALERT_OPTION,
+ VAL_SMS_CATRESULT_INVALID_CATEGORY_NAME,
+ VAL_SMS_CATRESULT_UNSPECIFIED_FAILURE,
+ VAL_SMS_MAX_CATRESULT
+} ValSmsCategoryResultCodeT;
+
+typedef struct
+{
+ ValSmsSrvCatT Category;
+ ValSmsCategoryResultCodeT CategoryResult;
+ ValSmsLanguageT Language;
+} ValSmsCategoryResultT;
+
+typedef struct
+{
+ kal_uint8 NumCategories;
+ ValSmsCategoryResultT Cat[VAL_SMS_MAX_CATEGORIES];
+} ValSmsSrvCatProgRsltT;
+
+typedef enum
+{
+ VAL_SMS_OP_DELETE,
+ VAL_SMS_OP_ADD,
+ VAL_SMS_OP_CLEAR_ALL,
+ VAL_SMS_MAX_OP
+} ValSmsOperationCodeT;
+
+typedef enum
+{
+ VAL_NO_ALERT = 0,
+ VAL_MOBILE_DEFAULT_ALERT,
+ VAL_VIBRATE_ALERT_ONCE,
+ VAL_VIBRATE_ALERT_REPEAT,
+ VAL_VISUAL_ALERT_ONCE,
+ VAL_VISUAL_ALERT_REPEAT,
+ VAL_LOW_PRIORITY_ALERT_ONCE,
+ VAL_LOW_PRIORITY_ALERT_REPEAT,
+ VAL_MED_PRIORITY_ALERT_ONCE,
+ VAL_MED_PRIORITY_ALERT_REPEAT,
+ VAL_HIGH_PRIORITY_ALERT_ONCE,
+ VAL_HIGH_PRIORITY_ALERT_REPEAT,
+ VAL_SMS_MAX_CAT_ALERT
+} ValSmsCatAlertT;
+
+typedef struct
+{
+ ValSmsOperationCodeT OperationCode;
+ ValSmsSrvCatT SrvCat;
+ ValSmsLanguageT Lang;
+ /*the maximum number of messages that may be stored in the mobile station for this Service Category*/
+ kal_uint8 MaxMsg;
+ ValSmsCatAlertT Alert;
+ kal_uint8 NumChar;
+ kal_uint8 Chari[VAL_SMS_MAX_CHAR_IN_CATEGORY];
+} ValSmsCatDataT;
+
+typedef struct
+{
+ ValSmsMsgEncodeT MsgEncoding;
+ kal_uint8 NumCat;
+ ValSmsCatDataT Cat[VAL_SMS_MAX_CATEGORIES];
+} ValSmsSrvCatProgDataT;
+
+#ifdef KDDI_EXTENSIONS
+typedef struct
+{
+ kal_uint32 IpAddress;
+ kal_uint8 CtlFlag;
+} ValSmsIpAddressT;
+#endif
+//don't modify following Struct, brew has referred to it
+typedef struct
+{
+ /* required fields */
+ kal_uint32 FieldMask; /* the field mask */
+ ValSmsRecIdT SmsMsgRecId; /* the phisical position of sms record in the storage device, UI NEEDN't fill it */
+ ValSmsStatT SMSState; /* sms message status, UI may not fill it when sending, But if UI want to write or update a message, it must fill it.*/
+ kal_uint8 NumUserData; /* number of user data */
+ ValSmsTransMsgTypeT TransMsgType; /* transport layer message type, UI may not fill it */
+ kal_uint16 MsgId; /* message id, required, UI NEEDN'T fill it */
+ kal_bool HeaderInd; /* message head indication, required. UI MUST give it a correct value. True for the user data field includes a User Data Header, else set false */
+ ValSmsTeleMsgT TeleMsgType; /* teleservice layer message type, required. UI MUST give it a correct value */
+ ValSmsTeleSrvIdT TeleSrvId; /* teleservice id, required, UI MUST give it a correct value */
+ /* following is the optional fields */
+ ValSmsSrvCatT SrvCat; /* for broadcasting message, required, else, optional */
+ ValSmsAddressT Address; /* required for submit and delivery message */
+ ValSmsSubaddressT Subaddress; /* optional */
+ ValSmsBearerRlyOptionT BearerReplyOption;
+ ValSmsUserDataT UserData[VAL_SMS_MAX_NUM_DATA_MSGS]; /* user data or multi encoding user data */
+ kal_uint8 UserRspCode;
+ ValSmsAbsTimeT TimeStamp;
+ ValSmsAbsTimeT ValTimeAbs;
+ kal_uint8 RelValPeriod;
+ ValSmsAbsTimeT AbsDelTime;
+ kal_uint8 RelDelPeriod;
+ ValSmsPriorityT Priority;
+ ValSmsPrivacyT Privacy;
+ ValSmsRplOptionT RplOp;
+ kal_uint8 NumMsgs; /* only for VMN message */
+ ValSmsAlertT Alert;
+ ValSmsLanguageT Lang;
+ ValSmsCbNumberT CallBackNum;
+ ValSmsDispModeT DispMode;
+ kal_uint16 MsgDepIndex;
+ kal_uint16 SeqNum; /*only for receive message */
+ ValSmsMsgStatusT MsgStatus; /*used only for SMS delivery Acknowledgement message */
+ ValSmsSrvCatProgRsltT SrvCatProgResult; /* only for submitting message */
+ ValSmsSrvCatProgDataT SrvCatData; /*only for delivery message */
+#ifdef MTK_CBP_ENCRYPT_VOICE
+ kal_bool CryptSmsPres;
+ ValCryptSmsInfoT CryptSmsInfo; /*sms crypt sms*/
+#endif
+#ifdef KDDI_EXTENSIONS
+ ValSmsIpAddressT MsgIpAddr;
+ kal_uint8 NotifyFlag;
+ kal_uint32 UimId;
+#endif
+ kal_bool IsImsPPdownLoad;
+ kal_uint8 seq_id;
+} ValSmsTxtRecordT;
+
+#ifdef MTK_CBP_ENCRYPT_VOICE
+typedef enum
+{
+ VAL_SMS_MSG_TYPE_CALL_KEY_REQ= 0,
+ VAL_SMS_MSG_TYPE_CALL_KEY_RSP,
+ VAL_SMS_MSG_TYPE_CALLED_ENCRYPT_IND,
+ VAL_SMS_MSG_TYPE_CALLED_KEY_REQ,
+ VAL_SMS_MSG_TYPE_CALLED_KEY_RSP,
+ VAL_SMS_MSG_TYPE_ERROR_IND,
+ VAL_SMS_MSG_TYPE_KMC_PUBLIC_KEY_UPDATE ,
+ VAL_SMS_MSG_TYPE_KMC_PUBLIC_KEY_UPDATE_RSP,
+ VAL_SMS_MSG_TYPE_KMC_PUBLIC_KEY_UPDATE_CNF,
+ VAL_SMS_MSG_TYPE_REMOTE_CONTROL_INS ,
+ VAL_SMS_MSG_TYPE_REMOTE_CONTROL_INS_RSP,
+ VAL_SMS_MSG_TYPE_INITIAL,
+}ValSpeSmsMsgTypeT;
+
+typedef struct
+{
+ kal_uint8 mode;
+ kal_uint8 calledNum[11];
+ kal_uint8 calledBytes;
+} ValCryptSmsCallKeyInfoT;
+
+typedef struct
+{
+ kal_uint8 rspType;
+ kal_uint8 result;
+} ValCryptRcInsRspInfoT;
+#endif
+
+
+#endif
+/**Log information: D:\ClearCase\pchen_vtui2\HZREF\cp\inc\valsmsdefine.h@@\main\vtui2_plus\2 2008-05-07 07:13:18 GMT pchen
+** HZTP#0000**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory\2 2008-08-05 08:38:03 GMT dwang
+** HREF#0000
+|Merge vtui2_plus**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory\3 2008-08-12 06:39:10 GMT pchen
+** HREF#1445**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory\4 2008-10-23 05:56:27 GMT pchen
+** HREF#1445**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory\5 2008-12-01 13:19:35 GMT ltian
+** HREF#1445**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory\6 2009-03-06 08:03:57 GMT pchen
+** HREF#1445**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory\7 2009-03-10 09:05:38 GMT pchen
+** HREF#1445**/
+/**Log information: \main\vtui2_5x\sms_contact_refactory_1\1 2009-03-20 01:29:03 GMT yfan
+** HREF#1580**/
+/**Log information: \main\helios_dev\touchflow\1 2009-06-05 06:27:24 GMT yfan
+** HREF#1580**/
+/**Log information: \main\helios_dev\touchflow\2 2009-06-05 06:27:45 GMT yfan
+** HREF#1580**/
+/**Log information: \main\helios_dev\touchflow\touchflow_pchen_href8751\1 2009-11-16 08:13:58 GMT pchen
+** HREF#8751 **/
+/**Log information: \main\helios_dev\touchflow\3 2009-11-16 09:16:34 GMT dwang
+** HREF#8751**/
+/**Log information: \main\VTUI3\2 2010-01-11 12:32:21 GMT qwu
+** HREF#10125**/
+/**Log information: \main\CBP7FeaturePhone\CBP7FeaturePhone_nicholaszhao_href17384\1 2011-07-04 08:34:21 GMT nicholaszhao
+** HREF#17384**/
+/**Log information: \main\CBP7FeaturePhone\3 2011-07-12 09:42:01 GMT marszhang
+** HREF#17384**/
+
diff --git a/mcu/interface/protocol/l4_c2k/valuimapi.h b/mcu/interface/protocol/l4_c2k/valuimapi.h
new file mode 100644
index 0000000..e8e5073
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valuimapi.h
@@ -0,0 +1,1784 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2005-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef VALUIMAPI_H
+#define VALUIMAPI_H
+/*****************************************************************************
+
+ FILE NAME: valuimapi.h
+
+ DESCRIPTION:
+
+ This file contains all constants and typedefs needed by
+ valuimapi.c. It provides the main UIM functions to VAL layer.
+
+
+*****************************************************************************/
+#include "uimapi.h"
+#include "valapi.h"
+#include "valphbapi.h"
+#include "valsmsapi.h"
+#ifdef MTK_DEV_C2K_IRAT
+#include "valutkapi.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define VAL_CHV_MAX_INPUT_NUM 3
+#define VAL_CHV_UNBLOCK_MAX_INPUT_NUM 10
+#define VAL_UIM_MAX_REG_IDS 2
+#define VAL_UIM_MAX_MDN_COUNT 10
+#ifdef MTK_CBP
+/* according to 3.4.34 of TIA/EIA-95-B of C.S0023 */
+#define VAL_MAX_DIGITS_IN_EF_MDN 15
+
+#define VAL_UIM_MAX_FULLPATH_LENGTH 8
+#define VAL_UIM_MAX_RECORD_NUM 20
+
+#define VAL_UIM_ICCID_LEN 21
+#endif
+#define VAL_UIM_MAX_SMSVP_COUNT 4
+
+/* CHV Status read from UIM card */
+typedef struct
+{
+ CardStatusT CardStatus;
+ ChvStatusT ChvStatus;
+#ifdef MTK_DEV_C2K_IRAT
+ kal_bool UsimAppExisted;
+#endif
+ kal_uint8 ChvSum; /* Sum of CHV attempt */
+ kal_uint8 PukSum; /* Sum of UNBLOCK CHV attempt */
+ kal_uint8 Chv1LeftCount;
+ kal_uint8 Chv2LeftCount;
+ kal_uint8 Puk1LeftCount;
+ kal_uint8 Puk2LeftCount;
+#ifdef __CARRIER_RESTRICTION__
+ kal_uint8 SlotId;
+#endif
+} ValChvStatusT;
+
+typedef struct
+{
+ kal_bool AppInfoValid;
+ kal_uint8 Channel_Id;
+ kal_uint8 Protocol_Id;
+ kal_uint8 AID_Len;
+ kal_uint8 AID[UICC_AID_MAX_LEN];
+ kal_uint8 APP_Label_Len;
+ kal_uint8 APP_Label[UICC_APP_LABEL_LEN];
+ kal_bool PIN1_Enabled;
+ kal_bool PIN2_Enabled;
+ kal_uint8 PIN1_Count;
+ kal_uint8 PIN2_Count;
+ kal_uint8 PUK1_Count;
+ kal_uint8 PUK2_Count;
+ kal_uint8 ChvStatus;
+#ifdef __CARRIER_RESTRICTION__
+ kal_uint8 SlotId;
+#endif
+ kal_uint16 CardStatus;
+}ValCardAppInfoT;
+
+#ifdef MTK_DEV_C2K_IRAT
+extern kal_uint8 ValUimInfoReadStatus;
+
+#define VAL_UIM_SP_NAME_READ_MASK 0x01
+#define VAL_UIM_MDN_READ_MASK 0x02
+#define VAL_UIM_ICCID_READ_MASK 0x04
+#define VAL_UIM_NAM_DATA_READ_MASK 0x08
+#define VAL_UIM_INFO_ALL_READ_MASK 0x0F
+
+#define UIM_UTK_MENU_SIZE 256
+
+typedef enum
+{
+ VAL_UTK_SMS_FILE_COMPLETED = 0x1,
+ VAL_UTK_HLP_FILE_COMPLETD = 0x2,
+ VAL_UTK_ALL_FILE_COMPLETED_MASK = 0x3
+}ValUimUtkFileMaskTypeT;
+
+typedef enum
+{
+ VAL_CAT_TYPE_STK,
+ VAL_CAT_TYPE_UTK,
+ VAL_CAT_TYPE_NUM
+} ValCatTypeE;
+
+typedef enum
+{
+ VAL_UTK_HANDLE_BY_TE, /* CMD and TR handled by AP/MMI */
+ VAL_UTK_HANDLE_BY_SIM, /* CMD and TR handled by modem. But some cmd might need TE involve ex: STKCALL,STKSS,.. */
+ VAL_UTK_HANDLE_NULL
+}ValUtkCmdCfgE;
+
+typedef enum
+{
+ UTK_NO_TIMER_STATUS = 0,
+ UTK_TIMER_RUNNING,
+ UTK_TIMER_NOT_RUNNING,
+ UTK_TIMER_STOPPED,
+ UTK_TIMER_TIMED_OUT
+} UtkTimerStatusT;
+
+typedef struct
+{
+ kal_uint32 UtkTimerValue;
+ UtkTimerStatusT UtkTimerStatus;
+ kal_uint32 StartTime;
+}UtkTimerManagerT;
+
+
+enum
+{
+ UTK_FILE_ADN = 0x6F3A,
+ UTK_FILE_FDN = 0x6F3B,
+ UTK_FILE_SMS = 0x6F3C,
+ UTK_FILE_SPN = 0x6F41,
+ UTK_FILE_MDN = 0x6F44,
+ UTK_FILE_CST = 0x6F32,
+ UTK_FILE_EST = 0x6F75,
+ UTK_FILE_ICCID = 0x2FE2,
+ UTK_FILE_HRPDCAP = 0x6F56,
+ UTK_FILE_HRPDUPP = 0x6F57,
+ UTK_FILE_ME3GPD = 0x6F48,
+ UTK_FILE_3GPDOPM = 0x6F49,
+ UTK_FILE_SIPCAP = 0x6F4A,
+ UTK_FILE_MIPCAP = 0x6F4B,
+ UTK_FILE_SIPUPP = 0x6F4C,
+ UTK_FILE_MIPUPP = 0x6F4D,
+ UTK_FILE_SIPSP = 0x6F4E,
+ UTK_FILE_MIPSP = 0x6F4F,
+ UTK_FILE_SIPPAPSS = 0x6F50,
+ UTK_FILE_MIPFLAGS = 0x6F78,
+ UTK_FILE_C_MIPFLAGS = 0x6F84,
+ UTK_FILE_SIPUPPEXT = 0x6F7D,
+ UTK_FILE_MIPUPPEXT = 0x6F80,
+ UTK_FILE_TCPCONFIG = 0x6F79,
+ UTK_FILE_C_TCPCONFIG = 0x6F88,
+ UTK_FILE_DGC = 0x6F7A,
+ UTK_FILE_C_DGC = 0x6F89,
+ UTK_FILE_IPV6CAP = 0x6F77,
+ UTK_FILE_C_IPV6CAP = 0x6F87
+ /* add other files here */
+};
+
+#define VAL_UIM_FILE_LIST_MAX 50
+
+typedef struct
+{
+ kal_uint8 FileCount;
+ kal_uint16 FileId[VAL_UIM_FILE_LIST_MAX];
+}ValUimFileListT;
+
+#endif
+
+/* Define CHV type */
+typedef enum
+{
+ VAL_CHV1 = 1,
+ VAL_CHV2
+} ValChvIdT;
+
+/* Define CHV operation response result */
+typedef enum
+{
+ VAL_CHV_OP_SUCCESS = 0,
+ VAL_CHV_NOT_INITIALIZE, /* no CHV initialized */
+ VAL_CHV_OP_FAILURE_AND_PERMIT_ATTEMPT, /* unsuccessful CHV/UNBLOCK CHV verification, at least one attempt left */
+ VAL_CHV_OP_CONTRADICTION_WITH_CHV_STATUS, /* in contradiction with CHV status */
+ VAL_CHV_OP_CONTRADICTION_WITH_INVALIDATION_STATE, /* in contradiction with invalidation status */
+ VAL_CHV_OP_FAILURE_AND_NO_ATTEMPT, /*unsuccessful CHV/UNBLOCK CHV verification, no attempt left;CHV/UNBLOCK CHV blocked*/
+ VAL_CHV_OP_FAILURE_RECOVERY, /*fast recovery during CHV process*/
+ VAL_CHV_FAILURE_INSUFFICIENT_MEMORY, /* UICC returns 9210 for CHV command*/
+ VAL_CHV_OP_FAILURE /*failure caused by other causes */
+} ValChvOpResultT;
+
+#ifdef CHV_DEBUG
+/* test message */
+typedef struct
+{
+ kal_uint8 ChvId; /* Specify the CHV */
+ kal_uint8 ChvLen;
+ kal_uint8 ChvVal[8]; /* CHV value */
+} ValChvTstReqVerifyMsgT;
+/* change CHV msg */
+typedef struct
+{
+ kal_uint8 ChvId; /* Specify the CHV */
+ kal_uint8 OldChvLen;
+ kal_uint8 OldChvVal[8];/* Old CHV value */
+ kal_uint8 NewChvLen;
+ kal_uint8 NewChvVal[8];/* New CHV value */
+} ValChvTstReqChangeMsgT;
+
+/* Disable CHV Msg */
+typedef struct
+{
+ kal_uint8 ChvLen;
+ kal_uint8 Chv1Val[8]; /* CHV1 value */
+} ValChvTstReqDisableMsgT;
+
+/* Enable CHV Msg */
+typedef struct
+{
+ kal_uint8 ChvLen;
+ kal_uint8 Chv1Val[8]; /* CHV1 value */
+} ValChvTstReqEnableMsgT;
+
+/* Unblock CHV Msg */
+typedef struct
+{
+ kal_uint8 ChvId; /* Specify the CHV */
+ kal_uint8 UblkChvLen;
+ kal_uint8 UblkChvVal[8];/* Unblock CHV value */
+ kal_uint8 NewChvLen;
+ kal_uint8 NewChvVal[8]; /* New CHV value */
+} ValChvTstReqUnblockMsgT;
+
+#endif /* CHV_DEBUG */
+
+/*********UIM Short Message Service Parameters structure***********/
+typedef struct
+{
+ kal_uint8 RecLen;
+ kal_uint8 RecData[127];
+}ValUimSmsParamRecT;
+
+/******************** UIM MDN structures***************************/
+/* Val MDN buffer structure(MDN is BCD type) */
+typedef struct
+{
+ kal_uint8 MdnLen;
+ kal_uint8 Mdn[8];
+} ValUimMdnT;
+
+/* Val MDN structure(MDN is kal_char type) */
+typedef struct
+{
+ kal_uint8 MdnLen;
+ kal_uint8 Mdn[NAM_MAX_MDN_DIGITS];
+} ValUimMdnRecT;
+
+/****** Val Uim notify register event *****/
+typedef enum
+{
+ VAL_UIM_EVENT_NOTIFY_REGISTER
+} ValUimEventIdT;
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/* ETS Test Messages */
+typedef struct
+{
+ kal_uint8 nIndex;
+} ValUimGenericMsgT;
+
+typedef struct
+{
+ kal_uint8 nIndex;
+ kal_uint8 Name[MAXALPHALENGTH];
+ kal_uint8 PhNum[21];
+} ValUimUpdatePhbRecMsgT;
+
+typedef struct
+{
+ kal_uint8 nIndex;
+ kal_uint8 nStatus;
+ kal_uint8 MsgData[255];
+ kal_uint8 MsgLen;
+} ValUimUpdateSmsRecMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+} ValChvMsgT;
+
+typedef struct
+{
+ kal_bool status;
+} ValChvStatusMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint8 ChvId;
+ kal_uint8 ChvLen;
+ kal_uint8 Chv[8];
+} ValChvVerifyMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint8 ChvId;
+ kal_uint8 OldChvLen;
+ kal_uint8 OldChv[8];
+ kal_uint8 NewChvLen;
+ kal_uint8 NewChv[8];
+} ValChvChangeMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint8 Chv1Len;
+ kal_uint8 Chv1[8];
+} ValChvEnableDisableMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+ kal_uint8 ChvId;
+ kal_uint8 UnblockChvLen;
+ kal_uint8 UnblockChv[8];
+ kal_uint8 NewChvLen;
+ kal_uint8 NewChv[8];
+} ValChvUnblockMsgT;
+
+typedef struct
+{
+ ExeRspMsgT RspInfo;
+} ValUimGetMaxMdnRecsMsgT;
+
+typedef struct
+{
+ kal_uint8 numRecs;
+} ValUimNumRecsMsgT;
+
+typedef struct
+{
+ kal_uint8 Encoding;
+ kal_uint8 Language;
+ kal_uint16 StringLen;
+ kal_char String[32];
+} SPNameT;
+
+typedef struct
+{
+ SPNameT SPName;
+ kal_bool IsValidData;
+} ValSPNameT;
+
+
+/*get gsm imsi data*/
+#define VAL_UIM_GSM_IMSI_LEN 9
+
+typedef struct
+{
+ ExeRspMsgT RspMsg;
+ kal_bool ImsiValid;
+ kal_uint8 ImsiData[VAL_UIM_GSM_IMSI_LEN];
+}ValUimGsmImsiRspMsgT;
+
+typedef enum
+{
+ TYPE_RAND = 0,
+ TYPE_RANDU =1
+}ValRandTypeT;
+
+typedef enum
+{
+ VAL_UIM_NT_UNKNOWN = 0,
+ VAL_UIM_NT_INTERNATIONAL,
+ VAL_UIM_NT_NATIONAL,
+ VAL_UIM_NT_NETWORK_SPECIFIC,
+ VAL_UIM_NT_SUBSCRIBER,
+ VAL_UIM_NT_RESERVED,
+ VAL_UIM_NT_ABBREVIATED = 6
+} ValUimNumberTypeT;
+
+typedef enum
+{
+ VAL_UIM_NP_UNKNOWN = 0,
+ VAL_UIM_NP_ISDN_TELEPHONY,
+ VAL_UIM_NP_RESERVED2,
+ VAL_UIM_NP_DATA,
+ VAL_UIM_NP_TELEX,
+ VAL_UIM_NP_RESERVED5,
+ VAL_UIM_NP_RESERVED6,
+ VAL_UIM_NP_RESERVED7,
+ VAL_UIM_NP_RESERVED8,
+ VAL_UIM_NP_PRIVATE = 9
+} ValUimNumberPlanT;
+
+typedef enum
+{
+ VAL_UIM_READ_BINARY = 0xB0,
+ VAL_UIM_READ_RECORD = 0xB2,
+ VAL_UIM_UPDATE_BINARY = 0xD6,
+ VAL_UIM_UPDATE_RECORD = 0xDC,
+ VAL_UIM_STORE_ESN = 0xDE,
+ VAL_UIM_STATUS = 0xF2,
+ VAL_UIM_ENVELOPE = 0xC2,
+ VAL_UIM_TERM_PROFILE = 0x10,
+ VAL_UIM_TERM_RESPONSE = 0x14,
+ VAL_UIM_SELECT_FILE = 0xA4,
+ VAL_UIM_GET_RESPONSE = 0xC0,
+ VAL_UIM_SEARCH_RECORD = 0xA2
+ /* Reserved */
+}ValUimCmdT;
+
+#ifdef MTK_DEV_C2K_IRAT
+typedef enum
+{
+ VAL_UIM_BT_CONNECT = 0,
+ VAL_UIM_BT_DISCONNECT,
+ VAL_UIM_BT_POWER_ON,
+ VAL_UIM_BT_POWER_OFF,
+ VAL_UIM_BT_RESET,
+ VAL_UIM_BT_APDU,
+ VAL_UIM_BT_INVALID_CMD
+}ValBTCmdT;
+#endif
+
+typedef struct
+{
+ kal_bool Ack; /* KAL_TRUE: Operation is successful, KAL_FALSE: File doesn't exist or operation is error */
+ kal_uint8 SDNRecCount;
+} ValUimSDNParamsT;
+
+typedef struct
+{
+ kal_bool Ack; /* KAL_TRUE: Operation is successful, KAL_FALSE: File doesn't exist or operation is error */
+ kal_bool IsFree;
+ kal_uint8 RecordIndex;
+ kal_uint8 AlphaIdentifier[VAL_PHB_MAX_ALPHA_LENGTH];
+ kal_uint8 PhoneNumber[VAL_PHB_MAX_PHONE_LENGTH];
+ kal_uint8 TON;
+ kal_uint8 NPI;
+} ValUimSDNRecT;
+
+typedef struct
+{
+ kal_uint8 DisCond; /*display condiction*/
+ kal_uint8 Encoding; /* character encoding*/
+ kal_uint8 LangInd; /*language indication */
+ kal_uint8 Name[32];
+} ValUimProviderName;
+
+#define VAL_UIM_MAX_ADDRESS_NUM 20
+/* Address (8.1) */
+typedef struct
+{
+ ValUimNumberPlanT Npi;
+ ValUimNumberTypeT Ton;
+ kal_uint8 Len;
+ kal_uint8 Number[VAL_UIM_MAX_ADDRESS_NUM];
+} ValUimAddressT;
+
+typedef enum
+{
+ VAL_UIM_SETUP_CALL_ONIDLE, /* set up call, but only if not currently busy on another call */
+ VAL_UIM_SETUP_CALL_ONIDLE_REDIALABLE, /*set up call, but only if not currently busy on another call, with redial*/
+ VAL_UIM_SETUP_CALL_HOLDABLE, /*set up call, putting all other calls (if any) on hold */
+ VAL_UIM_SETUP_CALL_HOLDABLE_REDIALABLE, /*set up call, putting all other calls (if any) on hold, with redial*/
+ VAL_UIM_SETUP_CALL_DISCONNECTABLE, /*set up call, disconnecting all other calls (if any)*/
+ VAL_UIM_SETUP_CALL_DISCONNECTABLE_REDIALABLE /*set up call, disconnecting all other calls (if any), with redial*/
+} ValUimCallTypeT;
+
+typedef struct
+{
+ ValUimCallTypeT CallType;
+ ValUimAddressT Address;
+ kal_uint32 Duration; /* ms */
+}ValUimSetUpCallT;
+
+typedef struct
+{
+ kal_uint8 UtkSmsLen;
+ kal_uint8 *UtkSmsBufferP;
+ kal_uint8 UtkSmsTR;
+ ValUimAddressT UtkSmsAddress;
+ kal_bool additionInfo_existed;
+ kal_uint8 additionalInfo;
+ kal_bool utkIconDisplayed;
+ kal_uint8 utkSmsMode;
+}utkSmsInfoT;
+
+typedef struct
+{
+ ValUimSetUpCallT utkCallCmd;
+ kal_uint8 utkCallTR;
+ kal_bool additionInfo_existed;
+ kal_uint8 additionalInfo;
+ kal_bool utkIconDisplayed;
+ kal_uint8 rspAtChan;
+}utkCallInfoT;
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+typedef enum{
+ UTK_PROA_STATE_NULL,
+ UTK_PROA_STATE_WAITING_TR,
+ UTK_PROA_STATE_WAITING_SESSION_END
+}UtkProacmStateE;
+#endif
+
+typedef struct
+{
+ ValCatTypeE CatType;
+ kal_uint8 StoredUtkMenu[UIM_UTK_MENU_SIZE];
+ kal_uint16 UtkMenuLen;
+
+ kal_uint16 CmdId; /*defined by MD1*/
+ kal_uint8 CmdNum;
+ kal_uint8 CmdType;
+ kal_uint8 CmdQualifier;
+ UtkTimerManagerT UtkTimerManager[UTK_TIMER_MANAGER_NUM];
+ kal_timerid UtkTimer[UTK_TIMER_MANAGER_NUM];
+ kal_bool RecvTerminalRspFromAp;
+ utkSmsInfoT utkSmsInfo;
+ utkCallInfoT utkCallInfo;
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+ UtkProacmStateE proactiveCmdState;
+ kal_uint8 currProactiveCmd;
+ kal_bool pendEvtDownloadDataValid;
+ ValUtkSetupEventDataT pendEvtDownloadData;
+#endif
+}ValUimUtkInfoT;
+
+typedef enum
+{
+
+ UIM_FILE_TYPE_INVALID = 0x00,
+ UIM_FILE_TYPE_MF,
+ UIM_FILE_TYPE_DF,
+ UIM_FILE_TYPE_EF,
+ UIM_FILE_TYPE_EF_TRANSPARENT,
+ UIM_FILE_TYPE_EF_CYCLIC,
+ UIM_FILE_TYPE_EF_LINEARFIXED,
+} UimFileTypeT;
+
+typedef struct
+{
+ kal_uint16 sw;
+ kal_uint8 file_fcp_len;
+ kal_uint8* file_fcp;
+}ValCacheFcpInfoT;
+
+typedef struct
+{
+ kal_bool binary_valid;
+ kal_uint16 sw;
+ kal_uint16 cached_binary_len;
+ kal_uint8* cached_binary_content;
+}ValCacheBinaryInfoT;
+
+typedef struct
+{
+ kal_bool record_valid;
+ kal_uint8 record_index;
+ kal_uint8 record_len;
+ kal_uint16 sw;
+ kal_uint8* record_data;
+}ValCacheRecordInfoT;
+
+typedef struct
+{
+ kal_uint8 file_record_num;
+ ValCacheRecordInfoT cached_record_content[VAL_UIM_MAX_RECORD_NUM]; /*first two bytes for SW*/
+}ValCacheRecordInfoListT;
+
+
+typedef struct
+{
+ kal_bool is_used;
+ UimFileTypeT file_type;
+ kal_uint8 file_path_len;
+ kal_uint8 file_path[VAL_UIM_MAX_FULLPATH_LENGTH];
+ kal_bool file_fcp_valid;
+ ValCacheFcpInfoT fcp_info;
+ union
+ {
+ ValCacheBinaryInfoT binary_info;
+ ValCacheRecordInfoListT record_info;
+ } file_content_info;
+}ValCacheUimFileT;
+
+typedef struct
+{
+ kal_uint16 PduLen;
+ kal_uint8* PduData;
+}ValExtendedPduT;
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimInit
+
+ DESCRIPTION:
+
+ Create ValUimEvtLock.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+void ValUimInit( void );
+
+#if 0
+/* under construction !*/
+#endif
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimGetMaxMdnRecNum
+
+ DESCRIPTION:
+
+ It's invoked to Get the number of EF MDN record in UIM card.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ Num: the number of MDN record.
+
+*********************************************************************************/
+kal_uint8 ValUimGetMaxMdnRecNum( void );
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimGetMdnRec
+
+ DESCRIPTION:
+
+ It's invoked to Get MDN record.
+
+ PARAMETERS:
+
+ Index: Record index, start from 1.
+ MdnRecP: Returned Mdn pointer.
+
+ RETURNED VALUES:
+
+ KAL_TRUE: this operation is successful.
+ KAL_FALSE: failure.
+
+*********************************************************************************/
+kal_bool ValUimGetMdnRec( kal_uint8 Index,
+ ValUimMdnRecT* MdnRecP );
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimUpdateMdnRec
+
+ DESCRIPTION:
+
+ This routine sends Update Record(6F44) message to the UIM task.
+ PARAMETERS:
+
+ Index: Record index, start from 1.
+ Len: MDN length
+ MdnP: Point to MDN buffer.
+
+ RETURNED VALUES:
+
+ KAL_TRUE: this operation is successful.
+ KAL_FALSE: failure.
+
+*********************************************************************************/
+kal_bool ValUimUpdateMdnRec( kal_uint8 Index,
+ kal_uint8 Len,
+ kal_uint8* MdnP );
+
+/*********************************************************************************
+
+ FUNCTION NAME: ValUimDelMdnRec
+
+ DESCRIPTION:
+
+ This routine sends Update Record(6F44) message to the UIM task.
+
+ PARAMETERS:
+
+ Index: Record index, start from 1.
+
+ RETURNED VALUES:
+
+ KAL_TRUE: this operation is successful.
+ KAL_FALSE: failure.
+
+**********************************************************************************/
+kal_bool ValUimDelMdnRec( kal_uint8 Index );
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimMdnDeliverMsg
+
+ DESCRIPTION:
+
+ Deliver UIM MDN response messages. It is used by valtask.
+
+ PARAMETERS:
+
+ MsgId: received message id
+ MsgP: message
+ MsgSize: message size
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+void ValUimMdnDeliverMsg( kal_uint32 MsgId,
+ void* MsgP,
+ kal_uint32 MsgSize );
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValChvGetStatus
+
+ DESCRIPTION:
+
+ This routine sends UIM Get Status message to the UIM task, and saves callback
+ function's pointer in order to process CHV state when the response from the
+ UIM is received.
+
+ PARAMETERS:
+
+ ChvCallbackP: Pointer to callback function
+
+ RETURNED VALUES:
+
+ KAL_TRUE: Get Status Msg has been sent.
+ KAL_FALSE: error. callback=NULL or other task is doing this operation.
+
+*****************************************************************************/
+kal_bool ValChvGetStatus( void(*ChvCallbackP)(ValChvStatusT) );
+
+#ifdef MTK_DEV_C2K_IRAT
+/*****************************************************************************
+
+ FUNCTION NAME: ValLocalChvVerify
+
+ DESCRIPTION:
+
+ This routine sends verify CHV message to the UIM task
+
+ PARAMETERS:
+
+ ChvId: CHV1 or CHV2
+
+ RETURNED VALUES:
+
+ none
+
+*****************************************************************************/
+void ValLocalChvVerify( ValChvIdT ChvId);
+#endif
+/*****************************************************************************
+
+ FUNCTION NAME: ValChvVerify
+
+ DESCRIPTION:
+
+ This routine sends App verify CHV message to the UIM task, and saves callback
+ function's pointer in order to process the result when the response from the
+ UIM is received.
+
+ PARAMETERS:
+
+ ChvId: CHV1 or CHV2
+ ChvLen: Length of CHV value
+ ChvP: Pointer to CHV value
+ ChvCallbackP: Pointer to callback function
+
+ RETURNED VALUES:
+
+ KAL_TRUE: Uim App Verify Msg has been sent.
+ KAL_FALSE: error. callback=NULL or other task is doing this operation.
+
+*****************************************************************************/
+kal_bool ValChvVerify( ValChvIdT ChvId,
+ kal_uint8 ChvLen,
+ kal_uint8* ChvP,
+ void (*ChvCallbackP)(ValChvOpResultT) );
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValChvChange
+
+ DESCRIPTION:
+
+ This routine sends App change CHV message to the UIM task, and saves callback
+ function's pointer in order to process the result when the response from the
+ UIM is received.
+
+ PARAMETERS:
+
+ ChvId: CHV1 or CHV2
+ OldChvLen: Length of old CHV value
+ OldChvP: Pointer to old CHV value
+ NewChvLen: Length of new CHV value
+ NewChvP: Pointer to new CHV value
+ ChvCallbackP: Pointer to callback function
+
+ RETURNED VALUES:
+
+ KAL_TRUE: Uim App change Chv Msg has been sent.
+ KAL_FALSE: error. callback=NULL or other task is doing this operation.
+
+*****************************************************************************/
+kal_bool ValChvChange( ValChvIdT ChvId,
+ kal_uint8 OldChvLen,
+ kal_uint8* OldChvP,
+ kal_uint8 NewChvLen,
+ kal_uint8* NewChvP,
+ void (*ChvCallbackP)(ValChvOpResultT) );
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValChvDisable
+
+ DESCRIPTION:
+
+ This routine sends App disable CHV message to the UIM task, and saves callback
+ function's pointer in order to process the result when the response from
+ the UIM is received.
+
+ PARAMETERS:
+
+ Chv1Len: Length of CHV1 value
+ Chv1P: Pointer to CHV1 value
+ ChvCallbackP: Pointer to callback function
+
+ RETURNED VALUES:
+
+ KAL_TRUE: Uim App Disable Chv Msg has been sent.
+ KAL_FALSE: error. callback=NULL or other task is doing this operation.
+
+*****************************************************************************/
+kal_bool ValChvDisable( kal_uint8 Chv1Len,
+ kal_uint8* Chv1P,
+ void (*ChvCallbackP)(ValChvOpResultT) );
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValChvEnable
+
+ DESCRIPTION:
+
+ This routine sends App enable CHV message to the UIM task, and saves callback
+ function's pointer in order to process the result when the response from
+ the UIM is received.
+
+ PARAMETERS:
+
+ Chv1Len: Length of CHV1 value
+ Chv1P: Pointer to CHV1 value
+ ChvCallbackP: Pointer to callback function
+
+ RETURNED VALUES:
+
+ KAL_TRUE: Uim App Enable Chv Msg has been sent.
+ KAL_FALSE: error. callback=NULL or other task is doing this operation.
+
+*****************************************************************************/
+kal_bool ValChvEnable( kal_uint8 Chv1Len,
+ kal_uint8* Chv1P,
+ void (*ChvCallbackP)(ValChvOpResultT) );
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimEnableChvBySimIndex
+
+ DESCRIPTION:
+ Send Enable CHV to UIM.
+
+*****************************************************************************/
+kal_bool ValUimEnableChvBySimIndex(kal_uint8 chan,
+ kal_uint8 simIndex,
+ kal_uint8 Chv1Len,
+ kal_uint8* Chv1P);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimDisableChvBySimIndex
+
+ DESCRIPTION:
+ Send Disable CHV to UIM.
+
+*****************************************************************************/
+kal_bool ValUimDisableChvBySimIndex(kal_uint8 chan,
+ kal_uint8 simIndex,
+ kal_uint8 Chv1Len,
+ kal_uint8* Chv1P);
+
+
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimUnblockChvBySimIndex
+
+ DESCRIPTION:
+ Send Unblock CHV to UIM.
+
+ PARAMETERS:
+
+ ChvId: CHV1 or CHV2
+ UnblockChvLen: Length of UNBLOCK CHV value
+ UnblockChvP: Pointer to UNBLOCK CHV value
+ NewChvLen: Length of new CHV value
+ NewChvP: Pointer to new CHV value
+ ChvCallbackP: Pointer to callback function
+
+ RETURNED VALUES:
+
+ KAL_TRUE: Uim App Unbolck chv Msg has been sent.
+ KAL_FALSE: error. callback=NULL or other task is doing this operation.
+
+*****************************************************************************/
+kal_bool ValUimUnblockChvBySimIndex(kal_uint8 chan,
+ kal_uint8 simIndex,
+ ValChvIdT ChvId,
+ kal_uint8 UnblockChvLen,
+ kal_uint8* UnblockChvP,
+ kal_uint8 NewChvLen,
+ kal_uint8* NewChvP);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: ChvUnblock
+
+ DESCRIPTION:
+
+ This routine sends App unblock CHV message to the UIM task, and saves callback
+ function's pointer in order to process the result when the response from
+ the UIM is received.
+
+ PARAMETERS:
+
+ ChvId: CHV1 or CHV2
+ UnblockChvLen: Length of UNBLOCK CHV value
+ UnblockChvP: Pointer to UNBLOCK CHV value
+ NewChvLen: Length of new CHV value
+ NewChvP: Pointer to new CHV value
+ ChvCallbackP: Pointer to callback function
+
+ RETURNED VALUES:
+
+ KAL_TRUE: Uim App Unblock Chv Msg has been sent.
+ KAL_FALSE: error. callback=NULL or other task is doing this operation.
+
+*****************************************************************************/
+kal_bool ValChvUnblock( ValChvIdT ChvId,
+ kal_uint8 UnblockChvLen,
+ kal_uint8* UnblockChvP,
+ kal_uint8 NewChvLen,
+ kal_uint8* NewChvP,
+ void (*ChvCallbackP)(ValChvOpResultT) );
+
+/********************************************************************************
+ FUNCTION NAME: ValUimSPNameInit
+ DESCRIPTION:
+ This routine initiates the procedure of reading
+ service provider name parameters of the UIM.
+ PARAMETERS:
+ UimCallbackP: Pointer to callback function
+ RETURNED VALUES:
+ KAL_TRUE: Uim read sp name Msg has been sent.
+ KAL_FALSE: error. callback=NULL or other task is doing this operation.
+*********************************************************************************/
+kal_bool ValUimSPNameInit(void (*UimCallbackP)(void *));
+/*****************************************************************************
+
+ FUNCTION NAME: ValChvDeliverMsg
+
+ DESCRIPTION:
+
+ Deliver CHV response message. It is used by valtask.
+
+ PARAMETERS:
+
+ MsgId: received message id
+ MsgP: message
+ MsgSize: message size
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+void ValChvDeliverMsg( kal_uint32 MsgId,
+ void* MsgP,
+ kal_uint32 MsgSize );
+
+void ValUimDeliverMsg( kal_uint32 MsgId,
+ void* MsgP,
+ kal_uint32 MsgSize );
+
+#ifdef __CARRIER_RESTRICTION__
+void ValUmlDeliverMsg( kal_uint32 MsgId,
+ void* MsgP );
+#endif
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimNotifyInit
+
+ DESCRIPTION:
+
+ Create ValUimNotifyEventLock.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+void ValUimNotifyInit( void );
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimRegister
+
+ DESCRIPTION:
+
+ Other task invokes this function to register UIM message functions
+ in Val task.
+
+ PARAMETERS:
+ EventFunc: Callback function
+
+ RETURNED VALUES:
+
+ TRegister ID
+ -1: failed.
+
+*****************************************************************************/
+RegIdT ValUimRegister( ValEventFunc EventFunc );
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimUnregister
+
+ DESCRIPTION:
+
+ Other task invokes this function to unregister UIM Notify Register message functions
+
+ PARAMETERS:
+ RegId: Register ID
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+void ValUimUnregister( RegIdT RegId );
+
+/* Val Uim Phb */
+
+void ValUimGetPhbRecParams( void );
+void ValUimGetPhbRecord( kal_uint8 nIndex );
+void ValUimUpdatePhbRecord( kal_uint8 nIndex,
+ kal_uint8* pName,
+#ifdef MTK_CBP
+ kal_uint8 name_len,
+#endif
+ kal_uint8* pPhNum,
+ ValUimNumberTypeT TON,
+ ValUimNumberPlanT NPI,
+ kal_bool isAtHcpbw);
+void ValUimErasePhbRecord( kal_uint8 nIndex , kal_bool isAtCpbw);
+
+/* Val Uim Sms */
+void ValUimGetSmsRecParams( void );
+void ValUimGetSmsRecord( kal_uint8 nIndex );
+void ValUimUpdateSmsRecord( kal_uint8 nIndex,
+ kal_uint8 nStatus,
+ kal_uint8* pMsgData,
+ kal_uint8 MsgLen );
+void ValUimEraseSmsRecord( kal_uint8 nIndex );
+kal_bool ValGetPrefLang(kal_uint8 *pLang, kal_uint8 *pEncoding);
+//don't modify following Function, brew has referred to it
+kal_bool ValGetUIMId(kal_uint32 *pId);
+
+void ValUimDataRequest( void );
+void ValUimIdEuimidRequest( void );
+void GetUimSPName(void * MsgP);
+void InitAfterPV();
+void ChvCGetStatusCB(ValChvStatusT resultStatus);
+void ValGetNewChvStatusCB(ValChvStatusT resultStatus);
+
+
+
+
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimSmsVPInit
+
+ DESCRIPTION:
+
+ This routine initiates the procedure of reading Sms parameters of the UIM.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ None.
+
+*********************************************************************************/
+void ValUimSmsVPInit(void);
+
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimGetSmsVPRecNumProcess
+
+ DESCRIPTION:
+
+ This routine processes VAL_UIM_GET_SMSVP_REC_NUM_MSG response message.
+
+ PARAMETERS:
+
+ RspMsgP: VAL_UIM_GET_SMSVP_REC_NUM_MSG response message structure pointer.
+
+ RETURNED VALUES:
+
+ None.
+
+*********************************************************************************/
+void ValUimGetSmsVPRecNumProcess(UimRspMsgT* RspMsgP);
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimGetMaxSmsVPRecNum
+
+ DESCRIPTION:
+
+ It's invoked to Get the number of SMS PARAMETER record in UIM card.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ Num: the number of SMS PARAMETER record.
+
+*********************************************************************************/
+kal_uint8 ValUimGetMaxSmsVPRecNum(void);
+
+
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimReadSmsVPProcess
+
+ DESCRIPTION:
+
+ This routine processes VAL_UIM_READ_SMSVP_REC_MSG response message.
+
+ PARAMETERS:
+
+ RspMsgP: VAL_UIM_READ_SMSVP_REC_MSG response message structure pointer.
+
+ RETURNED VALUES:
+
+ None.
+
+*********************************************************************************/
+void ValUimReadSmsVPProcess(UimRspMsgT* RspMsgP);
+
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimUpdateSMSVPProcess
+
+ DESCRIPTION:
+
+ This routine processes VAL_UIM_UPDATE_SMSVP_REC_MSG response message.
+
+ PARAMETERS:
+
+ RspMsgP: VAL_UIM_UPDATE_SMSVP_REC_MSG response message structure pointer.
+
+ RETURNED VALUES:
+
+ None.
+
+*********************************************************************************/
+void ValUimUpdateSMSVPProcess(UimRspMsgT* RspMsgP);
+
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimReadSmsVPRec
+
+ DESCRIPTION:
+
+ This routine sends Read Record(6F3D) message to the UIM task.
+
+ PARAMETERS:
+
+ index: Record index, start from 1.
+
+ Result:
+ this Read Record operation is successfully deliveried to UIM driver.
+
+*********************************************************************************/
+void ValUimReadSmsVPRec(kal_uint8 index);
+
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimUpdateSmsVPRec
+
+ DESCRIPTION:
+
+ This routine sends Update Record(6F3D) message to the UIM task.
+
+ PARAMETERS:
+
+ index: Record index, start from 1.
+ vp: Validity period inputed by client
+
+ RETURNED VALUES:
+
+ KAL_TRUE: this operation is successful to delivery to UIM driver.
+ KAL_FALSE: index is invalide parameter.
+
+*********************************************************************************/
+kal_bool ValUimUpdateSmsVPRec(kal_uint8 index,kal_uint8 vp);
+
+//don't modify following Function, brew has referred to it
+/********************************************************************************
+
+ FUNCTION NAME: ValUimGetMdnRec
+
+ DESCRIPTION:
+
+ It's invoked to SMS Validity Period .
+
+ PARAMETERS:
+
+ index: Record index, start from 1.
+ ptvp: point to the address that store the Validity Period.
+
+ RETURNED VALUES:
+
+ KAL_TRUE: this operation is successful.
+ KAL_FALSE: failure.
+
+*********************************************************************************/
+kal_bool ValUimGetSmsVPRec(kal_uint8 index, kal_uint8* ptvp);
+
+#if 0
+/* under construction !*/
+/* under construction !*/
+#endif
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimRawCmd
+
+ DESCRIPTION:
+
+ It's invoked to send UIM raw command to UIM card.
+
+ PARAMETERS:
+
+ len: Raw command APDU length.
+ CmdApdu: pointer to command APDU.
+ RspInfo: Response message info.
+
+ RETURNED VALUES:
+
+ KAL_TRUE: this operation is successful.
+ KAL_FALSE: failure.
+
+*********************************************************************************/
+kal_bool ValUimRawCmd(kal_uint16 Len, kal_uint8 *CmdApdu, ExeRspMsgT* RspInfoP);
+
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimRunCave
+
+ DESCRIPTION:
+
+ It's invoked to send RUN CAVE command to UIM card.
+
+ PARAMETERS:
+
+ rand: rand value.
+ type: RAND or RANDU.
+ digitLen: digits length.
+ digit: digits, should be digit[6]
+ saveRegister: save registers or not.
+ esn: UimId(if UIM_ID is used for auth.), otherwise, If ME is
+ assigned with MEID,Pseudo-ESN value shall be used. if it's ESN ME
+ and esn is used for auth, esn should be used.
+ RspInfo: response info.
+ RETURNED VALUES:
+ None.
+
+*********************************************************************************/
+void ValUimRunCave(kal_uint32 rand, ValRandTypeT type, kal_uint8 digitLen, kal_uint8 *digit,
+ kal_bool saveRegister, kal_uint32 esn, ExeRspMsgT rspInfo);
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimGenKeyVPM
+
+ DESCRIPTION:
+
+ It's invoked to send Generate Key/VPM command to UIM card.
+
+ PARAMETERS:
+
+ cmeaKey: the pointer to cemakey[8] array
+ vpm: the pointer to VPM[65] array.
+ RETURNED VALUES:
+ None.
+
+ Notes: When Generate Key/VPM command is finished, cmeaKey and vpm will be written
+ by UIM task.
+
+*********************************************************************************/
+void ValUimGenKeyVPM(kal_uint8 *cmeaKey, kal_uint8 *vpm);
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimUpdateSSD
+
+ DESCRIPTION:
+
+ It's invoked to tell UIM do Update SSD operation.
+
+ PARAMETERS:
+
+ randssd: randssd.
+ esn: UimId(if UIM_ID is used for auth.), otherwise, If ME is
+ assigned with MEID,Pseudo-ESN value shall be used. if it's ESN ME
+ and esn is used for auth, esn should be used.
+ rspInfo: response info.
+ RETURNED VALUES:
+ None.
+
+*********************************************************************************/
+void ValUimUpdateSSD(kal_uint8 *randssd, kal_uint32 esn, ExeRspMsgT rspInfo);
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimConfirmSSD
+
+ DESCRIPTION:
+
+ It's invoked to send CONFIRM SSD command to UIM card.
+
+ PARAMETERS:
+
+ authBS: AuthBS.
+ esn: UimId(if UIM_ID is used for auth.), otherwise, If ME is
+ assigned with MEID,Pseudo-ESN value shall be used. if it's ESN ME
+ and esn is used for auth, esn should be used.
+ rspInfo: response info.
+ RETURNED VALUES:
+ None.
+
+*********************************************************************************/
+void ValUimConfirmSSD(kal_uint32 authBS, ExeRspMsgT rspInfo);
+
+/********************************************************************************
+
+ FUNCTION NAME: ValUimMD5Auth
+
+ DESCRIPTION:
+
+ It's invoked to request UIM MD5 auth.
+
+ PARAMETERS:
+
+ chapId: chapId.
+ challengeLen: challenge length, uim supports challenge length up to 16.
+ challenge: challenge array.
+ rspInfo: response info.
+ RETURNED VALUES:
+ None.
+
+*********************************************************************************/
+void ValUimMD5Auth(kal_uint8 chapId, kal_uint8 challengeLen, kal_uint8 *challenge, ExeRspMsgT rspInfo);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimGetSDNRecParams
+
+ DESCRIPTION:
+ To send a message to UIM to read SDN parameters. User can get SDN parameters
+ in callback function.
+
+ PARAMETERS:
+
+ SDNCallbackP: Pointer to callback function
+
+ RETURNED VALUES:
+
+ KAL_TRUE: message to UIM has been sent.
+ KAL_FALSE: error. callback=NULL or other task is doing this operation.
+
+*****************************************************************************/
+kal_bool ValUimGetSDNRecParams(void (*SDNCallbackP)(ValUimSDNParamsT*));
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimGetSDNRecord
+
+ DESCRIPTION:
+ To send a message to UIM to read SDN record. User can get SDN record
+ in callback function.
+
+ PARAMETERS:
+ <nIndex> the phone record index
+ SDNCallbackP: Pointer to callback function
+
+ RETURNED VALUES:
+
+ KAL_TRUE: message to UIM has been sent.
+ KAL_FALSE: error. callback=NULL or other task is doing this operation.
+
+*****************************************************************************/
+kal_bool ValUimGetSDNRecord(kal_uint8 nIndex, void (*SDNCallbackP)(ValUimSDNRecT*));
+ValUimProviderName* ValGetProviderName(void);
+void ValUimReadyInit(UimNotifyMsgT * MsgP);
+void ValUimStoreEsn(kal_uint64 Esn, kal_uint8 Len, kal_bool MEAndUIMMEIDSupported);
+void ValUimGetEsn(void(*GetEsnCallbackP)(kal_uint64));
+kal_bool ValGetMEIDUIMSupported(void);
+kal_bool ValGetSFUIMIDSupported(void);
+kal_uint8 ValUimGetCst(UimECstIndexT index);
+
+/* Used for andriod system */
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimGetUtkCmdFlag
+
+ DESCRIPTION:
+
+ Get UTK CMD flag.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ kal_bool: KAL_TRUE: USE AT+UTKPD to init UTK.
+
+*****************************************************************************/
+kal_bool ValUimGetUtkCmdFlag( void );
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimProfileDownload
+
+ DESCRIPTION:
+
+ Call this function to send TERMINAL PROFILE Command to UIM task.
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+void ValUimProfileDownload( void );
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimTerminalRespnse
+
+ DESCRIPTION:
+
+ Call this function to send TERMINAL RESPONSE Command to UIM task.
+
+ PARAMETERS:
+
+ len. data buffer length
+ data: data buffer
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+void ValUimTerminalRespnse(kal_uint8 len, kal_uint8 *data);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimEnvelope
+
+ DESCRIPTION:
+
+ Call this function to send ENVELOPE Command to UIM task.
+
+ PARAMETERS:
+
+ len. data buffer length
+ data: data buffer
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+ void ValUimEnvelope(kal_uint8 len, kal_uint8 *data,kal_bool is_ap_envelope);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimConfirmCall
+
+ DESCRIPTION:
+
+ Call this function to confirm if Set Up Call command needs to be executed.
+
+ PARAMETERS:
+
+ Accept:
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+void ValUimConfirmCall( kal_bool Accept);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValProProactCmdRsp
+
+ DESCRIPTION:
+
+ Call this to give respnose for proactive cmd.
+
+ PARAMETERS:
+
+ Result. General result
+ AddInfo: if result is 0x20, 0x21, need fill in this field.
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+void ValProProactCmdRsp( ValUimCmdGenRstT Result, ValUimCmdAddInfoT AddInfo);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimSmsDownload
+
+ DESCRIPTION:
+
+ To execute UTK SMS PP Download.
+
+ PARAMETERS:
+
+ ApduP : Apdu buffer
+ BufferP : Apdu length
+ TxtMessage: Sms text message buffer
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+void ValUimSmsDownload( kal_uint8* ApduP, kal_uint8 Len, ValSmsTxtRecordT* TxtMessage);
+
+#ifdef MTK_CBP
+kal_bool ValUimDelMdnRecBySimIndex(kal_uint8 Index, kal_uint8 simIndex);
+kal_bool ValUimUpdateMdnRecBySimIndex(kal_uint8 Index, kal_uint8 Len, kal_uint8* MdnP, kal_uint8 simIndex);
+kal_bool ValUimGetMdnReq(kal_uint8 simIndex);
+kal_bool ValUimGetSidNidReq(kal_uint8 simIndex);
+kal_bool ValUimGetImsiReq(kal_uint8 simIndex, ExeRspMsgT* RspInfo);
+kal_bool ValUimGetChvStatusBySimIndex(kal_uint8 chan, kal_uint8 simIndex);
+kal_bool ValUimVerifyChvByIndex(kal_uint8 chan,
+ kal_uint8 simIndex,
+ kal_uint8 chvId,
+ kal_uint8 chvLen,
+ kal_uint8 chv1Val[8]);
+kal_bool ValUimChangeChvByIndex(kal_uint8 chan,
+ kal_uint8 simIndex,
+ ValChvIdT ChvId,
+ kal_uint8 OldChvLen,
+ kal_uint8* OldChvP,
+ kal_uint8 NewChvLen,
+ kal_uint8* NewChvP);
+
+kal_bool ValUimGetFullPath(kal_uint8* fullPath, kal_uint8* asciistr, kal_uint16 fileId, kal_uint16* pathLen);
+kal_bool ValUimCrsmCrlaCmd(ValUimCmdT Cmd, kal_uint16 FileId, kal_uint8 P1, kal_uint8 P2, kal_uint8 P3,
+ kal_uint8 *DataP, ExeRspMsgT* RspInfo, kal_uint8 sessionId, kal_bool isFullPath, kal_uint8* fullPath, kal_uint16 pathLen, kal_uint8 simIndex, kal_uint8 chanId);
+kal_bool ValUimRawCmdBySimIndex(kal_uint16 Len, kal_uint8 *CmdApdu, ExeRspMsgT* RspInfoP, kal_uint8 simIndex, kal_uint8 chanId);
+kal_bool ValUimExtendedRawCmdBySimIndex(ExeRspMsgT* RspInfoP, kal_uint8 simIndex, kal_uint8 chanId);
+kal_bool ValAtUimGetIccid(kal_uint8 simIndex);
+kal_bool ValAtUimGetAppInfo(kal_uint8 simIndex, kal_uint8 appId);
+kal_bool ValUimGetUimIdReq(kal_uint8 simIndex);
+kal_bool ValAtUimGetCstInfo(kal_uint8 simIndex, kal_uint8 cardType, UimECstIndexT cstIndex);
+#endif
+
+#ifdef MTK_DEV_C2K_IRAT
+void ValProTimerManagerCmdRsp( ValUimCmdGenRstT Result, ValUimCmdAddInfoT AddInfo,kal_uint8 DataLen, kal_uint8 *Adddata);
+void valUimProvideLocationInfoProcess(void);
+void ValUimUtkTimerExpiryMsgPro(kal_uint32 Id);
+void ValUimUtkRefreshRspMsg(UimUtkRefreshRspMsgT *MsgData);
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimFileChangeCompleted
+
+ DESCRIPTION:
+
+ internal help function: send MSG_ID_C2K_UIM_SAT_FILE_CHANGE_RES to UIM task.
+
+ PARAMETERS: ChangeSuccess
+
+ RETURNED VALUES: None.
+
+*****************************************************************************/
+extern void ValUimFileChangeCompleted(ValUimUtkFileMaskTypeT FileMask);
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimUtkRefreshRequest
+
+ DESCRIPTION:
+
+ internal help function: .
+
+ PARAMETERS:
+
+ RETURNED VALUES: None.
+
+*****************************************************************************/
+
+extern void ValUimUtkRefreshRequest(void);
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimUtkRefreshProcess
+
+ DESCRIPTION:
+
+ internal help function: handle UTK Refresh command
+
+ PARAMETERS: ChangeSuccess
+
+ RETURNED VALUES: None.
+
+*****************************************************************************/
+extern kal_bool ValUimUtkRefreshProcess(kal_uint8 *BufDataP,kal_uint8 Len, kal_uint8 *ApIndicator);
+extern kal_bool IsPowerCycleTrigByRefresh(void);
+extern void SetPowerCycleTrigByRefreshFlag(kal_bool flag);
+
+#ifdef FEATURE_UTK
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimEhrpdAuthFailure
+
+ DESCRIPTION:
+
+ PARAMETERS:
+
+ RETURNED VALUES: None.
+
+*****************************************************************************/
+extern void ValUimEhrpdAuthFailure(void);
+#endif
+#endif
+#ifdef MTK_CBP
+extern void ValUimSetFdnStatus(kal_bool ActiveStatus,kal_uint8 ChvLen,kal_uint8 *ChvData);
+extern void ValUimUpdateFdnRecord( kal_uint8 nIndex,
+ kal_uint8* pName,
+ kal_uint8 name_len,
+ kal_uint8* pPhNum,
+ ValUimNumberTypeT TON,
+ ValUimNumberPlanT NPI,
+ kal_bool isAtCpbw);
+extern void ValUimEraseFdnRecord( kal_uint8 nIndex,kal_bool isAtCpbw);
+extern void ValUimGetFdnRecord(kal_uint8 nIndex);
+#endif
+
+#ifdef __CARRIER_RESTRICTION__
+void ValUimNotifyRegisterProcess( void* RspMsgP );
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+/*****************************************************************************
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+*****************************************************************************/
+
+/**Log information: \main\CBP7FeaturePhone\CBP7FeaturePhone_nicholaszhao_href17384\1 2011-07-08 06:09:12 GMT nicholaszhao
+** HREF#17384**/
+/**Log information: \main\CBP7FeaturePhone\4 2011-07-12 09:42:17 GMT marszhang
+** HREF#17384**/
+/**Log information: \main\2 2012-04-06 05:34:48 GMT pzhang
+** modify contact uim interface**/
+
diff --git a/mcu/interface/protocol/l4_c2k/valumlapi.h b/mcu/interface/protocol/l4_c2k/valumlapi.h
new file mode 100644
index 0000000..107282a
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valumlapi.h
@@ -0,0 +1,195 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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:
+ * ---------
+ * valumlapi.h
+ *
+ * Project:
+ * --------
+ *
+ *
+ * Description:
+ * ------------
+ *
+ *
+ * Author:
+ * -------
+ *
+ *
+ *==============================================================================*/
+
+#ifndef _VALUMLAPI_H
+#define _VALUMLAPI_H
+
+#ifdef __CARRIER_RESTRICTION__
+/*carrier match type*/
+typedef enum {
+ VAL_UML_CAT_NET, /* restrict by mcc/mnc */
+ VAL_UML_CAT_SPN, /* mcc/mnc and SPN */
+ VAL_UML_CAT_IMSI_PREFIX, /* mcc/mnc and 67 digits of IMSI */
+ VAL_UML_CAT_GID1, /* mcc/mnc and GID1 */
+ VAL_UML_CAT_GID2, /* mcc/mnc and GID2 */
+ VAL_UML_CAT_SIZE
+} ValUmlCatT;
+
+typedef enum{
+ VAL_UML_NONE, /* Default state:not received pin, or no need to check uml */
+ VAL_UML_PASSED, /* checked and passed */
+ VAL_UML_BUSY, /* request UIM/UML data and checking */
+ VAL_UML_RESTRICTED, /* restricted in black or not in white */
+ VAL_UML_REBOOT /* locked->unlocked or unlocked->locked need AP to reset card */
+} ValUmlStatusT;
+
+typedef enum{
+ VAL_UML_MD1_STATUS_NOT_RECEIVED, /* not received */
+ VAL_UML_MD1_STATUS_READY, /* checked and passed */
+ VAL_UML_MD1_STATUS_RESTRICTED, /* restricted in black or not in white */
+ VAL_UML_MD1_STATUS_REBOOT /* locked->unlocked or unlocked->locked need AP to reset card */
+} ValUmlMd1StatusT;
+
+typedef enum{
+ VAL_UML_STATUS_SYNC_READY, /* card ready */
+ VAL_UML_STATUS_SYNC_CARD_RESTRICTED, /* card locked */
+ VAL_UML_STATUS_SYNC_CARD_REBOOT /* status changed */
+} ValUmlStatusSyncT;
+
+/* the basic unit of categories */
+#define VAL_UML_SIZE_OF_CAT_NET 3 /* MCC/MNC 5 digits */
+#define VAL_UML_SIZE_OF_CAT_SPN 23 /* MCC/MNC + SPN(20bytes) from MD1 different from MD3 32 bytes */
+#define VAL_UML_SIZE_OF_CAT_IMSI_PREFIX 4 /* MCC/MNC + IMSI digits 6 and 7 */
+#define VAL_UML_SIZE_OF_CAT_GID1 4 /* MCC/MNC + GID1 */
+#define VAL_UML_SIZE_OF_CAT_GID2 4 /* MCC/MNC + GID2 */
+
+/* Define the maximum suppot elements of each category */
+#define VAL_UML_MAX_SUPPORT_CAT_NUM 5
+
+/* Define the size of each category */
+#define VAL_UML_CFG_CAT_NET_SIZE (VAL_UML_MAX_SUPPORT_CAT_NUM * VAL_UML_SIZE_OF_CAT_NET)
+#define VAL_UML_CFG_CAT_SPN_SIZE (VAL_UML_MAX_SUPPORT_CAT_NUM * VAL_UML_SIZE_OF_CAT_SPN)
+#define VAL_UML_CFG_CAT_INSI_PREFIX_SIZE (VAL_UML_MAX_SUPPORT_CAT_NUM * VAL_UML_SIZE_OF_CAT_IMSI_PREFIX)
+#define VAL_UML_CFG_CAT_GID1_SIZE (VAL_UML_MAX_SUPPORT_CAT_NUM * VAL_UML_SIZE_OF_CAT_GID1)
+#define VAL_UML_CFG_CAT_GID2_SIZE (VAL_UML_MAX_SUPPORT_CAT_NUM * VAL_UML_SIZE_OF_CAT_GID2)
+
+/* Define the support category size */
+#define VAL_UML_SUPPORT_CAT_SIZE VAL_UML_CAT_SIZE
+
+#define UIM_SPN_OFFSET 3 /* get spn from EFspn */
+
+#define VAL_UML_PRIORITY_CHECK_WHITE_LIST 1 /* allowed_carriers_prioritized, 0 - Allow All except Black, 1 - Allow White except Black */
+#define VAL_UML_MUTIL_SIM_POLICY 1 /* allowed_carriers_prioritized, 0 - Allow All except Black, 1 - Allow White except Black */
+
+#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
+
+
+typedef smu_cval_carrier_match_category_meta_struct ValUmlCategoryMetaT;
+
+typedef smu_cval_carrier_restriction_list_struct ValUmlCategoryListT;
+
+
+typedef struct
+{
+ kal_bool is_stored; /* has received from MD1 */
+ smu_cval_carrier_restriction_list_struct black_list;
+ smu_cval_carrier_restriction_list_struct white_list;
+ kal_uint8 allow_all; /* 0 - Not allow all, 1 - Allow all sim*/
+ kal_uint8 carrier_rest_state; /* 0 - Enabled 1 - Disabled */
+ kal_uint8 multi_sim_policy;
+ kal_uint8 allowed_carriers_prioritized; /* 0 - Allow All except Black, 1 - Allow White except Black */
+}ValUmlContextT; /* 393 bytes */
+
+/* data of UML in UIM */
+typedef PACKED struct
+{
+ kal_bool IMSI_M_Valid; /* IMSI_M */
+ IMSIType IMSI_Mp;
+ kal_bool IMSI_T_Valid; /* IMSI_T */
+ IMSIType IMSI_Tp;
+ kal_bool spn_valid;
+ kal_uint8 spn[UIM_EF_SPN_LENGTH];
+ kal_uint8 len_of_gid1;
+ kal_uint8 gid1[MAX_NUM_OF_GID];
+ kal_uint8 len_of_gid2;
+ kal_uint8 gid2[MAX_NUM_OF_GID];
+}UimUmlDataT;
+
+typedef struct
+{
+ kal_bool notifyMsgReceived; /* has read from uim */
+ kal_bool isCdmaOnlyCard;
+ kal_uint8 slotId;
+ UimUmlDataT UimUmlData; /* uim data record for uml */
+}ValUimUmlDataT; /* 393 bytes */
+
+typedef struct
+{
+ kal_bool checkByMd3; /* UIM card need check by MD3 */
+ kal_bool sentCrrstStatusToMD1; /* has sent the status to MD1 */
+ ValUmlStatusT ValUmlCurStatus; /* current status */
+ ValUmlStatusT ValUmlMd3Status; /* the resule checked by MD3 */
+ ValUmlMd1StatusT ValRecUmlMd1Status[2]; /* status received from MD1, [0] : slot1 [1] : slot2 */
+}ValUmlResultsT;
+
+void ValUmlInit(void);
+kal_bool ValUmlCheck(void);
+void ValUmlGetUimData(UimNotifyMsgT *DataMsgP);
+void ValUmlDeliverMsg( kal_uint32 MsgId,
+ void* MsgP);
+kal_bool ValUmlNeedCheckCarrier(kal_uint8 slot_id);
+void ValUmlSendCarrierStatus(kal_uint8 slot_id);
+void ValUmlSaveNotifyMsg(UimNotifyMsgT *DataMsgP);
+ValUmlStatusT ValUmlCalFinStatus(kal_uint8 slotId);
+void ValUmlGetFinStatus(CardStatusT *CardStatus);
+kal_bool ValUmlCheckNull(void);
+void ValUmlStatusResetBySlot(kal_uint8 slot_id);
+#endif
+#endif
+
diff --git a/mcu/interface/protocol/l4_c2k/valutils.h b/mcu/interface/protocol/l4_c2k/valutils.h
new file mode 100644
index 0000000..24aefcc
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valutils.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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/**************************************************************************************************
+* %version: 2 % %instance: HZPT_2 % %date_created: Fri Mar 23 16:20:45 2007 % %created_by: jingzhang % %derived_by: jingzhang %
+**************************************************************************************************/
+
+#ifndef VALUTITLS_H
+#define VALUTITLS_H
+#include "sysdefs.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef MTK_CBP
+typedef enum
+{
+ VAL_VSER_STATUS_TRACE = 30000000,
+ VAL_SAVE_UNSLCT_RESULT_EXP_TRACE_1 = 70000000,
+ VAL_SAVE_UNSLCT_RESULT_EXP_TRACE_2,
+ VAL_SAVE_UNSLCT_RESULT_EXP_TRACE_3,
+ VAL_SEND_UNSLCT_RESULT_EXP_TRACE_1 = 70000005,
+ VAL_ENH_AT_SEND_UNSLCT_RESULT_EXP_TRACE_1 = 70000010,
+ VAL_ENH_AT_SEND_UNSLCT_RESULT_EXP_TRACE_2,
+ VAL_SUSPEND_TRACE_1 = 70000015,
+ VAL_SUSPEND_TRACE_2,
+ VAL_GET_SYS_TIME_TRACE_1 = 70000020,
+ VAL_GET_SYS_TIME_TRACE_2
+} ValGenericDec1TraceIDE;
+#endif
+
+/*****************************************************************************
+
+ FUNCTION NAME: PhbChar2BCD - Revised by zhengyi 2004-9-9
+ DESCRIPTION:
+ Convert digital char string to BCD code.: example:convert '135' to 0x31 0xF5
+ PARAMETERS:
+ pBcd :where BCD code storaged.
+ pCharArray: char string with '\0' end.
+ RETURNED VALUES:
+
+*****************************************************************************/
+
+void PhbChar2BCD( kal_uint8* pBcd,
+ kal_uint8* pCharArray );
+
+/*****************************************************************************
+ FUNCTION NAME: PhbBCD2Char
+ DESCRIPTION:
+ Convert BCD code to digital char string. example:convert 0x31 0xF5 to '135'
+ the max char string length is signed 10.
+ PARAMETERS:
+ pBcd : pointer to BCD code array, with 0xf*,or 0xff end.
+ pCharArray: char string
+ RETURNED VALUES:
+
+*****************************************************************************/
+#ifdef MTK_CBP
+void PhbBCD2Char( kal_uint8* pCharArray,kal_uint8 MaxCharLen, kal_uint8* pBcd, kal_uint8 MaxBcdLen );
+#else
+void PhbBCD2Char( kal_uint8* pCharArray,
+ kal_uint8* pBcd );
+#endif
+kal_uint8 getuint8(kal_uint8* data, kal_uint16 startBit, kal_uint8 numBits);
+kal_uint16 getuint16(kal_uint8* data, kal_uint16 startBit, kal_uint8 numBits);
+void putuint8(kal_uint8* data, kal_uint16 startBit, kal_uint8 numBits, kal_uint8 value);
+void putuint16(kal_uint8* data, kal_uint16 startBit, kal_uint8 numBits, kal_uint16 value);
+kal_uint16 crc16bit(kal_uint8* msg, kal_uint16 len);
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+/**Log information: \main\vtui2_5x\2 2008-09-29 07:41:09 GMT dwang
+** HREF#2278**/
+/**Log information: \main\vtui2_5x\3 2008-11-06 03:03:10 GMT pzhang
+** HREF#2895**/
+
diff --git a/mcu/interface/protocol/l4_c2k/valutkapi.h b/mcu/interface/protocol/l4_c2k/valutkapi.h
new file mode 100644
index 0000000..b047693
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/valutkapi.h
@@ -0,0 +1,1240 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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).
+*
+*****************************************************************************/
+/*************************************************************
+*
+* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
+*
+* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
+*
+* Copyright (c) 2005-2010 VIA Telecom, Inc. All rights reserved.
+*
+*************************************************************/
+#ifndef VALUTKAPI_H
+#define VALUTKAPI_H
+/*****************************************************************************
+*
+* FILE NAME : valutkapi.h
+*
+* DESCRIPTION :
+*
+* This file contains all constants and typedefs needed to interface with the
+* VAL SMS unit and the UI task.
+*
+* HISTORY:
+*
+* See Log at end of file
+*
+*****************************************************************************/
+
+/*----------------------------------------------------------------------------
+ Include Files
+----------------------------------------------------------------------------*/
+#ifdef FEATURE_UTK
+#include "sysdefs.h"
+#include "valapi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*----------------------------------------------------------------------------
+ Local Defines and Macros
+----------------------------------------------------------------------------*/
+#define UTK_ITEM_MAX_COUNT 20
+#define UTK_SMS_ADDRESS_LEN 30
+#define UTK_SMS_SUBADDRESS_LEN 30
+
+
+/*----------------------------------------------------------------------------
+ Local Typedefs
+----------------------------------------------------------------------------*/
+
+/* UTK genernal result type */
+typedef enum
+{
+ VAL_UTK_RST_CMD_OK = 0x00, /*Command performed successfully*/
+ VAL_UTK_RST_CMD_PART_OK, /*Command performed with partial comprehension*/
+ VAL_UTK_RST_CMD_MISS_OK, /*Command performed, with missing information*/
+ VAL_UTK_RST_EF_REFRESH, /*REFRESH performed with additional EFs read*/
+ VAL_UTK_RST_CMD_OK_NO_ICON, /*Command performed successfully,
+ but requested icon could not be displayed*/
+ VAL_UTK_RST_CMD_OK_LTD_SERV = 0x06, /*Command performed successfully, limited service*/
+ VAL_UTK_RST_CMD_OK_NOTIFY, /*Command performed with notification*/
+ VAL_UTK_RST_REF_NO_NAA, /*REFRESH performed but indicated NAA was not active*/
+
+ VAL_UTK_RST_USER_TERMINATE = 0x10, /*Proactive UICC session terminated by the user*/
+ VAL_UTK_RST_USER_BACK_MOVE, /*Backward move in the proactive UICC session
+ requested by the user*/
+ VAL_UTK_RST_USER_NO_RSP, /*No response from user*/
+ VAL_UTK_RST_USER_REQ_HELP, /*Help information required by the user*/
+
+ VAL_UTK_RST_ME_UNABLE = 0x20, /*terminal currently unable to process command*/
+ VAL_UTK_RST_NET_UNABLE, /*Network currently unable to process command*/
+ VAL_UTK_RST_USER_NOT_ACCEPT, /*User did not accept the proactive command*/
+ VAL_UTK_RST_USER_CLEAR_CALL, /*User cleared down call before connection or network release*/
+ VAL_UTK_RST_ACTION_CONT, /*Action in contradiction with the current timer state*/
+ VAL_UTK_RST_NAA_CC_TEMP_PROBLEM, /* Interaction with call control by NAA, temporary problem; */
+ VAL_UTK_RST_BROW_ERR, /* Launch browser generic error code */
+
+ VAL_UTK_RST_CMD_BYD_CAP = 0x30, /*Command beyond terminal's capabilities*/
+ VAL_UTK_RST_CMD_TYPE_NOT_UND, /*Command type not understood by terminal*/
+ VAL_UTK_RST_CMD_DATA_NOT_UND, /*Command data not understood by terminal*/
+ VAL_UTK_RST_CMD_NUM_UNK, /*Command number not known by terminal*/
+
+ VAL_UTK_RST_REQ_VAL_MISS = 0x36, /*Error, required values are missing*/
+
+ VAL_UTK_RST_NULTICARD_CMD_ERR = 0x38, /* MultipleCard commands error */
+ VAL_UTK_RST_NAA_CC_PERM_PROBLEM, /* Interaction with call control by NAA by NAA, permanent problem */
+ VAL_UTK_RST_BEARER_PROTOCOL_ERR, /* Bearer Independent Protocol error */
+ VAL_UTK_RST_ACCESS_TECH_UNABLE /* Bearer Independent Protocol error */
+} ValUtkGenResultT;
+
+/* Addition information on result when UtkGenResult = VAL_UTK_RST_ME_UNABLE */
+typedef enum
+{
+ VAL_UTK_ADD_INF_NO_CAUSE = 0x00, /*No specific cause can be given*/
+ VAL_UTK_ADD_INF_SCR_BUSY, /*Screen is busy*/
+ VAL_UTK_ADD_INF_BUSY_CALL, /*terminal currently busy on call*/
+ /*0x03 reserved for GSM/3G;*/
+ VAL_UTK_ADD_INF_NO_SERVICE = 0x04, /*No service*/
+ VAL_UTK_ADD_INF_ACC_CLASS_BAR, /*Access control class bar*/
+ VAL_UTK_ADD_INF_RADIO_RES_NOT_GRANT, /*Radio resource not granted*/
+ VAL_UTK_ADD_INF_NOT_SPEECH_CALL, /*Not in speech call*/
+ /*0x08 reserved for GSM/3G;*/
+ VAL_UTK_ADD_INF_BUSY_SEND_DTMF = 0x09, /*ME currently busy on SEND DTMF command*/
+ VAL_UTK_ADD_INF_NO_NAA /*No NAA active*/
+} ValUtkAddInfoT;
+
+/* UTK result type */
+typedef struct
+{
+ ValUtkGenResultT GenResult;/* General result */
+ kal_bool AddInfoPre; /* AddInfo present */
+ ValUtkAddInfoT AddInfo; /* Additional information on result */
+} ValUtkResultT;
+
+/*command detail (8.6) */
+typedef struct
+{
+ kal_uint8 CmdNum; /* Command number */
+ kal_uint8 CmdType; /* Command type */
+ kal_uint8 CmdQualifier; /* Command qualifier */
+ kal_uint16 CmdId;
+} ValUtkCmdDetailT;
+
+typedef enum
+{
+ VAL_UTK_CODE_GSM_7BIT_PACKED = 0, /* SMS default 7-bit coded alphabet, packed into 8-bit octets,;*/
+ VAL_UTK_CODE_GSM_7BIT_CODED_UNPACKED = 4, /* SMS default 7-bit coded alphabet with bit 8 set to 0.;*/
+ VAL_UTK_CODE_UNICODE_80 = 8, /* 16 bit unicode, formatting character is 0x80*/
+ VAL_UTK_CODE_UNICODE_81, /* 16 bit unicode, formatting character is 0x81*/
+ VAL_UTK_CODE_UNICODE_82 /* 16 bit unicode, formatting character is 0x82*/
+} ValUtkCodeSchemeT;
+
+/* text string(8.15), Alpha identifier (8.2) */
+typedef struct
+{
+ ValUtkCodeSchemeT CodeScheme; /*Data coding scheme */
+ kal_uint8 Len; /* length of Text, A null text string shall be coded with Len = 0 */
+ kal_uint8* TextP;
+} ValUtkTextT;
+
+typedef enum
+{
+ VAL_UTK_TECH_GSM,
+ VAL_UTK_TECH_TE533, /*TIA/EIA-533*/
+ VAL_UTK_TECH_TE136, /*TIA/EIA-136*/
+ VAL_UTK_TECH_UTRAN,
+ VAL_UTK_TECH_TETRA,
+ VAL_UTK_TECH_TE95 = 5, /*TIA/EIA-95*/
+ VAL_UTK_TECH_IS2000 = 6,
+ VAL_UTK_TECH_IS2000_HRPD = 7, /*TIA/EIA/IS-856*/
+ VAL_UTK_EUTRAN = 8,
+#ifdef MTK_DEV_C2K_IRAT
+ VAL_UTK_EHRPD,
+#endif
+ VAL_UTK_TECH_NOUSE
+}ValUtkTechT;
+
+/*CMD_QUALIFIER for UTK Provide Location information */
+typedef enum
+{
+ VAL_UTK_LOC_INFO_CMD_QUAL_LOC,
+ VAL_UTK_LOC_INFO_CMD_QUAL_DATE_TIME = 3,
+ VAL_UTK_LOC_INFO_CMD_QUAL_LAN = 4,
+ VAL_UTK_LOC_INFO_CMD_QUAL_ACC_TECH = 6,
+ VAL_UTK_LOC_INFO_CMD_QUAL_ESN = 7,
+ VAL_UTK_LOC_INFO_CMD_QUAL_MEID = 0xB
+}ValUtkLocInfoCmdQualT;
+
+typedef union
+{
+ /*Location info, 17Bytes include tag and len */
+ struct
+ {
+ kal_uint16 MCC; /**/
+ kal_uint8 IMSI_11_12; /* */
+ kal_uint16 SID;
+ kal_uint16 NID;
+ kal_uint16 BASE_ID;
+ kal_int32 BASE_LAT;
+ kal_int32 BASE_LONG;
+ } UtkLocation; /*CMD_QUALIFIER = 0, see ValUtkLocInfoCmdQualT */
+ /*Date-time and time zone, Year='01'---2001*/
+ struct
+ {
+ kal_uint8 Year;
+ kal_uint8 Month;
+ kal_uint8 Day;
+ kal_uint8 Hour;
+ kal_uint8 Minute;
+ kal_uint8 Second;
+ kal_int8 TimeZone;
+ } DateTime;
+ /*Language,4 bytes include tag and len */
+ /*Each language code is a pair of alpha-numeric characters, defined in ISO 639 [12].
+ Each alpha-numeric character shall be coded on one byte using the SMS default 7-bit
+ coded alphabet as defined in TS 123 038 [3] with bit 8 set to 0.*/
+ kal_uint8 Language[2]; /*English :"en", Chinese:"zh" */
+ /*Access Technology,3 byets include tag and len */
+ ValUtkTechT Technology; /*Access technology */
+ kal_uint32 ESN;
+ kal_uint8 MEID[7];
+} ValUtkLocalInfoT;
+/*for CALL control envelop command*/
+typedef union
+{
+ kal_uint8 Len;
+ kal_uint8 AccessInfo[15];
+} ValUtkLocalInfoT1;
+/* Item (8.9) */
+typedef struct
+{
+ kal_uint8 ItemId; /* Identifier of item */
+ ValUtkCodeSchemeT CodeScheme;
+ kal_uint8 Len;
+ kal_uint8* ItemTextP; /* Item */
+} ValUtkItemT;
+
+/* Items Next Action Indicator (8.24) */
+typedef struct
+{
+ kal_uint8 Len;
+ kal_uint8* NaiListP; /* Items Next Action Indicator list */
+} ValUtkNaiT;
+
+/* Icon Identifier(8.31)
+(at present, icon is not supported, its parameters are not full ) */
+typedef enum
+{
+ UTK_ICON_SELF_EXPLANATORY = 0, /*if displayed, it replaces the item text*/
+ UTK_ICON_NOT_SELF_EXPLANATORY /*if displayed, it shall be displayed together with the item text.*/
+} ValUtkIconQualiferT;
+
+typedef struct
+{
+ ValUtkIconQualiferT IconQualifier; /* Icon qualifier */
+ kal_uint8 IconId; /* Icon identifier */
+} ValUtkIconT;
+
+/* Item Icon List (8.32) */
+typedef struct
+{
+ ValUtkIconQualiferT IconQualifier;
+ kal_uint8 Len;
+ kal_uint8* IconListIdP;
+} ValUtkItemIconListT;
+
+/* Numbering plan identification (NPI) */
+typedef enum
+{
+ UTK_NPI_UNKNOWN = 0,
+ UTK_NPI_ISDN_OR_TELEP_NUM_PLAN =1, /* ISDN/telephony numbering plan (ITU-T Recommendations E.164 [22] and E.163 [21]) */
+ UTK_NPI_DATA_NUM_PLAN = 3, /*ISDN/telephony numbering plan (ITU-T Recommendations E.164 [22] and E.163 [21])*/
+ UTK_NPI_TELEX_NUM_PLAN = 4,/*Telex numbering plan (ITU-T Recommendation F.69 [24]);*/
+ UTK_NPI_PRIVATE_NUM_PLAN = 9,/*Private numbering plan;*/
+ UTK_NPI_RESERVE_EXTENSION = 15 /*Reserved for extension;*/
+ /* All other values are reserved. */
+} ValUtkNpiT;
+
+/* Type of number (TON) */
+typedef enum
+{
+ UTK_TON_UNKNOWN = 0,
+ UTK_TON_INTERNATIONAL_NUM = 1, /* International Number;*/
+ UTK_TON_NATIONAL_NUM = 2, /* national Number; */
+ UTK_TON_NETWORK_NUM = 3 /* Network Specific Number; */
+ /* All other values are reserved. */
+} ValUtkTonT;
+
+/* Address (8.1) */
+typedef struct
+{
+ ValUtkNpiT Npi;
+ ValUtkTonT Ton;
+ kal_uint8 Len;
+ kal_uint8* DialNumberP;
+} ValUtkAddressT;
+
+/*UTK Set Up Menu Command(6.6.7) */
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ ValUtkTextT Alpha;
+ kal_uint8 ItemNum; /* =0, indicates delete existed menu */
+ ValUtkItemT Item[UTK_ITEM_MAX_COUNT];
+ kal_bool NaiPre; /* if Items Next Action Indicator is present, KAL_TRUE: present*/
+ ValUtkNaiT Nai;
+ kal_bool IconPre;
+ ValUtkIconT Icon;
+ kal_bool ItemIconListPre;
+ ValUtkItemIconListT ItemIconList;
+} ValUtkSetUpMenuCmdT;
+
+/*utk select item Command(6.6.8) */
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ kal_bool AlphaPre;
+ ValUtkTextT Alpha;
+ kal_uint8 ItemNum;
+ ValUtkItemT Item[UTK_ITEM_MAX_COUNT];
+ kal_bool NaiPre;
+ ValUtkNaiT Nai;
+ kal_bool DefItemIdPre;
+ kal_uint8 DefItemId; /*default selected item */
+ kal_bool IconPre;
+ ValUtkIconT Icon;
+ kal_bool ItemIconListPre;
+ ValUtkItemIconListT ItemIconList;
+} ValUtkSelectItemCmdT;
+
+/* Capability configuration parameters(8.4) */
+typedef struct
+{
+ kal_uint8 Len;
+ kal_uint8* CapCfgParamP;
+} ValUtkCapCfgParamT;
+
+/* Subaddress */
+typedef struct
+{
+ kal_uint8 Len;
+ kal_uint8* SubaddressP;
+} ValUtkSubaddressT;
+
+typedef enum
+{
+ UTK_TIME_UNIT_MINUTES = 0, /* minute; */
+ UTK_TIME_UNIT_SECONDS = 1, /* second; */
+ UTK_TIME_UNIT_TENTH_OF_SECONDS = 2 /* tenths of seconds*/
+} ValUtkTimeUnitT;
+
+/* Druation (8.8) */
+typedef struct
+{
+ ValUtkTimeUnitT TimeUnit;
+ kal_uint8 TimeInterval;
+} ValUtkDurationT;
+
+/*Event list*/
+typedef struct
+{
+ kal_uint8 len;
+ kal_uint8* EventList;
+} ValUtkEventListT;
+
+
+/* UTK Set Up call Command */
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ kal_bool ConfirmAlphaPre;
+ ValUtkTextT ConfirmAlpha;/*Alpha identifier (user confirmation phase)*/
+ ValUtkAddressT Address;
+ kal_bool CapCfgParamPre;
+ ValUtkCapCfgParamT CapCfgParam;/*Capability configuration parameters*/
+ kal_bool SubaddressPre;
+ ValUtkSubaddressT Subaddress;
+ kal_bool DurationPre;
+ ValUtkDurationT Duration;
+ kal_bool ConfirmIconPre;
+ ValUtkIconT ConfirmIcon;/*Icon identifier (user confirmation phase)*/
+ kal_bool SetupAlphaPre;
+ ValUtkTextT SetupAlpha;/* Alpha identifier (call set up phase) */
+ kal_bool SetupIconPre;
+ ValUtkIconT SetupIcon;/*Icon identifier (call set up phase)*/
+} ValUtkSetUpCallCmdT;
+
+/*UTK display text Command */
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ ValUtkTextT TextString;
+ kal_bool IconPre;
+ ValUtkIconT Icon;
+ kal_bool ImmediateRsp; /* Immediate response KAL_TRUE*/
+ kal_bool DurationPre;
+ ValUtkDurationT Duration;
+} ValUtkDisplayTextCmdT;
+
+/* Response length (8.11)*/
+typedef struct
+{
+ kal_uint8 RspLenMin;/* Minimum length of response */
+ kal_uint8 RspLenMax;/* Maximum length of response */
+} ValUtkRspLenT;/*The range of length is between '00' and 'FF'. A minimum length coding
+of '00' indicates that there is no minimum length requirement; a maximum length coding
+of 'FF' indicates that there is no maximum length requirement. If a fixed length is
+required the minimum and maximum values are identical.*/
+
+/*UTK get input Command(6.6.3) */
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ ValUtkTextT TextString; /*text for the Terminal to display in conjunction with asking the user to respond.*/
+ ValUtkRspLenT RspLen; /* Response length */
+ kal_bool DefaultTextPre; /* if default text is present */
+ ValUtkTextT DefaultText; /*corresponds to a default text string offered by the UIM.*/
+ kal_bool IconPre;
+ ValUtkIconT Icon;
+} ValUtkGetInputCmdT;
+
+typedef enum
+{
+ /* Standard supervisory tones: */
+ UTK_TONE_DIAL = 0x01, /* Dial tone */
+ UTK_TONE_CALLED_BUSY, /*Called subscriber busy*/
+ UTK_TONE_CONGESTION, /*Congestion*/
+ UTK_TONE_RADIO_PATH_ACK, /*Radio path acknowledge;*/
+ UTK_TONE_RADIO_PATH_UNAVAIL_OR_CALL_DROP, /*Radio path not available/Call dropped*/
+ UTK_TONE_ERROR_OR_SPEC_INFO, /*Error/Special information*/
+ UTK_TONE_CALL_WAITING, /*Call waiting tone*/
+ UTK_TONE_RINGING, /*Ringing tone*/
+ /*Terminal proprietary tones*/
+ UTK_TONE_BEEP = 0x10, /*General beep*/
+ UTK_TONE_POSITIVE_ACK, /*Positive acknowledgement tone*/
+ UTK_TONE_NEG_ACK_OR_ERROR, /*Negative acknowledgement or error tone*/
+ UTK_TONE_USER_SELECTED_RINGING, /*Ringing tone as selected by the user for incoming speech call;*/
+ UTK_TONE_USER_SELECTED_ALERT /*Alert tone as selected by the user for incoming SMS*/
+ /* All other values are reserved. */
+} ValUtkToneT;
+
+/*utk play tone Command(6.6.5) */
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ kal_bool AlphaPre;
+ ValUtkTextT Alpha;
+ kal_bool TonePre; /*if Tone is present. If no tone is specified, then the Terminal shall default to "general beep"*/
+ ValUtkToneT Tone;
+ kal_bool DurationPre;
+ ValUtkDurationT Duration;
+ kal_bool IconPre;
+ ValUtkIconT Icon;
+} ValUtkPlayToneCmdT;
+
+
+/*utk send sms Command (6.6.9) */
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ kal_bool AlphaPre;
+ ValUtkTextT Alpha;
+ kal_bool AddressPre;
+ ValUtkAddressT Address;
+ kal_uint8 SmsLen; /* Length of SMS TPDU */
+ kal_uint8* SmsTpduP; /* SMS TPDU Buffer */
+} ValUtkSendSmsCmdT;
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ kal_uint8 DtmfLen;
+ kal_uint8* DtmfStrP;
+ kal_bool AlphaPre;
+ ValUtkTextT Alpha;/* Alpha identifier (call set up phase) */
+ kal_bool IconPre;
+ ValUtkIconT Icon;/*Icon identifier (call set up phase)*/
+} ValUtkSendDtmfCmdT;
+
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+} ValUtkProvideLocalInformationCmdT;
+
+
+typedef enum
+{
+ VAL_UTK_FILE_SMS, /*UIM SMS is updated*/
+ VAL_UTK_FILE_PHB, /*UIM Phone book is updated*/
+ VAL_UTK_FILE_UNKNOWN,
+ VAL_UTK_FILE_MAX
+}ValUtkFileT;
+
+typedef struct
+{
+ kal_uint8 FileCount;
+ ValUtkFileT File[VAL_UTK_FILE_MAX];
+} ValUtkFileListT;
+
+
+
+/*utk refresh command (6.6.13) */
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ kal_bool FilelistPre;
+ ValUtkFileListT FileList;
+ kal_bool AidPre;
+ kal_uint8 Aid[16];
+} ValUtkRefreshCmdT;
+
+/*UTK SetUp EVENT List Command */
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ ValUtkEventListT EventList;
+} ValUtkSetUpEventListCmdT;
+
+
+/*UTK get inkey Command(6.6.2) */
+typedef struct
+{
+ ValUtkCmdDetailT CmdDetail;
+ ValUtkTextT TextString; /*text for the Terminal to display in conjunction with asking the user to respond.*/
+ kal_bool IconPre;
+ ValUtkIconT Icon;
+} ValUtkGetInkeyCmdT;
+
+typedef enum
+{
+ UTK_NOT_SUPPORT, /*UIM card can't support UTK */
+ UTK_MSG_MISSING_PARAM, /* Message received from UIM card misses necessary parameter*/
+ UTK_MSG_MISMATCH_LENGTH,/*Length of message received from UIM card is mismatch */
+ UTK_MSG_PARAM_ERR,/*Parameter received from UIM card is error */
+ UTK_UIM_CARD_BUSY,/* UIM card UIM tollkit is busy */
+ UTK_MSG_SW_ERR, /* Status word of message received from UIM card is unexpected */
+ UTK_SESSION_NORMAL_END /* UTK session is end normally*/
+} ValUtkSessionEndCmdT;
+
+
+/*sms parameters used by sms unit via utk sms download*/
+/* message identifier */
+typedef struct
+{
+ kal_uint8 MsgType;
+ kal_uint16 MsgId;
+ kal_bool HeaderInd;
+} ValUtkSmsMsgIdT;
+
+/* address */
+typedef struct
+{
+ kal_bool DigitMode;
+ kal_bool NumMode;
+ kal_uint8 NumType;
+ kal_uint8 NumPlan;
+ kal_uint8 NumFields;
+ kal_uint8 Address[UTK_SMS_ADDRESS_LEN];
+} ValUtkSmsAddressT;
+
+/* Subaddress */
+typedef struct
+{
+ kal_uint8 Type;
+ kal_bool Odd;
+ kal_uint8 NumFields;
+ kal_uint8 Subaddress[UTK_SMS_SUBADDRESS_LEN];
+} ValUtkSmsSubaddressT;
+/*sms parameters end */
+
+
+/* utk events */
+typedef enum
+{
+ UTK_EVENT_DISPLAY_TEXT,
+ UTK_EVENT_GET_INPUT,
+ UTK_EVENT_PLAY_TONE,
+ UTK_EVENT_SETUP_MENU,
+ UTK_EVENT_SELECT_ITEM,
+ UTK_EVENT_SEND_SMS,
+ UTK_EVENT_SETUP_CALL,
+ UTK_EVENT_PROVIDE_LOCAL_INFORMATION,
+ UTK_EVENT_REFRESH,
+ UTK_EVENT_GET_INKEY,
+ UTK_EVENT_END,
+
+ UTK_EVENT_SETUP_EVENT_LIST,
+ UTK_EVENT_SEND_DTMF,
+ UTK_EVENT_CALL_CONTROL_RSP,
+
+ UTK_MAX_EVENT
+} ValUtkEventIdT;
+
+typedef union
+{
+ ValUtkDisplayTextCmdT DispTextCmd;
+ ValUtkSetUpMenuCmdT SetUpMenuCmd;
+ ValUtkSetUpCallCmdT SetUpCallCmd;
+ ValUtkGetInputCmdT GetInputCmd;
+ ValUtkSendSmsCmdT SendSmsCmd;
+ ValUtkPlayToneCmdT PlayToneCmd;
+ ValUtkSelectItemCmdT SelectItemCmd;
+ ValUtkSessionEndCmdT SessionEndCmd;
+ ValUtkProvideLocalInformationCmdT ProvideLocInfoCmd;
+ ValUtkRefreshCmdT RefreshCmd;
+ ValUtkSetUpEventListCmdT SetUpEventCmd;
+ ValUtkGetInkeyCmdT GetInkeyCmd;
+} ValUtkEventDataT;
+
+/* Callback to support UI needs to handle UTK events */
+typedef void (*UtkEventFunc)
+(
+ RegIdT RegId,
+ ValUtkEventIdT EventId, /* UTK Event which invokes the callback */
+ ValUtkEventDataT* EventDataP /* Transmitted data pointer */
+);
+
+typedef struct
+{
+ kal_bool SoftKeyForSelItem; /* Soft keys support for SELECT ITEM */
+ kal_bool SoftKeyForSetUpMenu; /* Soft Keys support for SET UP MENU */
+ kal_uint8 SoftKeyMaxNum; /* Maximum number of soft keys available,'FF' is reserved */
+} ValUtkSoftKeyT;
+
+typedef struct
+{
+ kal_uint8 CharNum;/* 5 bits,Number of characters supported down the terminal display*/
+ kal_bool SizingParam; /*Screen Sizing Parameters supported*/
+} ValUtkDispHeightT;
+
+typedef struct
+{
+ kal_uint8 CharNum;/* 7 bits,Number of characters supported across the terminal display*/
+ kal_bool VarSizeFont;/*Variable size fonts Supported*/
+} ValUtkDispWidthT;
+
+typedef struct
+{
+ ValUtkDispHeightT DispHightParam;
+ ValUtkDispWidthT DispWidthParam;
+ kal_bool Resized; /*Display can be resized*/
+ kal_bool TextWrap; /*Text Wrapping supported*/
+ kal_bool TextScroll; /*Text Scrolling supported*/
+ kal_bool ExtText; /*Extended text supported */
+ kal_uint8 WidthReduction; /* 3 bits, Width reduction when in a menu, this value
+ is the number of characters available across the
+ display due to a DISPLAY TEXT proactive
+ command without scrolling (using the default character
+ set specified in TS 123 038 [3]) minus the number of
+ characters available across the display due
+ to a SELECT ITEM proactive command without scrolling */
+} ValUtkDispParamT;
+
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+typedef struct
+{
+ kal_uint8 Len;
+ kal_uint8 BC_RepeatIndValue;
+} ValUtkBC_RepeatIndT;
+#endif
+
+#if 1
+/* UTK Set Up call Command */
+typedef struct
+{
+ kal_uint8 Result;
+ kal_uint8 Len;
+ kal_bool AddressPre;
+ ValUtkAddressT Address;
+ kal_bool CapCfgParamPre1;
+ ValUtkCapCfgParamT CapCfgParam1;/*Capability configuration parameters*/
+ kal_bool SubaddressPre;
+ ValUtkSubaddressT Subaddress;
+ kal_bool AlphaPre;
+ ValUtkTextT Alpha;/* Alpha identifier (call set up phase) */
+#if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__)
+ kal_bool BC_RepeatIndPresent;
+ ValUtkBC_RepeatIndT BC_RepeatIndTLV;
+ kal_bool CapCfgParamPre2;
+ ValUtkCapCfgParamT CapCfgParam2;/*Capability configuration parameters*/
+#endif
+} ValUtkCallControlIndT;
+#endif
+
+typedef enum
+{
+ UTK_SETUPEVT_MT_CALL = 0, /* 00 MT call; */
+UTK_SETUPEVT_CALL_CONNECTED, /* 01 Call connected; */
+UTK_SETUPEVT_CALL_DISCONNECTED, /* 02 Call disconnected;*/
+UTK_SETUPEVT_LOCATION_STATUS, /* 03 Location status; */
+UTK_SETUPEVT_USER_ACTIVITY, /* 04 User activity;*/
+UTK_SETUPEVT_IDLE_SCN_AVAILABLE, /* 05 Idle screen available;*/
+UTK_SETUPEVT_CARD_READER_STATUS, /* 06 Card reader status;*/
+UTK_SETUPEVT_LANGUAGE_SELECTION, /* 07 Language selection;*/
+UTK_SETUPEVT_BROWSER_TERMINATION, /* 08 Browser termination; */
+UTK_SETUPEVT_DATA_AVAILABLE, /* 09 Data available;*/
+UTK_SETUPEVT_CHANNEL_STATUS, /* 0A Channel status;*/
+UTK_SETUPEVT_SACC_TECH_CHANGE, /* 0B Access Technology Change (single access technology);*/
+UTK_SETUPEVT_DISP_PARAM_CHANGE, /* 0C Display parameters changed;*/
+UTK_SETUPEVT_LOCAL_CONNECTION, /* 0D Local connection;*/
+UTK_SETUPEVT_NTWK_SERACH_MODE, /* 0E Network Search Mode Change;*/
+UTK_SETUPEVT_BROWSING_STATUS, /* 0F Browsing status; */
+UTK_SETUPEVT_FRAMES_INFO_CHANGE, /* 10 Frames Information Change;*/
+UTK_SETUPEVT_RSV_IWLAN, /* 11 reserved for 3GPP (I-WLAN Access Status);*/
+UTK_SETUPEVT_RSV_NTWK_REJ, /* 12 reserved for 3GPP (Network Rejection)*/
+UTK_SETUPEVT_HCI_CONNECTIVITY, /* 13 HCI connectivity event.*/
+UTK_SETUPEVT_MACC_TECH_CHANGE, /* 14 Access Technology Change (multiple access technologies).*/
+UTK_SETUPEVT_CSG_CELL_SELECTION, /* 15 reserved for 3GPP (CSG cell selection). */
+UTK_SETUPEVT_CONTACTLESS_STATE_REQ,/* 16 Contactless state request. */
+NUM_UTK_SETUP_EVENT
+}ValUtkSetupEvtT;
+
+/*Transaction identifier*/
+typedef struct
+{
+ kal_uint8 Len;
+ kal_uint8 List[VAL_MAX_CON_REC];
+} ValUtkTransIdT;
+
+/* MT Call Event */
+typedef struct
+{
+ kal_bool AddressPre;
+ ValUtkAddressT Address;
+ kal_bool SubaddressPre;
+ ValUtkSubaddressT Subaddress;
+ ValUtkTransIdT TransId;
+} ValUtkMTCallEvtT;
+
+/* Call Connected Event */
+typedef struct
+{
+ kal_uint8 DeviceType; /*0 termial initiate, 1 network initiate*/
+ ValUtkTransIdT TransId;
+} ValUtkCallConnT;
+
+/* Call Disconnected Event */
+typedef struct
+{
+ kal_uint8 DeviceType;/*0 termial initiate, 1 network initiate*/
+ ValUtkTransIdT TransId;
+ kal_bool CausePre;
+ kal_uint8 CauseLen;
+ kal_uint8* CauseP;
+} ValUtkCallDiscT;
+
+/* Location Status Event */
+typedef struct
+{
+ kal_uint8 LocStatus;
+ kal_uint8 AccessInfo[15];
+} ValUtkLocStatusT;
+
+/* Access Technology Change Event */
+typedef struct
+{
+ ValUtkTechT Technology;
+} ValUtkAccTechChangeEvtT;
+
+/* Access Technology Change Event */
+typedef struct
+{
+ kal_uint16 ChannelStatus;
+ kal_uint8 ChannelDataLen;
+} ValUtkDataAvailableEvt;
+
+typedef union
+{
+ ValUtkMTCallEvtT MtCallEvt;
+ ValUtkCallConnT CallConnEvt;
+ ValUtkCallDiscT CallDiscEvt;
+ ValUtkLocStatusT LocStatus;
+ ValUtkAccTechChangeEvtT AccTechChangeEvt;
+ ValUtkDataAvailableEvt DataAvailableEvt;
+} ValUtkSetupEventDataT;
+#ifdef MTK_DEV_C2K_IRAT
+
+typedef struct{
+kal_uint8 ValImsRegStatus;
+kal_uint8 IsImsTimerExpired;
+}ValImsRegInfoT;
+#endif
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkRegister
+
+ DESCRIPTION:
+
+ Other task invokes this function to register event functions in UTK unit.
+
+ PARAMETERS:
+ EventFunc: Callback function
+
+ RETURNED VALUES:
+
+ TRegister ID
+ -1: failed.
+
+*****************************************************************************/
+extern RegIdT ValUtkRegister(UtkEventFunc EventFunc);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkUnregister
+
+ DESCRIPTION:
+
+ Other task invokes this function to unregister event functions in UTK unit.
+
+ PARAMETERS:
+ RegId: Assigned Register ID
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void ValUtkUnregister(RegIdT RegId);
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkProfileInit
+
+ DESCRIPTION:
+
+ UTK initialization. UIM card revision is obtained to determine whether or not UIM card
+ supports UTK functionality. After sending read message to UIM, UTK init returns. Other
+ operations (e.g. read image file and sending Terminal Profile command ) will be done
+ after receiving response from UIM.
+
+ PARAMETERS:
+
+ DispParamP: Display parameter pointer
+ SoftKeyP: Soft key parameter poniter
+ used to construct UTK Profile
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+extern void ValUtkProfileInit(ValUtkDispParamT* DispParamP, ValUtkSoftKeyT* SoftKeyP);
+
+
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkSmsDownload
+
+ DESCRIPTION:
+
+ handles SMS-PP data download Command received from the network.
+
+ PARAMETERS:
+
+ ApduP: utk sms transport layer buffer
+ Len: length of sms transport layer buffer
+ OrigAddressP: original address buffer (utk uses it when sending ack)
+ OrigSubaddressP: original subaddress buffer NULL: absent (utk uses it when sending ack)
+ BearerReplyOption: REPLY_SEQ of Bearer replay option parameter (utk uses it when sending ack)
+ MsgIdP: Message Identifier buffer (utk uses it when sending ack)
+ TeleSrvId: TeleSrvId (utk uses it when sending ack)
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+void ValUtkSmsDownload( kal_uint8* ApduP,
+ kal_uint8 Len,
+ ValUtkSmsAddressT* OrigAddressP,
+ ValUtkSmsSubaddressT* OrigSubaddressP,
+ kal_uint16 MsgId,
+ kal_uint16 TeleSrvId,
+ kal_bool IsImsPPdownLoad,
+ kal_uint8 seq_id);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkSelectMenu
+
+ DESCRIPTION:
+
+ handles Selection Menu Command received from UI.
+
+ PARAMETERS:
+
+ ItemId : item identifier
+ help: if help is needed, KAL_TRUE: needed
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void ValUtkSelectMenu(kal_uint8 ItemId, kal_bool Help);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkCommCmdResult
+
+ DESCRIPTION:
+
+ If UIM sends command to UI, UI just has result value, no other return value, uses this function.
+
+ PARAMETERS:
+
+ CmdDetailP: Command detail, if it is NULL, the UTK filled it with the last command detail
+ ResultP: Result
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void ValUtkCommCmdResult(ValUtkCmdDetailT *CmdDetailP, ValUtkResultT *ResultP);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkGetInkeyDone
+
+ DESCRIPTION:
+
+ If UIM sends get inkey command to UI, UI uses this function to return text string to UIM.
+
+ PARAMETERS:
+
+ CmdDetailP: Command detail, if it is NULL, the UTK filled it with the last command detail
+ TextStrP: input text by the user
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+void ValUtkGetInkeyDone( ValUtkCmdDetailT* CmdDetailP,
+ ValUtkTextT* TextStrP );
+
+/*****************************************************************************
+ FUNCTION NAME: ValUtkGetInputDone
+
+ DESCRIPTION:
+
+ If UIM sends get input command to UI, UI uses this function to return text string to UIM.
+
+ PARAMETERS:
+
+ CmdDetailP: Command detail, if it is NULL, the UTK filled it with the last command detail
+ TextStrP: input text by the user
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void ValUtkGetInputDone(ValUtkCmdDetailT *CmdDetailP, ValUtkTextT *TextStrP);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkSelectItemDone
+
+ DESCRIPTION:
+
+ if UIM sends select item command to UI, UI uses this function to return item to UIM.
+
+ PARAMETERS:
+
+ CmdDetailP: Command detail, if it is NULL, the UTK filled it with the last command detail
+ ItemId: Identifier of item chosen
+ Help: if user requests the help information for this item
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void ValUtkSelectItemDone(ValUtkCmdDetailT *CmdDetailP, kal_uint8 ItemId, kal_bool Help);
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkProvideLocalInformationDone
+
+ DESCRIPTION:
+
+ If UIM sends Provide Local Information command to UI, UI uses this function to return local info to UIM.
+
+ PARAMETERS:
+
+ CmdDetailP: Command detail, if it is NULL, the UTK filled it with the last command detail
+ TextStrP: input text by the user
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void ValUtkProvideLocalInformationDone(ValUtkCmdDetailT *CmdDetailP,ValUtkResultT *ResultP, ValUtkLocalInfoT *InfoP);
+
+#if defined(FEATURE_CALL_CONTROL) || defined(MTK_DEV_C2K_IRAT)
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkCallControl
+
+ DESCRIPTION:
+
+ handles Call Control Command received from UI.
+
+ PARAMETERS:
+
+ AddressP : point to DiallingNumber
+ CapCfgParaP1: point to Capability configure parameters 1
+ SubAddressP: pointer to subaddress
+ LocalInfoP: pinter to location infor.
+ CapCfgParaP2: point to Capability configure parameters 1
+ BcRepeatInd: BC repeater indicator
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void ValUtkCallControl(ValUtkAddressT *AddressP, ValUtkCapCfgParamT *CapCfgParaP1,ValUtkSubaddressT *SubAddressP, kal_uint8 *LocalInfoP);
+#endif
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkProSetupEvtList
+
+ DESCRIPTION:
+
+ Handles Proactive Command SET UP EVENT LIST.
+
+ PARAMETERS:
+
+ MsgP: response message from UIM
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern ValUtkGenResultT ValUtkProSetupEvtList(ValUtkSetUpEventListCmdT * SetUpEventCmd);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkCheckEvtList
+
+ DESCRIPTION:
+
+ Check if a specific event is enabled or not .
+
+ PARAMETERS:
+
+ ValUtkSetupEvtT Evt
+
+ RETURNED VALUES:
+
+ KAL_TRUE/KAL_FALSE
+
+*****************************************************************************/
+extern kal_bool ValUtkCheckEvtList(ValUtkSetupEvtT Evt);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkEventDownload
+
+ DESCRIPTION:
+
+ UTK sends ENVELOPE(EVENT DOWNLOAD) command to UIM.
+
+ PARAMETERS:
+ ValUtkSetupEvtT Evt,
+ ValUtkSetupEventDataT * data
+
+ RETURNED VALUES:
+ None
+*****************************************************************************/
+extern void ValUtkEventDownload(ValUtkSetupEvtT Evt, ValUtkSetupEventDataT * data);
+/*get the current event status*/
+extern kal_bool UtkGetEvt(ValUtkSetupEvtT Evt);
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkInit
+
+ DESCRIPTION:
+
+ Create UtkEventsLock. this function is invoked by valtask
+
+ PARAMETERS:
+
+ None.
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void ValUtkInit(void);
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValAtUtkProfileInit
+
+ DESCRIPTION:
+
+ UTK initialization for AT application. UIM card revision is obtained to determine whether or not UIM card
+ supports UTK functionality. After sending read message to UIM, UTK init returns. Other
+ operations (e.g. read image file and sending Terminal Profile command ) will be done
+ after receiving response from UIM.
+
+ PARAMETERS:
+
+ profile:
+
+ RETURNED VALUES:
+
+ None.
+
+*****************************************************************************/
+void ValAtUtkProfileInit( kal_uint8* profile );
+
+/*****************************************************************************
+
+ FUNCTION NAME: UtkDeliverMail
+
+ DESCRIPTION:
+
+ Delivers UTK response message. It is used by valtask.
+
+ PARAMETERS:
+
+ MsgId: received message id
+ MsgP: message
+ MsgSize: message size
+
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void ValUtkDeliverMsg(kal_uint32 MsgId, void * MsgP, kal_uint32 MsgSize);
+extern UtkEventFunc CallbackFunc;
+extern RegIdT RegId;
+
+/*****************************************************************************
+
+ FUNCTION NAME: ValUtkUimAppInitTerm
+
+ DESCRIPTION:
+
+ CCAT cases, for proactive command reresh. uim initialization or terminate
+
+ PARAMETERS:
+
+ none
+ RETURNED VALUES:
+
+ None
+
+*****************************************************************************/
+extern void ValUtkUimAppInitTerm(kal_uint8 OperMode, kal_uint8* Aid);
+
+#ifdef MTK_DEV_C2K_IRAT
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimSetUpEventList
+
+ DESCRIPTION:
+
+ Translates uim proactive Set up Event List command.
+
+ PARAMETERS:
+
+ BufDataP: proactive command(Set Up Event List) buffer
+ Len: Length of buffer
+
+ RETURNED VALUES:
+
+ None
+
+ *****************************************************************************/
+extern kal_int8 ValUimSetUpEventList(kal_uint8 *BufDataP,kal_uint8 Len);
+/*****************************************************************************
+
+ FUNCTION NAME: ValUimMoreTimeProcess
+
+ DESCRIPTION:
+
+ Translates uim proactive Set up Event List command.
+
+ PARAMETERS:
+
+ BufDataP: proactive command(Set Up Event List) buffer
+ Len: Length of buffer
+
+ RETURNED VALUES:
+
+ None
+
+ *****************************************************************************/
+void ValUimMoreTimeProcess(kal_uint8 *BufDataP,kal_uint8 Len);
+extern kal_uint8 UtkParseCmdDetail(kal_uint8* DataP, ValUtkCmdDetailT* CmdDetailP);
+extern kal_uint8 UtkParseDeviceId(kal_uint8* DataP, kal_uint8* OrigDeviceP, kal_uint8* DestDeviceP);
+extern kal_uint8 UtkParseTimerId(kal_uint8* DataP, kal_uint8* TimerIdP);
+extern kal_uint8 UtkParseTimerValue(kal_uint8* DataP, kal_uint32* TimerValue);
+extern kal_uint32 ValUimStopUtkTimer(kal_uint8 TimerId);
+extern void ValUimStartUtkTimer(kal_uint8 TimerId,kal_uint32 TimerValue);
+extern kal_uint32 ValUimGetRemainTimer(kal_uint8 TimerId);
+extern kal_uint32 ValGetSystemTimeInSec(void);
+extern void ValUimTimerManagerProcess(kal_uint8 *BufDataP,kal_uint8 Len);
+
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif /* FEATURE_UTK*/
+#endif /* VALUTKAPI_H */
+/*****************************************************************************
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+*****************************************************************************/
+
+
+
+
diff --git a/mcu/interface/protocol/l4_c2k/vdm_cval_struct.h b/mcu/interface/protocol/l4_c2k/vdm_cval_struct.h
new file mode 100644
index 0000000..f0a87da
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/vdm_cval_struct.h
@@ -0,0 +1,138 @@
+/*****************************************************************************
+* 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:
+ * ---------
+ * vdm_val_struct.h
+ *
+ * Project:
+ * --------
+ * LR11
+ *
+ * Description:
+ * ------------
+ * This file is the interface between MD1/VDM and MD3/VAL
+ *
+ * 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 _VDM_VAL_STRUCT_H_
+#define _VDM_VAL_STRUCT_H_
+
+#include "l3_inc_enums.h"
+#include "ps_public_enum.h"
+
+/* enum */
+typedef enum
+{
+ VDM_CVAL_EXIT_ECBM_TIMER_EXPIRE, //leave ecbm on timer expiry
+ VDM_CVAL_EXIT_ECBM_SECOND_CALL, //leave ecbm due to second call
+ VDM_CVAL_EXIT_ECBM_T911
+}vdm_cval_exit_ecbm_reason_enum;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint32 TransID;
+}vdm_cval_send_dcn_start_ind_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_uint32 TransID;
+ kal_bool allow_dcn;
+}vdm_cval_send_dcn_start_rsp_struct;
+
+typedef struct {
+ LOCAL_PARA_HDR
+ kal_bool is_ims_registered_for_voice;
+}vdm_cval_ims_reg_status_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ call_status_enum call_status;
+ call_type_indication_enum call_type;
+}vdm_cval_call_status_req_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ call_status_enum call_status;
+ call_type_indication_enum call_type;
+}vdm_cval_call_status_cnf_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ vdm_call_domain_enum ecbm_domain;
+} vdm_cval_ecbm_start_ind_struct;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ vdm_cval_exit_ecbm_reason_enum exit_ecbm_cause;
+}vdm_cval_ecbm_end_ind_struct;
+
+#endif /* _VDM_VAL_STRUCT_H_ */
+
diff --git a/mcu/interface/protocol/l4_c2k/vdmapi.h b/mcu/interface/protocol/l4_c2k/vdmapi.h
new file mode 100644
index 0000000..ace634a
--- /dev/null
+++ b/mcu/interface/protocol/l4_c2k/vdmapi.h
@@ -0,0 +1,252 @@
+/*****************************************************************************
+* 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) 2016
+*
+* 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 _VDMAPI_H_
+#define _VDMAPI_H_
+
+/*----------------------------------------------------------------------------
+ Include Files
+----------------------------------------------------------------------------*/
+#include "sysdefs.h"
+#include "valapi.h"
+
+/*----------------------------------------------------------------------------
+ Global Defines and Macros
+----------------------------------------------------------------------------*/
+#define VDM_STARTUP_SIGNAL EXE_SIGNAL_1
+#define VDM_STARTUP_SIGNAL2 EXE_SIGNAL_2
+
+#define VDM_MAILBOX_CMD EXE_MAILBOX_1_ID
+#define VDM_MAILBOX2_CMD EXE_MAILBOX_2_ID
+
+#define VDM_MAILBOX EXE_MESSAGE_MBOX_1
+#define VDM_DBM_MAILBOX EXE_MESSAGE_MBOX_2
+
+#define MANUFACTURER "Fusion"
+
+#define MODULENAME "FW2770P"
+#define CLIENTVERDOR "redbend"
+#define CLIENTVERSION "1.2"
+
+#define SESSION_RETRY_INTERVAL 60000 /* 60 seconds*/
+#define MAX_NIA_RETRY_NUM 5
+#define MAX_HFA_RETRY_NUM 5
+#define MIP_PROFILE_ZERO 0
+#define MIP_PROFILE_ONE 1
+#define MAX_PROXY_ADD_LEN 100
+#define DEFAULT_PROXY_ADD "http://68.31.28.1:80"
+
+#define MAX_NIA_MSG_LEN 255
+
+typedef enum
+{
+ VDM_HFA_CEHCK_MSG,
+ VDM_WAP_PUSH_SMS_MSG,
+ VDM_CI_FUMO_MSG,
+ VDM_NIA_MSG,
+ VDM_CIDC_MSG,
+ VDM_CIPRL_MSG,
+ VDM_HFA_CIDC_MSG,
+ VDM_HFA_CIPRL_MSG,
+ VDM_HFA_CIFUMO_MSG,
+ VDM_FUMO_REPORT_MSG,
+ VDM_RTN_RESET_MSG,
+
+ VDM_NET_MSG,
+ VDM_SOCKET_MSG,
+ VDM_DNS_MSG,
+
+ VDM_SESSION_RETRY_TIMER_EXPIRED_MSG,
+ VDM_HFA_RETRY_TIMER_EXPIRED_MSG,
+ VDM_PRL_UPDATE_TIMER_EXPIRED_MSG,
+ VDM_DORM_TIMER_EXPIRED_MSG,
+
+ VDM_GET_MOBILE_ID_RSP_MSG,
+ VDM_DBM_DATA_PRL_WRITE_MSG,
+ VDM_DBM_DATA_NAM_WRITE_ACK_MSG,
+ VDM_SET_ACTIVE_PROFILE_RSP_MSG,
+ VDM_GET_ACTIVE_PROFILE_RSP_MSG,
+ VDM_SET_PROFILE_DATA_RSP_MSG,
+ VDM_GET_PROFILE_DATA_RSP_MSG,
+ VDM_SET_SECURE_DATA_RSP_MSG,
+ VDM_GET_SECURE_DATA_RSP_MSG,
+ VDM_SET_MN_HA_AUTH_ALGO_RSP_MSG,
+ VDM_GET_MN_HA_AUTH_ALGO_RSP_MSG,
+ VDM_SET_MN_AAA_AUTH_ALGO_RSP_MSG,
+ VDM_GET_MN_AAA_AUTH_ALGO_RSP_MSG,
+
+ VDM_SET_HYBRID_PREF_MODE_RSP_MSG,
+ VDM_SET_PRI_SEC_CH_RSP_MSG,
+ VDM_SET_RRP_TIMEOUT_RSP_MSG,
+ VDM_SET_NUM_REG_RETRIES_RSP_MSG,
+ VDM_SET_REG_BACKOFF_RSP_MSG,
+ VDM_SET_NUM_PROFILE_RSP_MSG,
+ VDM_SET_MIP_MODE_RSP_MSG,
+ VDM_SET_MN_HA_AUTH_RSP_MSG,
+ VDM_SET_MIP_STRING_PASkal_int16_RSP_MSG,
+
+ VDM_NUM_MSG_IDS
+}VdmMsgIdT;
+
+typedef enum
+{
+ VDM_NO_SESSION,
+ VDM_CI_FUMO,
+ VDM_NIA,
+ VDM_CIDC,
+ VDM_CIPRL,
+ VDM_HFA_CIDC,
+ VDM_HFA_CIPRL,
+ VDM_HFA_CIFUMO
+}VdmTriggerType;
+
+typedef PACKED_PREFIX struct
+{
+ kal_uint32 ParamA;
+ kal_int32 ParamB;
+} PACKED_POSTFIX DmMsgT;
+
+ typedef PACKED_PREFIX struct
+ {
+ kal_uint8 NumFields; /* Length of data in octets */
+ kal_uint8 Char[ VAL_SMS_MAX_USERDATA_LENGTH ]; /* User Data field of message */
+ } PACKED_POSTFIX VdmWapPushDataT;
+
+typedef struct
+ {
+ kal_uint8* Data;
+ kal_uint16 DataLen;
+ }VdmNiaT;
+
+typedef struct
+ {
+ kal_uint8 Data[MAX_NIA_MSG_LEN];
+ kal_uint16 DataLen;
+ }VdmNiaMsgT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_bool success;
+} PACKED_POSTFIX VdmFumoReportMsgT;
+
+typedef enum
+{
+ HFA_CIDC,
+ HFA_CIPRL,
+ HFA_CIFUMO,
+ VDM_NUM_HFA_TYPE
+}VdmHfaTypeT;
+
+typedef PACKED_PREFIX struct
+{
+ kal_uint32 TimerId; /* Expired timer Id */
+} PACKED_POSTFIX VdmTimerExpiredMsgT;
+
+typedef struct{
+ kal_bool queued;
+ kal_uint8 Niadata[MAX_NIA_MSG_LEN];
+ kal_uint16 NiadataLen;
+} VdmNiaRequestT;
+
+void VdmInitialize(void);
+void VdmResponse( VdmMsgIdT ExpectedMsgId );
+void VdmProcessNetMsg(DmMsgT *MsgP);
+void VdmProcessSocketMsg(DmMsgT *MsgP);
+void VdmProcessDNSMsg(DmMsgT *MsgP);
+void VDM_NotifyAppMsg(kal_uint32 MailMsgId, kal_uint32 ParamA , kal_int32 ParamB);
+void VdmSessionInitialize(void);
+void dmc_registerCallbacks(void);
+void VdmProcessCidcMsg(void);
+void VdmProcessCiprlMsg(void);
+void VdmProcessHfaCidcMsg(void);
+void VdmProcessHfaCiprlMsg(void);
+void VdmProcessWapPushMsg(ValSmsUserDataMsgT* MsgDataPtr);
+void VdmProcessNiaMsg(VdmNiaMsgT* MsgP);
+void VdmDoNiaSession(VdmNiaT* MsgP);
+void VdmProcessFumoReportMsg(VdmFumoReportMsgT *MsgP);
+void VdmMd5(char *data, kal_uint16 dataLen, char *b);
+kal_uint32 base64_decode(kal_uint8 *bdata,kal_uint32 bdlen,kal_uint8 *outData);
+kal_uint32 base64_encode(kal_uint8 *data, kal_uint32 dlen, kal_uint8 *outPut);
+void VdmAuthSecretCalc(char *a, char *b, char *s, char* output);
+void VdmProcessGetMobileIdRspMsg(PswGetMobileIDRspMsgT* Msg);
+void VdmWriteMultipleBlocks(void);
+kal_bool VdmInitiateSessionTrigger(VdmTriggerType TriggerType);
+void VdmStartPrlUpdateTimer(kal_uint32 duration);
+void VdmStopPrlUpdateTimer(void);
+void VdmPrlUpdateTimerCallBack (kal_uint32 TimerId);
+void VdmCreatPrlUpdateTimer(void);
+void VdmCreatSessionRetryTimer(void);
+void VdmStartSessionRetryTimer(kal_uint32 duration);
+void VdmStopSessionRetryTimer(void);
+void VdmStartHfaRetryTimer(kal_uint8 timeId, kal_uint32 duration);
+void VdmStopHfaRetryTimer(kal_uint8 timeId);
+void VdmCreatHfaRetryTimer(void);
+void VdmHFACheck(void);
+kal_bool VdmSetDcEnable(kal_bool enable);
+kal_bool VdmSetPrlEnable(kal_bool enable);
+kal_bool VdmSetFumoEnable(kal_bool enable);
+kal_bool VdmSetLogEnable(kal_bool enable);
+void VdmSetPrlAotoupdate(kal_uint32 time);
+kal_bool VdmGetDcEnableValue(void);
+kal_bool VdmGetCheckHfaValue(void);
+VdmTriggerType VdmGetTriggerSessionType(void);
+void VdmSaveTriggerSessionType(void);
+void VdmPrintfile(char* sslbuffer, kal_uint32 length);
+void VdmPrintfileRemove(void);
+void VdmRtnReset(void);
+void VdmProcessRTNRestMsg(void);
+void VdmSetActiveProfileIdToZero(void);
+void VdmResetActiveProfileId(void);
+void VdmSetDmCmdRcvd(kal_bool value);
+void VdmCloseCurConnection(void);
+void VdmCreatDormancyTimer(void);
+void VdmStartDormancyTimer(kal_uint32 duration);
+void VdmStopDormancyTimer(void);
+void VdmDormancyTimerCallBack (kal_uint32 TimerId);
+void VdmProcessDormTimerExpiredMsg(void);
+kal_bool VdmIsPendNiaRequest(void);
+VdmTriggerType VdmGetSessionType(void);
+void VdmCreateSessionDir(const char *dirP);
+kal_bool VdmGetProxyEnableValue(void);
+void VdmGetProxyAddress(char* proxyAdd);
+kal_bool VdmIsDLSessionStarted(void);
+void VdmCheckNia(void);
+void VdmSetHFAEnable(kal_bool enable);
+void VdmGetMobileId(void);
+void VdmProcessHfaCheckMsg(void);
+void VdmProcessSessionRetryTimerExpiredMsg(void);
+void VdmProcessHfaRetryTimerExpiredMsg(VdmTimerExpiredMsgT *MsgP);
+void VdmProcessPrlUpdateTimerExpiredMsg(void);
+#endif
+