[Feature][T8TSK-212][Modem]Update MTK modem version to MOBILETEK35_IVT_T800_MOLY.NR15.R3.MD700.MP.V75.P6

Only Configure:No
Affected branch:T800_MD
Affected module:Modem
Is it affected on both ZXIC and MTK:only MTK
Self-test:Yes
Doc Update:No

Change-Id: Id19a67bd78c05e3f07b27b5943045cc78cb5c24d
diff --git a/mcu/protocol/interface/agps/gps_common.h b/mcu/protocol/interface/agps/gps_common.h
index d5a55c4..4be0a9e 100755
--- a/mcu/protocol/interface/agps/gps_common.h
+++ b/mcu/protocol/interface/agps/gps_common.h
@@ -734,6 +734,7 @@
 extern kal_bool lbs_cp_pos_method_capability_query(pos_method_enum pos_method);
 extern kal_bool lbs_op_id_check(protocol_id_enum pid, kal_uint8 gnss_rat_mode, kal_uint32 gnss_query_op);
 extern kal_bool lbs_gvc_block_non_ems_nilr(protocol_id_enum ps_id);
+extern kal_bool lbs_is_csfb();
 /* Query API for AGPSD LPPe support capability */
 kal_bool is_agps_lppe_enabled(void);
 kal_bool is_agps_lppe_network_location_enabled(void);
diff --git a/mcu/protocol/interface/errc/5g/errc_nrrc_struct.h b/mcu/protocol/interface/errc/5g/errc_nrrc_struct.h
index 2966d69..4050e19 100755
--- a/mcu/protocol/interface/errc/5g/errc_nrrc_struct.h
+++ b/mcu/protocol/interface/errc/5g/errc_nrrc_struct.h
@@ -807,11 +807,17 @@
 /* MSG_ID_ERRC_NRRC_SCG_FAILURE_IND */
 typedef struct {
     LOCAL_PARA_HDR
+    /* Value can be 'True' if SCG failure ind is triggered by power saving or overheating for EN-DC. */
+    kal_bool is_scg_release_signature;
 } errc_nrrc_scg_failure_ind_struct;
 
 /* MSG_ID_ERRC_NRRC_SUSPEND_REQ */
 typedef struct {
     LOCAL_PARA_HDR
+    /** Used to inform SCG whether SCG needs to ask MEAS for failureInformation to report in EN-DC case.
+     *  This value depends on is_scg_release_signature which is included in MSG_ID_ERRC_NRRC_SCG_FAILURE_IND
+     *  Value can be 'True' if SCG failure ind is triggered by power saving or overheating for EN-DC. */
+    kal_bool is_scg_release_signature;
 } errc_nrrc_suspend_req_struct;
 
 /* MSG_ID_ERRC_NRRC_SUSPEND_CNF */
diff --git a/mcu/protocol/interface/errc/errc_mrs_interface.h b/mcu/protocol/interface/errc/errc_mrs_interface.h
index baac78e..3f5a664 100755
--- a/mcu/protocol/interface/errc/errc_mrs_interface.h
+++ b/mcu/protocol/interface/errc/errc_mrs_interface.h
@@ -539,4 +539,21 @@
  *       TRUE means the feature is supported
  ****************************************************************************/
 kal_bool errc_check_eutra_capability_supported(eas_cap_feature_enum feature);
+
+/****************************************************************************
+ * FUNCTION
+ *     errc_rcm_mrs_endc_serving_cell_blacklisted
+ *
+ * DESCRIPTION
+ *    API for checking the serving cell is black listed in ENDC black list or not.
+ *
+ * PARAMETERS
+ *     @param
+ *       [in] sim_index
+ *
+ * RETURNS
+ *    @return
+ *       kal_bool: TRUE if the serving cell is black listed in ENDC/DNCA balck lsit in rcm
+ ****************************************************************************/
+kal_bool errc_rcm_mrs_endc_serving_cell_blacklisted(MRS_SIM_INDEX sim_idx);
 #endif /* _ERRC_MRS_INTERFACE_H_ */
diff --git a/mcu/protocol/interface/general/mrs_eas_capability.h b/mcu/protocol/interface/general/mrs_eas_capability.h
index 972572d..80b050c 100755
--- a/mcu/protocol/interface/general/mrs_eas_capability.h
+++ b/mcu/protocol/interface/general/mrs_eas_capability.h
@@ -1196,6 +1196,7 @@
 #endif /* __NR_RAT__ */
 
 kal_bool mrs_eas_check_eutra_capability_supported(eas_cap_feature_enum feature);
+kal_bool mrs_eas_endc_current_cell_blacklisted(MRS_SIM_INDEX sim_index);
 
 #endif /* _MRS_EAS_CAPABILITY_H */
 
diff --git a/mcu/protocol/interface/general/mrs_nras_capability.h b/mcu/protocol/interface/general/mrs_nras_capability.h
index 9f45d5f..8cae743 100755
--- a/mcu/protocol/interface/general/mrs_nras_capability.h
+++ b/mcu/protocol/interface/general/mrs_nras_capability.h
@@ -532,15 +532,16 @@
 kal_bool mrs_nras_band_setting_update_by_plmn(function_caller_id_enum caller_id,
     MRS_SIM_INDEX sim_index, mrs_plmn_id_list* p_plmn, mrs_ehplmn_id_list* p_ehplmn);
 
-mrs_nr_band_disable_by_plmn_state_enum mrs_nras_get_band_disable_by_plmn_state(MRS_SIM_INDEX sim_index);
+//mrs_nr_band_disable_by_plmn_state_enum mrs_nras_get_band_disable_by_plmn_state(MRS_SIM_INDEX sim_index);
 
-function_caller_id_enum mrs_nras_get_band_disable_last_caller_id(MRS_SIM_INDEX sim_index);
+function_caller_id_enum mrs_nras_get_band_update_by_plmn_last_caller_id(MRS_SIM_INDEX sim_index);
 
 /**
  * @brief Checks if EN-DC band combination is supported with given LTE/NR bands.
  * @param[in] sim_index SIM index
  * @param[in] lte_band LTE band
- * @param[in] p_nr_band Pointer to NR band, if NULL, any NR band is OK for EN-DC band combination check
+ * @param[in] p_nr_band Pointer to NR band list, 
+ * @param[in] num_of_nr_band Number of NR band in p_nr_band list, if 0, any NR band is OK for EN-DC band combination check
  * @param[in] p_plmn_id_list PLMN Id List is used for band filtering or customization
  * @param[in] gemini_status Gemini status.
  * @return TRUE if EN-DC band combination found, otherwise FALSE.
@@ -549,6 +550,7 @@
     kal_uint8 sim_index,
     kal_uint16 lte_band,
     kal_uint16* p_nr_band,
+    kal_uint8 num_of_nr_band,
     const mrs_plmn_id_list *p_plmn_id_list,
     mrs_gemini_status_enum gemini_status);
 
diff --git a/mcu/protocol/interface/general/vdm_external_lib.h b/mcu/protocol/interface/general/vdm_external_lib.h
index db787a2..21ea456 100755
--- a/mcu/protocol/interface/general/vdm_external_lib.h
+++ b/mcu/protocol/interface/general/vdm_external_lib.h
@@ -375,4 +375,14 @@
  *****************************************************************************/
 kal_bool vdm_external_check_camping_info(protocol_id_enum ps_id,rat_enum rat, kal_bool is_registered);
 
+/******************************************************************************
+ * @brief check current emergency call active domain
+ *        
+ * @param[in] 
+ *
+ * @return kal_bool: vdm_call_domain_enum
+ *
+ *****************************************************************************/
+vdm_call_domain_enum vdm_external_get_emergency_call_ongoing_active_domain();
+
 #endif // _VDM_EXTERNAL_LIB_H_
diff --git a/mcu/protocol/interface/ims/atp_imc_struct.h b/mcu/protocol/interface/ims/atp_imc_struct.h
index 8b756e8..29afb3c 100755
--- a/mcu/protocol/interface/ims/atp_imc_struct.h
+++ b/mcu/protocol/interface/ims/atp_imc_struct.h
@@ -1354,6 +1354,13 @@
     kal_uint32 msd_data_len; 
     kal_uint8  msd_data[IMS_MAX_MSD_LENGTH];
 } atp_imc_msd_update_req_struct;
+
+typedef struct {  
+    LOCAL_PARA_HDR 
+    kal_bool is_success;
+    kal_uint32 cause;   // un-used
+} atp_imc_msd_update_cnf_struct;
+
 #endif
 
 /*
@@ -1630,6 +1637,7 @@
 typedef struct {
     LOCAL_PARA_HDR
     ims_service_request_fail_enum cause;
+    kal_uint8 value;
 } atp_imc_service_request_fail_req_struct;
 
 // SS Interface
diff --git a/mcu/protocol/interface/ims/d2_struct_tmp.h b/mcu/protocol/interface/ims/d2_struct_tmp.h
index a378d6d..b343435 100755
--- a/mcu/protocol/interface/ims/d2_struct_tmp.h
+++ b/mcu/protocol/interface/ims/d2_struct_tmp.h
@@ -4,6 +4,7 @@
 #include "d2cm_struct.h"
 
 #include "d2_d2rm_struct.h"
+#include "d2_netif_struct.h"
 
 
 typedef d2cm_get_pdn_profile_req_struct d2_get_pdn_profile_req_struct;
@@ -64,6 +65,48 @@
     kal_uint32 interface_id;
 } d2_get_if_id_cnf_struct;
 
+// MSG_ID_D2_GET_RESERVED_IF_ID_LIST_REQ
+typedef struct {
+    D2_REQ_LOCAL_PARA_HDR
+
+} d2_get_reserved_if_id_list_req_struct;
+
+// MSG_ID_D2_GET_RESERVED_IF_ID_LIST_CNF
+typedef struct {
+    D2_CNF_LOCAL_PARA_HDR
+
+    kal_uint8 length;
+    kal_bool interface_status[D2_NETIF_MAX_INTERFACE_ID];
+} d2_get_reserved_if_id_list_cnf_struct;
+
+typedef struct {
+    D2_REQ_LOCAL_PARA_HDR
+
+    kal_bool if_state[D2_NETIF_MAX_INTERFACE_ID];
+} d2_set_reserved_if_id_req_struct;
+
+typedef struct {
+    D2_CNF_LOCAL_PARA_HDR
+
+    kal_bool if_state[D2_NETIF_MAX_INTERFACE_ID];
+} d2_set_reserved_if_id_cnf_struct;
+
+// MSG_ID_D2_GET_PS_ID_REQ
+typedef struct {
+    D2_REQ_LOCAL_PARA_HDR
+
+    kal_int32 interface_id;
+} d2_get_ps_id_req_struct;
+
+// MSG_ID_D2_GET_PS_ID_CNF
+typedef struct {
+    D2_CNF_LOCAL_PARA_HDR
+
+    kal_uint8 ps_id;
+    kal_bool result;
+    kal_uint16 transaction_id;
+} d2_get_ps_id_cnf_struct;
+
 typedef struct
 {
     LOCAL_PARA_HDR
diff --git a/mcu/protocol/interface/ims/imcb_imc_struct.h b/mcu/protocol/interface/ims/imcb_imc_struct.h
index 1c5f02f..3fb5502 100755
--- a/mcu/protocol/interface/ims/imcb_imc_struct.h
+++ b/mcu/protocol/interface/ims/imcb_imc_struct.h
@@ -238,6 +238,7 @@
     IMCB_IMC_CALL_MODE_EMER_POISON,
     IMCB_IMC_CALL_MODE_EMER_TRAFFIC,
     IMCB_IMC_CALL_MODE_EMER_COUNTRY_SPECIFIC,
+    IMCB_IMC_CALL_MODE_EMER_EXTENDED_SUB_SERVICE, //for 24.301 9.9.3.37A Extended Emergency Number
     IMCB_IMC_CALL_MODE_EMER_MANUAL_ECALL, // manual initiated ecall
     IMCB_IMC_CALL_MODE_EMER_AUTO_ECALL,   //auto initiated ecall
     IMCB_IMC_CALL_MODE_EMER_UNRECOGNIZED = 99,
@@ -1967,9 +1968,13 @@
     imcf_uint8                      redial_setting; /* ims_stk_setup_call_enum */
     imcf_uint8                      digit_from_line_number[IMC_MAX_URI_LENGTH];
     imcf_uint8                      stk_type;       /* ims_stk_type_enum */
+    imcf_uint8                      pad[3];
+    imcf_uint16                     sub_service_field_length;  /*for emergency extended sub_service*/
+    imcf_uint8                      sub_service_field[IMC_SUB_SERVICE_LENGTH];  /*for emergency extended sub_service*/
 
     /*ecall over IMS*/
 #ifdef __NG_ECALL_SUPPORT__
+    imcf_bool                       ims_only_allowed_domain;
     imcf_uint8                      msd_data_len;
     imcf_uint8                      msd_data[IMS_MAX_MSD_LENGTH];
 #endif
@@ -2401,6 +2406,7 @@
     imcf_int32  acct_id;
     imcf_uint32 call_id;
     imcf_uint32 cause; //imcb_imc_md_lower_layer_err_enum
+    imcf_uint8  value;
     imcf_uint32 type;  //imcb_imc_md_epsfb_type_enum
 } imcb_imc_md_lower_layer_err_ind_struct;
 
@@ -2717,10 +2723,10 @@
     imcf_uint8      cmd_class;      /*< class */
     imcf_uint8      operation;      /*< oper */
     imcf_uint16     action;         /*< action */
-    imcf_uint8      language[IMC_USSD_LANGUANGE_LEN];   /*< language */
+    imcf_uint8      language[IMS_USSD_LANGUANGE_LEN];   /*< language */
     imcf_int16      error_code;     /*< error_code */
     imcf_int16      message_len;   /*< message length */
-    imcf_uint8      message[IMC_USSD_MAX_MSG_LEN];
+    imcf_uint8      message[IMS_USSD_MAX_MSG_LEN];
     imcf_uint8      digit_from_line_number[IMC_MAX_URI_LENGTH];
 } imcb_imc_send_ussd_ind_struct;
 
@@ -2738,10 +2744,10 @@
     imcf_uint8      padding[2];     /*< oper */
     imcf_uint16     status;         /*< status */
     imcf_uint16     sip_cause;      /*< status */
-    imcf_uint8      language[IMC_USSD_LANGUANGE_LEN];   /*< language */
+    imcf_uint8      language[IMS_USSD_LANGUANGE_LEN];   /*< language */
     imcf_int16      error_code;     /*< error_code */
     imcf_int16      message_len;        /*< message length */
-    imcf_uint8      message[IMC_USSD_MAX_MSG_LEN];
+    imcf_uint8      message[IMS_USSD_MAX_MSG_LEN];
 } imcb_imc_recv_ussd_req_struct;
 
 
diff --git a/mcu/protocol/interface/ims/imcb_imsua_struct.h b/mcu/protocol/interface/ims/imcb_imsua_struct.h
index 40495f1..1090191 100755
--- a/mcu/protocol/interface/ims/imcb_imsua_struct.h
+++ b/mcu/protocol/interface/ims/imcb_imsua_struct.h
@@ -418,6 +418,7 @@
     VoLTE_Event_Call_Mode_EMER_POISON,
     VoLTE_Event_Call_Mode_EMER_TRAFFIC,     ///< 91, for CMCC 122, traffic emergency call
     VoLTE_Event_Call_Mode_EMER_COUNTRY_SPECIFIC,
+    VoLTE_Event_Call_Mode_EMER_EXTENDED_SUB_SERVICE, //for 24.301 9.9.3.37A Extended Emergency Number
     VoLTE_Event_Call_Mode_EMER_MANUAL_ECALL,
     VoLTE_Event_Call_Mode_EMER_AUTO_ECALL,
     VoLTE_Event_Call_Mode_EMER_UNRECOGNIZED = 99,  ///< for any unrecognized emergency call by upperlayer
@@ -1024,9 +1025,13 @@
     kal_uint8                                   redial_setting; /*VoLTE_Event_STK_Setup_Call_e*/
     kal_char                                    digit_from_line_number[VOLTE_MAX_URI_LENGTH];
     kal_uint8                                   stk_type;       /*ims_stk_type_enum*/
+    kal_uint8                                   pad[3];
+    kal_uint16                                  sub_service_field_length;  /*for emergency extended sub_service*/
+    kal_uint8                                   sub_service_field[IMC_SUB_SERVICE_LENGTH];  /*for emergency extended sub_service*/
 
 /*ecall over IMS*/
 #ifdef __NG_ECALL_SUPPORT__
+    kal_bool                                    ims_only_allowed_domain;
     kal_uint8                                   msd_data_len;
     kal_uint8                                   msd_data[IMS_MAX_MSD_LENGTH];
 #endif
diff --git a/mcu/protocol/interface/ims/imcsms_imsua_struct.h b/mcu/protocol/interface/ims/imcsms_imsua_struct.h
index d955f2d..343ae02 100755
--- a/mcu/protocol/interface/ims/imcsms_imsua_struct.h
+++ b/mcu/protocol/interface/ims/imcsms_imsua_struct.h
@@ -115,7 +115,7 @@
 typedef struct {
     LOCAL_PARA_HDR
     kal_uint8                    account_id;  // normal SMS or emergency SMS
-    kal_uint8                    request_id;
+    kal_uint16                   request_id;
     kal_uint8                    cb_id;
     imcsms_sms_content_type_enum sms_type;    // 3GPP_SMS or 3GPP2_SMS
     imcsms_sms_data_type_enum    data_type;
@@ -138,7 +138,7 @@
 typedef struct {
     LOCAL_PARA_HDR
     kal_uint8                     account_id;
-    kal_uint8                     request_id;
+    kal_uint16                    request_id;
     imcsms_sms_content_type_enum  sms_type;   // 3GPP_SMS or 3GPP2_SMS
     imcsms_sms_data_type_enum     data_type;
     kal_bool                      result;
@@ -154,7 +154,7 @@
 typedef struct {
     LOCAL_PARA_HDR
     kal_uint8                     account_id;
-    kal_uint8                     request_id;
+    kal_uint16                    request_id;
     kal_uint8                     cb_id;
     imcsms_sms_content_type_enum  sms_type;   // 3GPP_SMS or 3GPP2_SMS
     kal_uint8                     psi[128];
@@ -169,7 +169,7 @@
 typedef struct {
     LOCAL_PARA_HDR
     kal_uint8               account_id;
-    kal_uint8               request_id;
+    kal_uint16              request_id;
     kal_uint8               cb_id;
     kal_uint8               result;
 } imcsms_imsua_recv_sms_rsp_struct;
@@ -183,7 +183,7 @@
 typedef struct {
     LOCAL_PARA_HDR
     kal_uint8        account_id;
-    kal_uint8        request_id;
+    kal_uint16       request_id;
     kal_uint8        cb_id;
 } imcsms_imsua_rel_sms_req_struct;
 
@@ -197,7 +197,7 @@
 typedef struct {
     LOCAL_PARA_HDR
     kal_uint8        account_id;
-    kal_uint8        request_id;
+    kal_uint16       request_id;
     kal_uint8        cause;
     kal_bool         result;
 } imcsms_imsua_recv_sms_error_ind_struct;
@@ -211,7 +211,7 @@
 typedef struct {
     LOCAL_PARA_HDR
     kal_uint8        account_id;    
-    kal_uint8        request_id;
+    kal_uint16       request_id;
 } imcsms_imsua_cs_availability_ind_struct;
 
 /*
@@ -223,7 +223,7 @@
 typedef struct {
     LOCAL_PARA_HDR
     kal_uint8        account_id;
-    kal_uint8        request_id;    
+    kal_uint16       request_id;
     kal_bool         result;
 } imcsms_imsua_cs_availability_cnf_struct;
 
diff --git a/mcu/protocol/interface/ims/ims_common_def.h b/mcu/protocol/interface/ims/ims_common_def.h
index df4338c..ccf2d74 100755
--- a/mcu/protocol/interface/ims/ims_common_def.h
+++ b/mcu/protocol/interface/ims/ims_common_def.h
@@ -898,7 +898,7 @@
 #define VOLTE_MAX_URI_LENGTH                            128
 #define VOLTE_MAX_ASSOCIATED_URI                        (VOLTE_MAX_URI_LENGTH << 2)
 #define VOLTE_MAX_GRUU_LENGTH                           128
-#define VOLTE_MAX_SERVICE_ROUTE_LENGTH                  256
+#define VOLTE_MAX_SERVICE_ROUTE_LENGTH                  512
 #define VOLTE_MAX_TIMESTAMP_LENGTH                      256
 #define VOLTE_MAX_SECURIT_VERIFY_LENGTH                 768 //6 algo combo
 #define VOLTE_MAX_USER_AGENT_LENGTH                     256
@@ -912,7 +912,9 @@
 #define VOLTE_MAX_SDP_FMTP_SUB_VALUE_LENGTH             16
 #define VOLTE_MAX_SDP_EGBYTE_LENGTH                     8
 #define VOLTE_MAX_CNAME_LENGTH                          52
+#define VOLTE_MAX_ERROR_RESPONSE_LIST                   21
 #define VOLTE_MAX_REQUEST_LINE_LENGTH                   512
+#define VOLTE_SUB_SERVICE_LENGTH                        128  //for emergency extended sub_service 
 
 
 /*****imc_general_def.h START*****/
@@ -951,8 +953,6 @@
 #define IMC_CALL_MAX_NUM            16
 #define IMC_P_ASSERT_URI_LEN        128
 #define IMC_PHONE_NUM_LEN           64
-#define IMC_USSD_LANGUANGE_LEN      (32)
-#define IMC_USSD_MAX_MSG_LEN        (1000)
 #define IMC_MAX_SMS_TPDA_LEN        (21)
 #define IMC_MAX_REASON_TEXT_LENGTH  128
 #define IMC_MAX_EMERGENCY_AID_LEN   32
@@ -965,6 +965,8 @@
 #define IMC_IPV6_ADDR_LEN     0x10
 #define IMC_PCSCF_MAX_NUM     10  // PCSCF discovery
 
+#define IMC_SUB_SERVICE_LENGTH       128  //for emergency extended sub_service 
+
 /* C2K */
 #define IMC_MAX_SID_LEN                 8
 #define IMC_MAX_NID_LEN                 8
@@ -1072,7 +1074,7 @@
 #define VOLTE_MAX_PLANI_LENGTH                          (256)
 #define VOLTE_MAX_LEVEL_SIZE                            (20)
 //#define VOLTE_MAX_CNAME_LENGTH                          (52)
-#define VOLTE_USSD_STRING_MAX_LENGTH                    (1000)
+#define VOLTE_USSD_STRING_MAX_LENGTH                    (1500)
 #define VOLTE_USSD_LANGUAGE_MAX_LENGTH                  (32)
 #define VOLTE_MAX_MSISDN_LENGTH                         (20)  // dialing number
 #define VOLTE_MAX_SMS_TPDA_LENGTH                       (21)
@@ -2911,6 +2913,7 @@
     kal_uint64    ua_id;    // reg client information
     kal_uint32    call_id;  // unused
     kal_uint32    cause;    // VoLTE_Event_MD_Lower_Layer_Err_e
+    kal_uint8     value;    // Value
     kal_uint32    type;    // VoLTE_Event_MD_Lower_Layer_TYPE_e
 } VoLTE_Event_MD_Lower_Layer_Err_t;
 
@@ -3310,7 +3313,7 @@
 #define IMS_MAX_CALL_NUM_IN_CONF    5
 #define MAX_SS_NOTIFY_DATA_LEN      512
 
-#define IMS_USSD_MAX_MSG_LEN        (1000)
+#define IMS_USSD_MAX_MSG_LEN        (1500)
 #define IMS_USSD_LANGUANGE_LEN      (32)
 
 typedef enum
@@ -3558,6 +3561,7 @@
     IMS_DEREG_CAUSE_IMS_VOICE_NOT_AVAIL = 6,
     IMS_DEREG_CAUSE_IMS_SIM_NOT_READY = 7,
     IMS_DRREG_CAUSE_CAUSE_IGNORE_CHANGE = 8,
+    IMS_DEREG_CAUSE_ERAT = 11,
     IMS_DEREG_CAUSE_MAX
 }ims_dereg_cause_enum;
 
@@ -3709,7 +3713,9 @@
     SC_POISON                           = (1<<11),
     SC_TRAFFIC                          = (1<<12),
     SC_COUNTRY_SPECIFIC                 = (1<<13),
-    SC_UNRECOGNIZED                     = (1<<14),
+	SC_EXTENDED_SUB_SERVICE             = (1<<14),
+    SC_UNRECOGNIZED                     = (1<<15),
+
     /*Korea TTA special emergency category */
     SC_TTA_SPIES                        = 0x3,
     SC_TTA_INTELLIGENCE                 = 0x6,
diff --git a/mcu/protocol/interface/ims/ims_stack_struct.h b/mcu/protocol/interface/ims/ims_stack_struct.h
index c533b2c..dc284e9 100755
--- a/mcu/protocol/interface/ims/ims_stack_struct.h
+++ b/mcu/protocol/interface/ims/ims_stack_struct.h
@@ -787,6 +787,8 @@
     char                            stop_err_resp_retx_when_not_needed;
 
     unsigned int                    ignore_missing_sip_headers;
+
+    char                            ignore_remote_ip_filter;
 } VoLTE_Stack_Ua_Info_t;
 
 typedef struct _VoLTE_Stack_Server_Info {
@@ -915,6 +917,29 @@
     VoLTE_Event_List_one_call_t         call[VOLTE_MAX_CALL_SESSION];
 } VoLTE_Event_List_Current_Call_To_Stack_t;
 
+/* If you need to modify VoLTE_Event_Reg_State_Ap_t IF please check/sync issue with AP side RCS owner. This data structure
+ * needs to be similar in AP side as well.
+ */
+
+
+#define VOLTE_MAX_ADDRESS_AP_LENGTH                        64
+#define VOLTE_MAX_REG_UID_AP_LENGTH                        256
+#define VOLTE_MAX_DOMAIN_NAME_AP_LENGTH                    256
+#define VOLTE_MAX_ADDRESS_LIST_AP_LENGTH                   256
+#define VOLTE_MAX_IMEI_AP_LENGTH                           20
+#define VOLTE_MAX_GRUU_AP_LENGTH                           128
+#define VOLTE_MAX_SERVICE_ROUTE_AP_LENGTH                  256
+#define VOLTE_MAX_TIMESTAMP_AP_LENGTH                      256
+#define VOLTE_MAX_USER_AGENT_AP_LENGTH                     256
+#define VOLTE_MAX_URI_AP_LENGTH                            128
+#define VOLTE_MAX_ASSOCIATED_URI_AP_LENGTH                 (VOLTE_MAX_URI_AP_LENGTH << 2)
+#define VOLTE_MAX_P_ACCESS_NETWORK_INFO_AP_LENGTH          256
+#define VOLTE_MAX_DIGIT_PIDENTIFIER_AP_LENGTH              256
+#define VOLTE_MAX_DIGIT_PPA_AP_LENGTH                      4096
+#define VOLTE_MAX_TIME_STAMP_AP_LENGTH                     32
+#define VOLTE_MAX_SECURIT_VERIFY_AP_LENGTH                 768 //6 algo combo
+
+
 typedef struct _VoLTE_Event_Reg_State_Ap_ {
     kal_int32                       id;                                                     // account id
     kal_int32                       state;                                                  // refer to ::VoLTE_Event_Reg_State_e
@@ -923,36 +948,36 @@
 
     kal_uint32                      conn_info;                                              // connection information for the others UA to create the connection
     /* account information */
-    kal_char                        local_address[VOLTE_MAX_ADDRESS_LENGTH];                // local ip address
+    kal_char                        local_address[VOLTE_MAX_ADDRESS_AP_LENGTH];                // local ip address
     kal_int32                       local_port;                                             // local port number
     kal_int32                       protocol_type;                                          // refer to ::VoLTE_Stack_Protocol_Type_e
     kal_int32                       protocol_version;                                       // refer to ::VoLTE_Stack_Protocol_Version_e
-    kal_char                        public_uid[VOLTE_MAX_REG_UID_LENGTH];                   // public user identity
-    kal_char                        private_uid[VOLTE_MAX_REG_UID_LENGTH];                  // private user identity
-    kal_char                        home_uri[VOLTE_MAX_DOMAIN_NAME_LENGTH];                 // domain name of the home network
-    kal_char                        pcscf_address[VOLTE_MAX_ADDRESS_LIST_LENGTH];           // current used PCSCF ip address
+    kal_char                        public_uid[VOLTE_MAX_REG_UID_AP_LENGTH];                // public user identity
+    kal_char                        private_uid[VOLTE_MAX_REG_UID_AP_LENGTH];               // private user identity
+    kal_char                        home_uri[VOLTE_MAX_DOMAIN_NAME_AP_LENGTH];                 // domain name of the home network
+    kal_char                        pcscf_address[VOLTE_MAX_ADDRESS_LIST_AP_LENGTH];           // current used PCSCF ip address
     kal_int32                       pcscf_port;                                             // current used PCSCF port number
-    kal_char                        imei[VOLTE_MAX_IMEI_LENGTH];                            // IMEI
-    kal_char                        associated_uri[VOLTE_MAX_ASSOCIATED_URI];               // list of the associated URI
-    kal_char                        pub_gruu[VOLTE_MAX_GRUU_LENGTH];                        // public gruu
-    kal_char                        temp_gruu[VOLTE_MAX_GRUU_LENGTH];                       // temp gruu
-    kal_char                        service_route[VOLTE_MAX_SERVICE_ROUTE_LENGTH];          // service route
-    kal_char                        path[VOLTE_MAX_URI_LENGTH];                             // path
+    kal_char                        imei[VOLTE_MAX_IMEI_AP_LENGTH];                            // IMEI
+    kal_char                        associated_uri[VOLTE_MAX_ASSOCIATED_URI_AP_LENGTH];     // list of the associated URI
+    kal_char                        pub_gruu[VOLTE_MAX_GRUU_AP_LENGTH];                        // public gruu
+    kal_char                        temp_gruu[VOLTE_MAX_GRUU_AP_LENGTH];                       // temp gruu
+    kal_char                        service_route[VOLTE_MAX_SERVICE_ROUTE_AP_LENGTH];       // service route for AP side
+    kal_char                        path[VOLTE_MAX_URI_AP_LENGTH];                             // path
     kal_int32                       target_port_s;                                          // target_port_s
     kal_int32                       net_type;                                               // refer to ::VoLTE_Event_Network_Type_e
     kal_int32                       net_type_3gpp;                                          // refer to ::VoLTE_Event_Network_Type_e
     kal_int32                       emergency_type;                                         // refer to ::VoLTE_Event_Emergency_Type_e
     kal_int32                       ems_mode;                                               // refer to ::VoLTE_Event_Ems_Mode_e
     kal_int32                       retry_after;                                            // notify time delay for IMC retrying initial registration
-    kal_char                        reg_timestamp[VOLTE_MAX_TIMESTAMP_LENGTH];              // TMO P-Last-Access-Network-Info "REGISTRATION TIMESTAMP"
-    kal_char                        security_verify[VOLTE_MAX_SECURIT_VERIFY_LENGTH];       // security verify header in All the subsequent SIP requests
-    kal_char                        user_agent[VOLTE_MAX_USER_AGENT_LENGTH];                // user-agent header for RCS usage
+    kal_char                        reg_timestamp[VOLTE_MAX_TIMESTAMP_AP_LENGTH];              // TMO P-Last-Access-Network-Info "REGISTRATION TIMESTAMP"
+    kal_char                        security_verify[VOLTE_MAX_SECURIT_VERIFY_AP_LENGTH];       // security verify header in All the subsequent SIP requests
+    kal_char                        user_agent[VOLTE_MAX_USER_AGENT_AP_LENGTH];                // user-agent header for RCS usage
     kal_int32                       reg_uri_type;                                           // todo: define enum for imsi and msisdn uri
-    kal_char                        msisdn_uri[VOLTE_MAX_REG_UID_LENGTH];
+    kal_char                        msisdn_uri[VOLTE_MAX_REG_UID_AP_LENGTH];
 
     /* em related variables */
-    kal_uint8                       em_reg_timestamp[VOLTE_MAX_TIME_STAMP_LENGTH];          // last registered timestamp in milliseconds
-    kal_char                        instance_id[VOLTE_MAX_URI_LENGTH];                      // instance id
+    kal_uint8                       em_reg_timestamp[VOLTE_MAX_TIME_STAMP_AP_LENGTH];          // last registered timestamp in milliseconds
+    kal_char                        instance_id[VOLTE_MAX_URI_AP_LENGTH];                      // instance id
 
     kal_char                        pcscf_usage;                                            // refer to VoLTE_PCSCF_Usage_e
     kal_char                        release_pdn;
@@ -967,16 +992,16 @@
 
     kal_int32                       reg_service;                                            // refer to ::VoLTE_Event_reg_service_e
     kal_int32                       via_rport;                                              // Via rport
-    kal_char                        via_received[VOLTE_MAX_ADDRESS_LENGTH];                 // Via received parameter
+    kal_char                        via_received[VOLTE_MAX_ADDRESS_AP_LENGTH];                 // Via received parameter
 
     kal_char                        emergency_reg_got_error;
     kal_char                        sms_cap;
     kal_char                        subscribe_dialog_to_server;                             // subscription to the conference event package
     kal_char                        digit_number_of_vline;
 
-    kal_char                        pani[VOLTE_MAX_P_ACCESS_NETWORK_INFO_LENGTH];           // P-Acess-Network-Info header for RCS usage
-    kal_char                        digit_pidentifier[VOLTE_MAX_DIGIT_PIDENTIFIER_LENGTH];  // 3.6.8.1 Also include following: (Mandatory) ID: GID-MTRREQ-302326
-    kal_char                        digit_ppa_header_string[VOLTE_MAX_DIGIT_PPA_LENGTH];    // PPA for all the lines
+    kal_char                        pani[VOLTE_MAX_P_ACCESS_NETWORK_INFO_AP_LENGTH];           // P-Acess-Network-Info header for RCS usage
+    kal_char                        digit_pidentifier[VOLTE_MAX_DIGIT_PIDENTIFIER_AP_LENGTH];  // 3.6.8.1 Also include following: (Mandatory) ID: GID-MTRREQ-302326
+    kal_char                        digit_ppa_header_string[VOLTE_MAX_DIGIT_PPA_AP_LENGTH];    // PPA for all the lines
 
     kal_int32                       reg_event;                                              // refer to ::VoLTE_Event_reg_event_e
 } VoLTE_Event_Reg_State_Ap_t;
@@ -1213,6 +1238,19 @@
     kal_uint64                   ua_id;  // reg client information
 } VoLTE_Event_ACB_Skip_Info_t;
 
+typedef struct {
+    kal_uint16                   error_code;
+    kal_uint8                    max_retry_count;
+    kal_uint8                    had_retry_count;
+    kal_uint8                    rfc5626_count;
+} VoLTE_Event_Reg_Custom_Retry_t;
+
+typedef struct {
+    VoLTE_Event_Reg_Custom_Retry_t custom_retry[VOLTE_MAX_ERROR_RESPONSE_LIST];
+    kal_uint8                      others_err_rsp_retry_count;
+    kal_uint8                      rfc5626_count;
+} VoLTE_Event_Reg_Err_Rsp_List_t;
+
 /**
  *  @brief inter-task request struct declaraction
  */
@@ -1277,6 +1315,7 @@
     char                icd_decrypt_dump;
     char                stop_err_resp_retx_when_not_needed;
     unsigned int        ignore_missing_sip_headers;
+    char                ignore_remote_ip_filter;
 } siptx_req_create_conn_struct;
 
 /**
diff --git a/mcu/protocol/interface/ims/vdm_imc_struct.h b/mcu/protocol/interface/ims/vdm_imc_struct.h
index 4f2621b..b88527a 100755
--- a/mcu/protocol/interface/ims/vdm_imc_struct.h
+++ b/mcu/protocol/interface/ims/vdm_imc_struct.h
@@ -412,9 +412,12 @@
     kal_uint8                   digit_from_line_number[IMC_MAX_URI_LENGTH];
     kal_uint8                   rtt_setting;
 #if defined(__ECALL_SUPPORT__) || defined(__NG_ECALL_SUPPORT__)
+    kal_bool                    ims_only_allowed_domain;
     kal_uint8                   msd_data_len;
     kal_uint8                   msd_data[MAX_MSD_LENGTH];
 #endif
+	kal_uint16					sub_service_field_length;
+	kal_uint8					sub_service_field[IMC_SUB_SERVICE_LENGTH];
 } vdm_imc_ims_cc_mo_call_req_struct;
 
 typedef struct
diff --git a/mcu/protocol/interface/l4/nas_sv_struct.h b/mcu/protocol/interface/l4/nas_sv_struct.h
index 3d0c9e7..9884921 100755
--- a/mcu/protocol/interface/l4/nas_sv_struct.h
+++ b/mcu/protocol/interface/l4/nas_sv_struct.h
@@ -75,6 +75,7 @@
 #include "l3_inc_enums_public.h"
 #include "ims_interface_md.h"
 #include "ps_public_struct.h"
+#include "sim_ps_struct.h"
 
 
 #define MAX_SEARCH_BAND_LIST_SIZE 32
@@ -252,6 +253,7 @@
                                                   * bit of selected PLMN in PLMN-InfoList-r15 from SIB2 is TRUE. 
                                                   */
     kal_bool                    endc_available;  /* "endc_available" wil be set to TRUE if any bit in PLMN-InfoList-r15 from SIB2 is TRUE */
+    kal_bool                    endc_band_ue_supported; /* TRUE: UE support at least 1 ENDC combo with attached LTE cell band */
 } nas_sv_emm_sys_info_update_ind_struct;
 
 typedef struct {
@@ -309,6 +311,10 @@
     irat_reject_cause_enum irat_reject_cause;
 } nas_sv_mm_rat_change_cnf_struct;
 
+#if defined(__ECALL_SUPPORT__) || defined(__NG_ECALL_SUPPORT__)
+/** [MT2735][WNC] ILM: MSG_ID_SIM_NAS_SV_ECALL_MODE_SWITCH_IND which will carry changed ecall mode information */
+typedef sim_nas_sv_set_ecall_mode_ind_struct nas_sv_any_update_ecall_mode_change_ind_struct;
+#endif
 
 typedef struct {
     LOCAL_PARA_HDR
diff --git a/mcu/protocol/interface/l4/vdm_l4c_struct.h b/mcu/protocol/interface/l4/vdm_l4c_struct.h
index 9975b43..471de1e 100755
--- a/mcu/protocol/interface/l4/vdm_l4c_struct.h
+++ b/mcu/protocol/interface/l4/vdm_l4c_struct.h
@@ -451,6 +451,7 @@
 {
     LOCAL_PARA_HDR
     rat_enum                        rat;
+    rat_enum                        reported_rat;
 } vdm_l4c_rat_mode_ind_struct;
 
 /******************************************************************************
diff --git a/mcu/protocol/interface/l4misc/l3_inc_local.h b/mcu/protocol/interface/l4misc/l3_inc_local.h
index fe07b38..975bf0f 100755
--- a/mcu/protocol/interface/l4misc/l3_inc_local.h
+++ b/mcu/protocol/interface/l4misc/l3_inc_local.h
@@ -639,6 +639,7 @@
                                             * bit of selected PLMN in PLMN-InfoList-r15 from SIB2 is TRUE. 
                                             */
     kal_bool   endc_available;             /* "endc_available" wil be set to TRUE if any bit in PLMN-InfoList-r15 from SIB2 is TRUE */
+ 	kal_bool   endc_band_ue_supported;     /* TRUE: UE support at least 1 ENDC combo with attached LTE cell band */
 #ifdef __NG_ECALL_SUPPORT__
     kal_bool ecall_over_ims_support;
 #endif /* __NG_ECALL_SUPPORT__ */
diff --git a/mcu/protocol/interface/l4misc/l4_trc_mod_l4c_utmd.json b/mcu/protocol/interface/l4misc/l4_trc_mod_l4c_utmd.json
index 3de4078..9c7f4fc 100755
--- a/mcu/protocol/interface/l4misc/l4_trc_mod_l4c_utmd.json
+++ b/mcu/protocol/interface/l4misc/l4_trc_mod_l4c_utmd.json
@@ -5139,6 +5139,13 @@
         "format": "l4c DRB state change %d -> %d, report_mode: %d(rat bitmask)",
         "traceClass": "TRACE_INFO"
       }
+    },
+    {
+      "L4C_NW_SKIP_DUPLICATE_CSCON": {
+        "apiType": "index",
+        "format": "[L4C_NW] skip duplicate CSCON !!",
+        "traceClass": "TRACE_INFO"
+      }
     }
   ],
   "traceFamily": "PS",
diff --git a/mcu/protocol/interface/l4misc/l4c_eq_cmd.h b/mcu/protocol/interface/l4misc/l4c_eq_cmd.h
index 68fc8f1..632d16a 100755
--- a/mcu/protocol/interface/l4misc/l4c_eq_cmd.h
+++ b/mcu/protocol/interface/l4misc/l4c_eq_cmd.h
@@ -23,7 +23,7 @@
 *  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. 
+*  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
@@ -87,7 +87,7 @@
  *
  * removed!
  * removed!
- * removed!
+ *
  * removed!
  *
  * removed!
@@ -102,12 +102,12 @@
  *
  * removed!
  * removed!
- * removed!
+ *
  * removed!
  *
  * removed!
  * removed!
- * removed!
+ *
  * removed!
  *
  * removed!
@@ -115,12 +115,12 @@
  *
  * removed!
  * removed!
- * removed!
+ *
  * removed!
  *
  * removed!
  * removed!
- * removed!
+ *
  * removed!
  *
  * removed!
@@ -161,11 +161,11 @@
  * removed!
  * removed!
  * removed!
- * removed!
- * removed!
+ *
  * removed!
  * removed!
  * removed!
+ *
  * removed!
  * removed!
  * removed!
@@ -272,83 +272,83 @@
  *
  * removed!
  * removed!
- * removed!
  *
- * removed!
+ *
  * removed!
  * removed!
  *
+ *
  * removed!
  * removed!
  * removed!
  *
  * removed!
  * removed!
- * removed!
  *
- * removed!
+ *
  * removed!
  * removed!
  *
+ *
  * removed!
  * removed!
  * removed!
  *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
- * removed!
  *
- * removed!
+ *
  * removed!
  * removed!
  *
+ *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
- * removed!
  *
- * removed!
+ *
  * removed!
  * removed!
  *
+ *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
- * removed!
  *
- * removed!
+ *
  * removed!
  * removed!
  *
+ *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
- * removed!
  *
- * removed!
+ *
  * removed!
  * removed!
  *
+ *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
@@ -356,8 +356,8 @@
  *
  * removed!
  * removed!
- * removed!
  *
+ *
  * removed!
  * removed!
  * removed!
@@ -380,47 +380,47 @@
  *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
- * removed!
  *
- * removed!
+ *
  * removed!
  * removed!
  *
+ *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
- * removed!
  *
- * removed!
+ *
  * removed!
  * removed!
  *
+ *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
- * removed!
  *
- * removed!
+ *
  * removed!
  * removed!
  *
+ *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
@@ -428,19 +428,19 @@
  *
  * removed!
  * removed!
- * removed!
  *
+ *
  * removed!
  * removed!
  * removed!
  *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
@@ -448,15 +448,15 @@
  *
  * removed!
  * removed!
- * removed!
  *
+ *
  * removed!
  * removed!
  * removed!
  *
  * removed!
  * removed!
- * removed!
+ *
  *
  * removed!
  * removed!
@@ -468,24 +468,24 @@
  *
  * 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!!
  *==============================================================================
@@ -512,7 +512,7 @@
 #endif
 
 #ifdef __TC01__
-typedef enum 
+typedef enum
 {
     FACTEST_LCD_INITIAL = 0,
 	FACTEST_LCD_CONTRAST,
@@ -534,9 +534,9 @@
 
 extern kal_bool l4c_eq_full_para_audio_play_req(kal_uint8 src_id,
                                                 kal_uint8 sound_id,
-                                                kal_uint8 style, 
-                                                kal_uint16 identifier, 
-                                                kal_uint8 volume, 
+                                                kal_uint8 style,
+                                                kal_uint16 identifier,
+                                                kal_uint8 volume,
                                                 kal_uint8 out_path);
 
 extern kal_bool l4c_eq_audio_play_by_name_req(
@@ -760,7 +760,7 @@
 extern kal_bool l4c_eq_irda_open_req(kal_uint16 wait_duration);
 
 extern kal_bool l4c_eq_irda_close_req(void);
-#endif /* __IRDA_SUPPORT__ */ 
+#endif /* __IRDA_SUPPORT__ */
 
 extern kal_bool l4c_eq_set_ms_sn_req(kal_uint8 src_id, kal_uint8 *data, kal_uint8 length);
 
@@ -852,16 +852,16 @@
 
 extern void l4c_eq_query_cal_data_dl_status_req(kal_uint8 src_id);
 
-extern kal_bool l4c_med_in_proc_call_req(l4c_source_id_enum src_id, 
+extern kal_bool l4c_med_in_proc_call_req(l4c_source_id_enum src_id,
                                          kal_uint16 cmd_id,
-                                         void *cmd_info, 
+                                         void *cmd_info,
                                          kal_uint16 size_of_info);
 
 extern void l4c_med_in_epof_req(void);
 extern void l4c_power_off_notify_others(void);
 
 #ifdef __LTE_RAT__
-extern kal_bool l4c_eq_rx_rssi_verify_req(kal_uint16 band, kal_uint32 dl_earfcn);
+extern kal_bool l4c_eq_rx_rssi_verify_req(kal_uint16 band, kal_uint32 dl_earfcn, kal_uint8 dl_bandwidth);
 extern kal_bool l4c_eq_rf_test_lte_req(kal_uint8 src_id, kal_uint8 request_type, EL1_EM_TSTCmd_ForceTxPwr_T *request);
 extern kal_bool l4cel1_send_b3_info_req(kal_uint8 src_id, kal_uint8 type, kal_uint8 index, kal_uint16 arfcn, kal_int16 rssi);
 
@@ -870,8 +870,8 @@
 extern void l4c_set_dynamic_sim_switch();
 extern void l4c_set_reconfig_req(protocol_id_enum ps_sim_id);
 
-extern kal_bool l4c_eq_txrx_active_time_req(l4c_source_id_enum src_id); 
-extern kal_bool l4c_eq_c2k_rf_test_req(l4c_source_id_enum src_id,kal_uint8 mode, 
+extern kal_bool l4c_eq_txrx_active_time_req(l4c_source_id_enum src_id);
+extern kal_bool l4c_eq_c2k_rf_test_req(l4c_source_id_enum src_id,kal_uint8 mode,
                                        kal_uint8 band, kal_uint8 powerLevel, kal_uint16 channel,
                                        kal_uint8 reductionLevel_Ant0, kal_uint8 reductionLevel_Ant1);
 extern void l4c_send_volte_reconfigure_req(kal_uint8 type);
diff --git a/mcu/protocol/interface/l4misc/l4c_sim_cmd.h b/mcu/protocol/interface/l4misc/l4c_sim_cmd.h
index 74e0966..c8cbdae 100755
--- a/mcu/protocol/interface/l4misc/l4c_sim_cmd.h
+++ b/mcu/protocol/interface/l4misc/l4c_sim_cmd.h
@@ -387,7 +387,7 @@
 extern void l4c_sim_send_rsim_aka_status_req(void);
 #endif
 #ifdef __FAKEID_SUPPORT__
-extern kal_bool l4c_sim_fake_id_req(kal_uint8 *mcc_str, kal_uint8 *mnc_str, kal_uint8 *msin_str);
+extern kal_bool l4c_sim_fake_id_req(kal_uint8 *mcc_str, kal_uint8 *mnc_str, kal_uint8 *msin_str, kal_uint8 *gid1_str);
 #endif
 
 extern kal_bool l4c_smu_sml_get_lock_codes_req(kal_uint8 src_id);
diff --git a/mcu/protocol/interface/l4misc/l4c_utility.h b/mcu/protocol/interface/l4misc/l4c_utility.h
index fe11356..26b06d5 100755
--- a/mcu/protocol/interface/l4misc/l4c_utility.h
+++ b/mcu/protocol/interface/l4misc/l4c_utility.h
@@ -873,6 +873,8 @@
 
 extern void l4c_sim_free_sim_parameter(void);
 
+extern void l4c_find_sms_da_for_mo_sms(peer_buff_struct *peer_buff_ptr, kal_uint8 *length, kal_uint8 *type_of_address, kal_uint8 *da_info);
+
 extern kal_bool l4c_find_sms_category_for_mt_sms(peer_buff_struct *peer_buff_ptr);
 extern kal_bool l4c_find_sms_category_for_mo_sms(peer_buff_struct *peer_buff_ptr);
 extern kal_bool l4c_find_sms_category_for_cmss(peer_buff_struct *peer_buff_ptr);
@@ -999,7 +1001,7 @@
 extern kal_bool l4c_check_rat_mode_save_to_nvram(kal_uint8 src_id);
 extern kal_bool l4c_nw_get_rat_mode_save_to_nvram_statues(void);
 extern void l4c_update_rfoff_cnf_context();
-extern kal_bool l4c_nw_check_rat_change_needed();
+extern kal_bool l4c_nw_check_rat_change_needed_for_kddi(kal_uint8 *plmn, rat_enum* changed_rat);
 extern void l4c_lte_only_timeout_hdlr(void);
 extern void l4c_stop_lte_rat_mode_change_timer_hdlr(void);
 extern void l4c_start_lte_rat_mode_change_timer_hdlr(void);
@@ -1075,6 +1077,9 @@
 extern kal_bool l4c_is_call_ongoing_over_wifi();
 extern kal_bool l4c_is_vzw_private_uicc(kal_uint8 ps_id);
 extern void l4c_set_is_vzw_private_uicc();
+
+extern kal_bool l4c_check_emergency_call_exists(void);
 extern kal_bool l4c_get_is_in_reattach_procedure (protocol_id_enum ps_id);
 
 #endif /* _L4C_UTILITY_H */ /* l4c_utility.h */
+extern kal_bool l4c_abort_ss_retry_if_ims_call_ongoing();
diff --git a/mcu/protocol/interface/l4misc/rmmi_context.h b/mcu/protocol/interface/l4misc/rmmi_context.h
index b141afa..57d9c1f 100755
--- a/mcu/protocol/interface/l4misc/rmmi_context.h
+++ b/mcu/protocol/interface/l4misc/rmmi_context.h
@@ -1143,6 +1143,11 @@
     kal_uint8 is_acb_skip_for_mmtel_voice;
     kal_bool is_acb_skip_for_mmtel_video;
 
+    /* For CSCON duplicate detection */
+    rmmi_cscon_mode_enum last_cscon_mode;
+    rmmi_cscon_state_enum last_cscon_state;
+    rmmi_cscon_access_enum last_cscon_access;
+    rmmi_cscon_core_network_enum last_cscon_core_network;
 } rmmi_context_struct;
 
 typedef struct rmmi_string_struct
diff --git a/mcu/protocol/interface/l4misc/vdm_atp_enums.h b/mcu/protocol/interface/l4misc/vdm_atp_enums.h
index 4ad72a0..a7c1d67 100755
--- a/mcu/protocol/interface/l4misc/vdm_atp_enums.h
+++ b/mcu/protocol/interface/l4misc/vdm_atp_enums.h
@@ -140,7 +140,8 @@
     VDM_ADS_MODE_3GPP_ONLY,         // LTE(IMS), WG(CS)
     VDM_ADS_MODE_3GPP2_ONLY,        // 1x(C2K)
     VDM_ADS_MODE_IMS_1xCS_ONLY,     // LTE(IMS), 1x(C2K)
-    VDM_ADS_MODE_WGCS_1xCS_ONLY     // WG(CS), 1x(C2K)
+    VDM_ADS_MODE_WGCS_1xCS_ONLY,    // WG(CS), 1x(C2K)
+    VDM_ADS_MODE_IMS_ONLY           //LTE(IMS), NR(IMS)
 } vdm_ads_mode_enum;
 
 typedef enum 
diff --git a/mcu/protocol/interface/l4misc/vdm_atp_struct.h b/mcu/protocol/interface/l4misc/vdm_atp_struct.h
index 1189729..baa942c 100755
--- a/mcu/protocol/interface/l4misc/vdm_atp_struct.h
+++ b/mcu/protocol/interface/l4misc/vdm_atp_struct.h
@@ -1361,6 +1361,8 @@
     LOCAL_PARA_HDR
     kal_uint16                   emergency_service_category;
     atp_cmd_mode_enum            cmd_mode;
+    kal_uint16                   sub_service_field_length;
+    kal_uint8                    sub_service_field[IMC_SUB_SERVICE_LENGTH];
 } vdm_atp_cmd_emerg_serv_cat_ind_struct;
 
 typedef struct
diff --git a/mcu/protocol/interface/lte/l4c_eval_struct.h b/mcu/protocol/interface/lte/l4c_eval_struct.h
index 70b46f8..68910f5 100755
--- a/mcu/protocol/interface/lte/l4c_eval_struct.h
+++ b/mcu/protocol/interface/lte/l4c_eval_struct.h
@@ -592,6 +592,7 @@
 {
     LOCAL_PARA_HDR
     sr_failure_cause_enum  failure_cause;
+    kal_uint32  wait_time;
 } l4c_eval_sr_failure_ind_struct;
 
 typedef struct
diff --git a/mcu/protocol/interface/lte/nwsel_eval_struct.h b/mcu/protocol/interface/lte/nwsel_eval_struct.h
index 5a64da7..c20c771 100755
--- a/mcu/protocol/interface/lte/nwsel_eval_struct.h
+++ b/mcu/protocol/interface/lte/nwsel_eval_struct.h
@@ -581,7 +581,8 @@
     endc_sib_status_enum        endc_sib_status; /* "endc_sib_status" will be set to "ENDC_SIB_STATUS_SUPPORT" if the corresponding 
                                                   * bit of selected PLMN in PLMN-InfoList-r15 from SIB2 is TRUE. 
                                                   */
-    kal_bool                    endc_available;  /* "endc_available" wil be set to TRUE if any bit in PLMN-InfoList-r15 from SIB2 is TRUE */
+    kal_bool                    endc_available;  /* "endc_available" wil be set to TRUE if any bit in PLMN-InfoList-r15 from SIB2 is TRUE */                 
+    kal_bool                    endc_band_ue_supported;  /* TRUE: UE support at least 1 ENDC combo with attached LTE cell band */
 #ifdef __NG_ECALL_SUPPORT__
     kal_bool                    ecall_over_ims_support;
 #endif            
diff --git a/mcu/protocol/layer4/l4/atci/include/rmmi_analyzer.h b/mcu/protocol/layer4/l4/atci/include/rmmi_analyzer.h
index 41a483a..f4337ea 100755
--- a/mcu/protocol/layer4/l4/atci/include/rmmi_analyzer.h
+++ b/mcu/protocol/layer4/l4/atci/include/rmmi_analyzer.h
@@ -99,6 +99,7 @@
 #ifdef __HIF_CCISM_SCP_SUPPORT__
 extern void rmmi_scp_command_analyzer(kal_uint16 length, kal_uint8 *buffer);
 #endif
+extern kal_bool rmmi_sms_ignore_semicolon_in_split(kal_char *at_str, kal_uint16 len);
 
 #endif /* _RMMI_ANALYZER_H */
 
diff --git a/mcu/protocol/layer4/l4/atci/include/rmmi_ind.h b/mcu/protocol/layer4/l4/atci/include/rmmi_ind.h
index 845c3f6..5a469e2 100755
--- a/mcu/protocol/layer4/l4/atci/include/rmmi_ind.h
+++ b/mcu/protocol/layer4/l4/atci/include/rmmi_ind.h
@@ -602,9 +602,10 @@
                                         kal_uint8 *carrier_id);
 
 extern void l4c_nw_1x_conn_status_rind(kal_bool is_cs_conn_start);
+
+extern void l4c_sr_failure_rind(sr_failure_cause_enum failure_cause, kal_uint32  wait_time);
 #ifdef __LTE_RAT__
 extern void l4c_eval_tau_failure_rind(tau_failure_cause_enum failure_cause);
-extern void l4c_eval_sr_failure_rind(sr_failure_cause_enum failure_cause);
 extern void l4c_ca_info_rind(rmmi_ca_info_struct *ecainfo);
 #endif
 
diff --git a/mcu/protocol/layer4/l4/include/l4c_context.h b/mcu/protocol/layer4/l4/include/l4c_context.h
index fa93890..efe357f 100755
--- a/mcu/protocol/layer4/l4/include/l4c_context.h
+++ b/mcu/protocol/layer4/l4/include/l4c_context.h
@@ -1479,6 +1479,7 @@
     kal_uint8 internet_cid;
     kal_bool is_vzw_private_uicc;
 	kal_bool is_in_reattach_procedure;
+	ss_string_op ss_operation;
 } l4c_context_struct;
 
 
diff --git a/mcu/protocol/layer4/l4/l4c/include/proc/l4c_nw_cmd.h b/mcu/protocol/layer4/l4/l4c/include/proc/l4c_nw_cmd.h
index d44012a..d1e4c61 100755
--- a/mcu/protocol/layer4/l4/l4c/include/proc/l4c_nw_cmd.h
+++ b/mcu/protocol/layer4/l4/l4c/include/proc/l4c_nw_cmd.h
@@ -217,6 +217,10 @@
 
 extern kal_bool l4c_nw_set_rat_mode_req(kal_uint8 src_id, rat_enum rat_mode);
 
+extern kal_bool l4c_nw_check_set_rat_mode_can_be_process(kal_uint8 src_id, rat_enum rat_mode, kal_bool need_enqueue);
+
+extern void l4c_nw_process_set_rat_mode(kal_uint8 src_id, rat_enum rat_mode);
+
 #ifdef __TC01__
 extern kal_bool l4c_nw_set_rat_mode_ext_req(kal_uint8 src_id, rat_enum rat_mode, rat_enum prefer_rat, kal_bool force_send_RAT);
 #else
diff --git a/mcu/protocol/layer4/l4/l4c/include/proc/l4c_vdm_snd.h b/mcu/protocol/layer4/l4/l4c/include/proc/l4c_vdm_snd.h
index f99d37f..e363623 100755
--- a/mcu/protocol/layer4/l4/l4c/include/proc/l4c_vdm_snd.h
+++ b/mcu/protocol/layer4/l4/l4c/include/proc/l4c_vdm_snd.h
@@ -105,7 +105,7 @@
 
 extern void l4c_vdm_ims_domain_preference_ind(rat_enum rat, kal_uint8 type, hvolte_mode_change_cause_enum cause);
 
-extern void l4c_vdm_rat_mode_ind(rat_enum rat_mode);
+extern void l4c_vdm_rat_mode_ind(rat_enum rat_mode, rat_enum reported_rat_mode);
 
 extern void l4c_vdm_irat_start_ind(void);
 
diff --git a/mcu/protocol/layer4/l4/smsal/include/smsal_trc_mod_smsal_utmd.json b/mcu/protocol/layer4/l4/smsal/include/smsal_trc_mod_smsal_utmd.json
index f4c1d5f..f798ecb 100755
--- a/mcu/protocol/layer4/l4/smsal/include/smsal_trc_mod_smsal_utmd.json
+++ b/mcu/protocol/layer4/l4/smsal/include/smsal_trc_mod_smsal_utmd.json
@@ -1704,6 +1704,13 @@
       }
     },
     {
+      "INFO_IS_SMS_TP_RD_SET_FOR_STK_SMS": {
+        "apiType": "index", 
+        "format": "SMSAL: Is sms TP RD bit set for STK SMS=%Mkal_bool", 
+        "traceClass": "TRACE_INFO"
+      }
+    },
+    {
       "INFO_SMSAL_RATCM_CB_DUP_DET_TIMER_STOP_IND": {
         "apiType": "index", 
         "format": "SMSAL: Indication to stop dup_det timer for message id = %d , serial number = %d", 
diff --git a/mcu/protocol/layer4/sim/include/sim_private_api.h b/mcu/protocol/layer4/sim/include/sim_private_api.h
index 625eb10..ceebeb8 100755
--- a/mcu/protocol/layer4/sim/include/sim_private_api.h
+++ b/mcu/protocol/layer4/sim/include/sim_private_api.h
@@ -1025,6 +1025,8 @@
 #define USIM_CURRENT_FILE_TYPE_QUERY(channel) (this_sim->uicc_ch_info[channel].file_type)
 #define USIM_CURRENT_REC_SIZE_QUERY(channel)  (this_sim->uicc_ch_info[channel].rec_size)
 #define USIM_CURRENT_NUM_OF_REC_QUERY(channel) (this_sim->uicc_ch_info[channel].rec_num)
+#define USIM_CURRENT_FILE_ACTIVATE_QUERY(channel)(this_sim->uicc_ch_info[channel].is_activated)
+
 
 /* Update File context by APDU */
 #define USIM_CURRENT_FILE_UPDATE(channel)  (this_sim->uicc_ch_info[channel].sim_current_file_idx)
@@ -1035,6 +1037,7 @@
 #define USIM_CURRENT_FILE_TYPE_UPDATE(channel) (this_sim->uicc_ch_info[channel].file_type)
 #define USIM_CURRENT_REC_SIZE_UPDATE(channel)  (this_sim->uicc_ch_info[channel].rec_size)
 #define USIM_CURRENT_NUM_OF_REC_UPDATE(channel) (this_sim->uicc_ch_info[channel].rec_num)
+#define USIM_CURRENT_FILE_ACTIVATE_UPDATE(channel)(this_sim->uicc_ch_info[channel].is_activated)
 #define USIM_RX_BUFF_PTR (&(this_sim->rx_tmp_buff))
 
 #define USIM_CURRENT_FD(channel) (this_sim->uicc_ch_info[channel].file_descriptor)
@@ -1067,12 +1070,16 @@
 #define SET_PROP_MIN_APP_CLK_EXIST(X)    ((X) |= 0x04)
 #define SET_PROP_AVAIL_MEM_EXIST(X)       ((X) |= 0x08)
 #define SET_PROP_SUPPORTED_SYS_CMD_EXIST(X)       ((X) |= 0x10)
+#define SET_PROP_FILE_STATUS(X)       ((X) |= 0x20)
+
 
 #define IF_PROP_UICC_CHAR_EXIST(X)      ((X)&0x01)
 #define IF_PROP_APP_PWR_EXIST(X)         ((X)&0x02)
 #define IF_PROP_MIN_APP_CLK_EXIST(X)  ((X)&0x04)
 #define IF_PROP_AVAIL_MEM_EXIST(X)      ((X)&0x08)
 #define IF_SUPPORTED_SYS_CMD_EXIST(X)      ((X)&0x10)
+#define IF_SUPPORTED_FILE_STATUS(X)      ((X)&0x20)
+
 
 /* File descriptor byte */
 #define IS_SHAREABLE_FILE(X) (0x40 & (X))
@@ -1263,6 +1270,10 @@
 void sim_set_fake_mnc_length_in_cache(sim_context_struct *this_sim);
 void sim_replace_with_fake_imsi_if_test_sim(sim_mmi_security_ind_struct *sim_mmi_security_ind_ptr, sim_gmss_ready_ind_struct *sim_gmss_ready_ind_ptr, sim_context_struct *this_sim);
 void sim_clear_fake_imsi_in_nvram_and_context(sim_context_struct *this_sim);
+void sim_replace_with_fake_gid1_if_test_sim(sim_mmi_security_ind_struct *sim_mmi_security_ind_ptr, sim_l4bsbp_ready_ind_struct *sim_l4bsbp_ready_ind_ptr, sim_context_struct *this_sim);
+void sim_clear_fake_gid1_in_nvram_and_context(sim_context_struct *this_sim);
+void sim_set_fake_gid1_in_cache(sim_context_struct *this_sim);
+void sim_create_fake_gid1_from_fake_id(kal_uint8 length, kal_uint8 *bytes, kal_uint8 *fake_gid);
 #endif
 
 extern sim_cmd_result_enum usim_al_get_identity(kal_uint8 parameter2,
@@ -1313,6 +1324,8 @@
 
 extern void sim_internal_critical_recovery_handler(ilm_struct *sim_ilm_ptr, sim_context_struct *this_sim);
 sim_cmd_result_enum usim_critical_recovery_as_usim(sim_context_struct *this_sim);
+sim_cmd_result_enum usim_critical_recovery_as_csim(sim_context_struct *this_sim);
+
 extern void sim_pack_null_scheme_suci(sim_supi_type_enum supi_type,
                                       const kal_uint8 *supi_ptr,
                                       kal_uint16 supi_len,
@@ -1339,6 +1352,7 @@
 extern kal_bool sim_pass_through_mode_activate(sim_context_struct *this_sim);
 #endif
 kal_uint8 sim_get_usim_important_files_list_count(void);
+void sim_reset_clock_mode_config(sim_reset_struct *sim_reset_ptr, sim_context_struct *this_sim);
 
 void sim_retrieve_data_req_handler(ilm_struct *sim_ilm_ptr, sim_context_struct *this_sim);
 void sim_set_data_req_handler(ilm_struct *sim_ilm_ptr, sim_context_struct *this_sim);
@@ -1369,5 +1383,8 @@
 extern kal_bool usim_read_msisdn(sim_addr_struct *addr, kal_uint8 *num, sim_context_struct *this_sim);
 #endif
 void sim_restrict_card_type_req_handler(ilm_struct *sim_ilm_ptr, sim_context_struct *this_sim);
-
+#if defined(__ECALL_SUPPORT__) || defined(__NG_ECALL_SUPPORT__)
+void sim_set_ecall_mode_req_handler(ilm_struct *sim_ilm_ptr, sim_context_struct *this_sim);
+void sim_get_ecall_mode_req_handler(ilm_struct *sim_ilm_ptr, sim_context_struct *this_sim);
+#endif
 #endif
diff --git a/mcu/protocol/layer4/sim/include/sim_private_enum.h b/mcu/protocol/layer4/sim/include/sim_private_enum.h
index b8528dd..73cf8ce 100755
--- a/mcu/protocol/layer4/sim/include/sim_private_enum.h
+++ b/mcu/protocol/layer4/sim/include/sim_private_enum.h
@@ -248,6 +248,7 @@
     SIM_AL_EXPLICT_SIM_RESET,   /* for usim_recovery_as_sim before start confirm */
     SIM_AL_EXPLICT_USIM_RESET,  /* for usim_recovery_as_usim before start confirm */
     SIM_AL_EXPLICT_LOCK_UIM,
+    SIM_AL_EXPLICT_CSIM_RESET,
 } sim_al_reset_type_enum;
 
 typedef enum
@@ -738,6 +739,8 @@
     FCP_SFI_T = 0x88
 } usim_fcp_tag_enum;
 
+#define EF_FILE_ACTIVE 0x05
+
 /* FCP proprietary information tag */
 typedef enum
 {
@@ -749,7 +752,8 @@
     PROP_RESERVED_FILE_SIZE_T = 0x85,
     PROP_MAX_FILE_SIZE_T = 0x86,
     PROP_SUPPORTED_SYS_CMD_T = 0x87,
-    PROP_UICC_ENV_COND_T = 0x88
+    PROP_UICC_ENV_COND_T = 0x88,
+    PROP_FILE_STATUS_T = 0xC0
 } usim_fcp_proprietary_info_tag_enum;
 
 /* FCP security attributes tag */
@@ -1338,8 +1342,9 @@
 extern const kal_uint8 mf_path[8];
 extern const kal_uint8 adf_path[8];
 
-#define ISDR_AID_LEN 16
-extern const kal_uint8 isdr_aid[ISDR_AID_LEN];
+#define EUICC_APP_AID_LEN 16
+extern const kal_uint8 isdr_aid[EUICC_APP_AID_LEN];
+extern const kal_uint8 ecasd_aid[EUICC_APP_AID_LEN];
 
 typedef enum
 {
@@ -1612,5 +1617,11 @@
     PROFILE_UPDATE_ONGOING = 0xFF,
 } sim_sprint_profile_update_status_enum;
 
+typedef enum
+{
+    EUICC_AID_NULL = 0,
+    EUICC_AID_ISDR = 1,
+    EUICC_AID_ECASD = 2,
+} sim_euicc_aid_enum;
 
 #endif
diff --git a/mcu/protocol/layer4/sim/include/sim_private_struct.h b/mcu/protocol/layer4/sim/include/sim_private_struct.h
index e2725a1..1da2377 100755
--- a/mcu/protocol/layer4/sim/include/sim_private_struct.h
+++ b/mcu/protocol/layer4/sim/include/sim_private_struct.h
@@ -163,6 +163,8 @@
     kal_uint8 rec_num;
     kal_uint8 rec_size;
 
+	kal_bool is_activated;
+
     uicc_card_type_enum uicc_type;
     kal_uint8 aid_len;
     kal_uint8 aid[SIM_MAX_AID_LEN]; //16
@@ -766,6 +768,7 @@
     kal_bool is_euicc;
     kal_bool is_empty_euicc;
     kal_uint8 eid[LEN_OF_EID];
+    kal_bool last_euicc_cmd_disable;     // Storing last eUICC Command to Allow REFRESH later when eUICC Profile is Disabled
 } sim_euicc_context_struct;
 
 typedef struct
@@ -1071,6 +1074,8 @@
 #ifdef __FAKEID_SUPPORT__
     kal_uint8 fake_imsi[MAX_SIM_IMSI_LEN];
     kal_uint8 fake_mnc_length;
+	kal_uint8 fake_gid1_length;
+	kal_uint8 fake_gid1[NUM_GID1];
 #endif
 
     kal_uint8 gid1_len;
@@ -1172,6 +1177,7 @@
     kal_uint8 pwr_ref_freq;         /* application power consumption */
     kal_uint8 app_min_freq;         /* minimum application clock frequency */
     kal_uint8 supported_sys_cmds;   /* supported system commands*/
+    kal_uint8 file_status;			/* file status flag (if file readable and writable) */
 } usim_proprietary_information_struct;
 
 typedef struct
diff --git a/mcu/protocol/layer4/sim/include/sim_trc_mod_sim_utmd.json b/mcu/protocol/layer4/sim/include/sim_trc_mod_sim_utmd.json
index 1894086..5ed3d93 100755
--- a/mcu/protocol/layer4/sim/include/sim_trc_mod_sim_utmd.json
+++ b/mcu/protocol/layer4/sim/include/sim_trc_mod_sim_utmd.json
@@ -2802,6 +2802,13 @@
       }
     }, 
     {
+      "INFO_GET_EID_FROM_ECASD_IN_EUICC_DETECTION": {
+        "apiType": "index", 
+        "format": "SBP enable, get EID from ECASD", 
+        "traceClass": "TRACE_INFO"
+      }
+    },
+    {
       "INFO_SAT_CMD_RULE": {
         "apiType": "index", 
         "format": "[SAT]Command rule: %Msat_cmd_dispatch_rule_enum", 
@@ -3635,6 +3642,20 @@
       }
     },
     {
+      "INFO_SEND_SIM_STATUS_DURING_POLL_INTERVAL": {
+        "apiType": "index", 
+        "format": "Send STATUS Command Immediately after Poll Interval Command", 
+        "traceClass": "TRACE_INFO"
+      }
+    }, 
+    {
+      "INFO_SIM_STATUS_DURING_POLL_INTERVAL": {
+        "apiType": "index", 
+        "format": "SIM STATUS during Poll Interval", 
+        "traceClass": "TRACE_INFO"
+      }
+    }, 
+    {
       "INFO_SIM_AL_GET_RESPONSE": {
         "apiType": "index", 
         "format": "GET RESPONSE  rsp length: %hd => %02X %02X", 
@@ -4468,6 +4489,13 @@
       }
     }, 
     {
+      "WARNING_SIM_FAKE_GID1": {
+        "apiType": "index", 
+        "format": "[SIM] Fake GID1 Enabled!", 
+        "traceClass": "TRACE_WARNING"
+      }
+    }, 
+    {
       "WARNING_SAT_ERR_CAUSE_NOT_CLEAR": {
         "apiType": "index", 
         "format": "[SAT] Procomm Cause Not Cleared", 
@@ -4839,6 +4867,20 @@
       }
     },
     {
+      "WARNING_FILE_NOT_ACTIVATED": {
+        "apiType": "index", 
+        "format": "[SIM] File is not Activated!", 
+        "traceClass": "TRACE_WARNING"
+      }
+    }, 
+    {
+      "WARNING_FCP_PROP_FILE_STATUS_ERROR": {
+        "apiType": "index", 
+        "format": "USIM_FCP_ERROR: FCP PROP FILE STATUS ERROR!", 
+        "traceClass": "TRACE_WARNING"
+      }
+    },  
+	{
       "ERROR_SIM_RESET_ABNORMAL_CMD_RETRY": {
         "apiType": "index", 
         "format": "SIM_RESET_ABNORMAL: command retry", 
@@ -5042,6 +5084,13 @@
       }
     },
     {
+      "ERROR_SIM_STATUS_ERROR_DURING_POLL_INTERVAL": {
+        "apiType": "index", 
+        "format": "SIM STATUS error during POLL Interval", 
+        "traceClass": "TRACE_ERROR"
+      }
+    }, 
+    {
       "ERROR_SIM_FUNCTION_PARA_ERROR": {
         "apiType": "index", 
         "format": "SIM_ERROR: %s() prar1: %d  para2: %d !!", 
@@ -5819,16 +5868,16 @@
       }
     }, 
     {
-      "INFO_SIM_EUICC_DETECT_WITH_ISDR": {
+      "INFO_SIM_EUICC_DETECT_WITH_EID_RELATED_APP": {
         "apiType": "index", 
-        "format": "[EUICC] with ISD-R", 
+        "format": "[EUICC] with EID Related APP", 
         "traceClass": "TRACE_INFO"
       }
     }, 
     {
-      "INFO_SIM_EUICC_DETECT_WITHOUT_ISDR": {
+      "INFO_SIM_EUICC_DETECT_WITHOUT_EID_RELATED_APP": {
         "apiType": "index", 
-        "format": "[EUICC] without ISD-R", 
+        "format": "[EUICC] without EID Related APP", 
         "traceClass": "TRACE_INFO"
       }
     }, 
@@ -5888,7 +5937,6 @@
         "traceClass": "TRACE_WARNING"
       }
     }, 
-
     {
       "INFO_SIM_RETRY_COMMAND_FOR_FILE": {
         "apiType": "index",
@@ -6005,6 +6053,27 @@
       }
     },
     {
+      "INFO_SIM_READ_ECALL_MODE_INFO": {
+        "apiType": "index", 
+        "format": "[SIM] read ecall mode from NVRAM, result: %Msim_ecall_mode_enum", 
+        "traceClass": "TRACE_INFO"
+      }
+    },
+    {
+      "INFO_SIM_NOT_SUPPORT_ECALL_MODE_SWITCH": {
+        "apiType": "index", 
+        "format": "[SIM] This SIM not support eCall mode switch",
+        "traceClass": "TRACE_INFO"
+      }
+    },
+    {
+      "INFO_SIM_ECALL_MODE_SWITCH_DISABLE": {
+        "apiType": "index", 
+        "format": "[SIM] SBP disable, eCall Switch not support",
+        "traceClass": "TRACE_INFO"
+      }
+    },
+    {
       "INFO_SIM_CURRENT_MODULE_ID": {
         "apiType": "index", 
         "format": "[SIM] current module id:%d",