[Feature][Modem]1.merge MTK P2 patch 2.RF:bias modification of frequency band
Change-Id: I846de8f085e50c1b9557ad8c5d0b2cc088b18d86
diff --git a/mcu/protocol/interface/general/mrs_as_enums.h b/mcu/protocol/interface/general/mrs_as_enums.h
index 7f28270..c5b4b85 100755
--- a/mcu/protocol/interface/general/mrs_as_enums.h
+++ b/mcu/protocol/interface/general/mrs_as_enums.h
@@ -55,6 +55,9 @@
*
* removed!
* removed!
+ *
+ * removed!
+ * removed!
* removed!
* removed!
*
@@ -317,6 +320,8 @@
#define GAS_CANDIDATE_TICK_INIT (0xFFFFFFFF)
#endif
+#define MRS_CSG_IMSI_MAX_LEN 15
+
#define AFR_MASK_2G4 0x0001
#define AFR_MASK_3G4 0x0002
#define AFR_MASK_2G5_FDD 0x0004
diff --git a/mcu/protocol/interface/general/mrs_as_struct.h b/mcu/protocol/interface/general/mrs_as_struct.h
index 7aca1b4..767ddad 100755
--- a/mcu/protocol/interface/general/mrs_as_struct.h
+++ b/mcu/protocol/interface/general/mrs_as_struct.h
@@ -67,6 +67,9 @@
*
* removed!
* removed!
+ *
+ * removed!
+ * removed!
* removed!
*
* removed!
@@ -671,4 +674,28 @@
mrs_mcc_plmn_list_within_region_record_struct setting[MAX_NUM_VALID_MCC_REGIONS];
} mrs_mcc_region_band_setting_record_struct;
+#ifdef __CHANNEL_LOCK__
+/* MSG_ID_MRS_ERRC_CH_LOCK_NTF */
+typedef struct {
+ LOCAL_PARA_HDR
+
+ MRS_CH_LOCK_STATE lock_state;
+ kal_uint8 lock_mode;
+} mrs_errc_ch_lock_ntf_struct;
+
+/* MSG_ID_MRS_NRRC_CH_LOCK_NTF */
+typedef struct {
+ LOCAL_PARA_HDR
+
+ MRS_CH_LOCK_STATE lock_state;
+ kal_uint8 lock_mode;
+} mrs_nrrc_ch_lock_ntf_struct;
+#endif /* __CHANNEL_LOCK__ */
+
+typedef struct mrs_csg_imsi_info
+{
+ kal_uint8 imsi_length;
+ kal_uint8 imsi[MRS_CSG_IMSI_MAX_LEN];
+} mrs_csg_imsi_info;
+
#endif /* _MRS_AS_STRUCT_H */
diff --git a/mcu/protocol/interface/general/mrs_common_operator_feature_table_public.h b/mcu/protocol/interface/general/mrs_common_operator_feature_table_public.h
index a9b54c2..63904f2 100755
--- a/mcu/protocol/interface/general/mrs_common_operator_feature_table_public.h
+++ b/mcu/protocol/interface/general/mrs_common_operator_feature_table_public.h
@@ -108,6 +108,32 @@
kal_bool mrs_is_rat_capability_disabled(const plmn_id_struct *hplmn, const plmn_id_struct *splmn, kal_bool is_roaming, rat_capability_enum rat_cap);
/**
+ * @brief Query if rat capability of specific SIM shall be disabled for all serving PLMNs
+ * @param[in] hplmn is the PLMN ID (MCC+MNC) of Home PLMN
+ * @param[in] rat_cap is the rat capability to be checked
+ * @return KAL_TRUE if rat capability of specific SIM shall be disabled; KAL_FALSE if not
+ */
+kal_bool mrs_is_rat_capability_disabled_by_sim(const plmn_id_struct *hplmn, rat_capability_enum rat_cap);
+
+/**
+ * @brief Query if UE shall leave RAT
+ * @param[in] hplmn is the PLMN ID (MCC+MNC) of Home PLMN
+ * @param[in] splmn is the PLMN ID (MCC+MNC) of Serving PLMN
+ * @param[in] is_roaming is the roaming status
+ * @param[in] leave_rat is the target rat to be checked
+ * @return KAL_TRUE if UE shall leave RAT; KAL_FALSE if not
+ */
+kal_bool mrs_is_voice_unavail_leave_rat(const plmn_id_struct *hplmn, const plmn_id_struct *splmn, kal_bool is_roaming, voice_unavail_leave_rat_enum leave_rat);
+
+/**
+ * @brief Query if UE of specific SIM shall leave RAT for all serving PLMNs
+ * @param[in] hplmn is the PLMN ID (MCC+MNC) of Home PLMN
+ * @param[in] leave_rat is the target rat to be checked
+ * @return KAL_TRUE if UE of specific SIM shall leave RAT; KAL_FALSE if not
+ */
+kal_bool mrs_is_voice_unavail_leave_rat_by_sim(const plmn_id_struct *hplmn, voice_unavail_leave_rat_enum leave_rat);
+
+/**
* @brief Query the custom PLMN search rat order by specific MCC
* @param[in] simInterface is the index of tagret SIM to be queried
* @param[in] plmn_id is the MCC to be queried
diff --git a/mcu/protocol/interface/general/mrs_emm_capability.h b/mcu/protocol/interface/general/mrs_emm_capability.h
index 6323c10..e3f879b 100755
--- a/mcu/protocol/interface/general/mrs_emm_capability.h
+++ b/mcu/protocol/interface/general/mrs_emm_capability.h
@@ -160,6 +160,8 @@
void mrs_emm_get_ue_sec_cap(MRS_SIM_INDEX sim_index, rat_enum rat_mode, kal_uint8* data, kal_uint8 *len);
+void mrs_emm_get_ue_sec_cap_without_rat_mode_modification(MRS_SIM_INDEX sim_index, rat_enum rat_mode, kal_uint8* data, kal_uint8 *len);
+
void mrs_emm_get_ue_add_sec_cap(MRS_SIM_INDEX sim_index, rat_enum rat_mode, kal_uint8* data, kal_uint8 *len);
#if defined(__GSM_RAT__) || defined(__UMTS_RAT__)
diff --git a/mcu/protocol/interface/general/mrs_gas_capability.h b/mcu/protocol/interface/general/mrs_gas_capability.h
index 84a3772..d38a109 100755
--- a/mcu/protocol/interface/general/mrs_gas_capability.h
+++ b/mcu/protocol/interface/general/mrs_gas_capability.h
@@ -842,6 +842,9 @@
kal_uint8 gsm_supported_band;
kal_bool is_test_sim;
fdd_gas_serving_cell_info_struct serving_cell_info;
+#ifdef __UMTS_RAT__
+ capability_switch_enum umts_cap;
+#endif /* __UMTS_RAT__ */
capability_switch_enum gsm_cap;
#ifdef __LTE_RAT__
@@ -1018,6 +1021,14 @@
extern capability_switch_enum fdd_mrs_gas_get_gsm_cap_update(MRS_SIM_INDEX sim_index);
extern kal_bool fdd_mrs_gas_gsm_enabled (MRS_SIM_INDEX sim_index, rat_enum rat_mode);
+
+
+
+
+#ifdef __UMTS_RAT__
+extern void fdd_mrs_gas_update_disable_umts_cap(MRS_SIM_INDEX sim_index, capability_switch_enum umts_cap);
+#endif /* __UMTS_RAT__ */
+
/************************************************** End of FDD's part **************************************************/
#endif /* _MRS_GAS_CAPABILITY_H */
diff --git a/mcu/protocol/interface/general/mrs_uas_capability.h b/mcu/protocol/interface/general/mrs_uas_capability.h
index 5048c2d..4d5fe56 100755
--- a/mcu/protocol/interface/general/mrs_uas_capability.h
+++ b/mcu/protocol/interface/general/mrs_uas_capability.h
@@ -168,6 +168,7 @@
kal_uint16 tdd_uia;
kal_uint32 fdd_umts_supported_band;
+ capability_switch_enum umts_cap;
} uas_capability_context_struct;
/*****************************************************************************
@@ -221,5 +222,9 @@
kal_bool mrs_is_band_capability_update_needed(MRS_SIM_INDEX sim_index, kal_uint8 bandID);
void mrs_uas_reset_disabled_band_to_scsi_per_plmn(MRS_SIM_INDEX sim_index, kal_uint32 band);
+extern void mrs_uas_set_umts_cap_update(MRS_SIM_INDEX sim_index, capability_switch_enum umts_cap);
+extern capability_switch_enum mrs_uas_get_umts_cap_update(MRS_SIM_INDEX sim_index);
+extern kal_bool mrs_uas_is_umts_enabled(MRS_SIM_INDEX sim_index, rat_enum rat_mode);
+
#endif /* _MRS_UAS_CAPABILITY_H */
diff --git a/mcu/protocol/interface/general/mrs_utility.h b/mcu/protocol/interface/general/mrs_utility.h
index bc44eb2..9318790 100755
--- a/mcu/protocol/interface/general/mrs_utility.h
+++ b/mcu/protocol/interface/general/mrs_utility.h
@@ -53,6 +53,12 @@
* --------------------------------------------------------
* $Log$
*
+ * 11 03 2022 yanfeng.xu
+ * [MOLY00729994] [KPI: EPSFB AFR Lattency][RDIT][ZTE ngRAN][Gemini Benchmark][Case NR_GEMINI_14222_EPSFB_Call_MO_Ping_Idle][Good_Point] Check larger EPSFB AFR Latency
+ *
+ * 09 22 2022 ot_kiran.gunturu
+ * [MOLY00855742] [Moto][Tesla][GCF/PTCRB][ 31.121] [TC10.1.5]
+ *
* 01 28 2022 ot_krishna.charan
* [MOLY00685488] cloned from ALPS05677217 [B210622-876][?????]UE CSFB CALL MT???RR???????????????????????????
*
@@ -402,7 +408,7 @@
#if defined(__3G_CSG_SUPPORT__) || defined(__LTE_RAT__)
extern void NPSI_newAcsglFromUSIM(MRS_SIM_INDEX sim_index, kal_uint8 acsglRecNum, kal_uint16 acsglSizePerRec
- , kal_uint8* acsglData, csg_white_list_update_cause update_cause, kal_bool is_valid);
+ , kal_uint8* acsglData, csg_white_list_update_cause update_cause, kal_bool is_valid, mrs_csg_imsi_info csg_imsi_info);
extern void NPSI_newOcsglFromUSIM(MRS_SIM_INDEX sim_index, kal_uint8 ocsglRecNum, kal_uint16 ocsgalSizePerRec
, kal_uint8* ocsglData, csg_white_list_update_cause update_cause, kal_bool is_valid);
@@ -605,7 +611,26 @@
kal_uint8 mrs_wh_cell_lock_state_get(MRS_SIM_INDEX sim_index);
#endif /* __WHITE_CELL_LOCK__ */
+/*******************************************************************************
+Description:
+ This function is used to set channel lock scenario in MRS context.
+
+Parameters:
+ ch_lock_scenario: Channel lock scenario to be set in MRS context
+
+Return Value: None
+*******************************************************************************/
+void mrs_ch_lock_set_scenario(MRS_SIM_INDEX sim_index, MRS_CH_LOCK_SCENARIO ch_lock_scenario);
+
+/*******************************************************************************
+Description:
+ This function is used to get channel lock scenario in MRS context.
+
+Return Value: MRS_CH_LOCK_SCENARIO to be returned from MRS context
+*******************************************************************************/
+MRS_CH_LOCK_SCENARIO mrs_ch_lock_get_scenario(MRS_SIM_INDEX sim_index);
#endif /* __CHANNEL_LOCK */
+
/*the following 2 mrs functions are provided for T + W feature*/
extern void mrs_update_gas_system_mode(MRS_SIM_INDEX sim_index,kal_uint8 system_mode);
@@ -698,6 +723,7 @@
void mrs_afr_fail_update_by_low_rat(MRS_SIM_INDEX sim_index, MRS_RAT_MODE_TYPE rat);
+kal_uint32 mrs_fr_as_determine_fr_rat(MRS_SIM_INDEX sim_index, MRS_RAT_MODE_TYPE rat, kal_bool skip_voice_status);
kal_uint32 mrs_afr_as_determine_afr_rat(MRS_SIM_INDEX sim_index, MRS_RAT_MODE_TYPE rat, kal_bool skip_voice_status);
kal_uint32 mrs_afr_get_afr_to_4g_timer(MRS_SIM_INDEX sim_index);
diff --git a/mcu/protocol/interface/l4/l4c_upds_struct.h b/mcu/protocol/interface/l4/l4c_upds_struct.h
new file mode 100755
index 0000000..c95b164
--- /dev/null
+++ b/mcu/protocol/interface/l4/l4c_upds_struct.h
@@ -0,0 +1,95 @@
+/*****************************************************************************
+* Copyright Statement:
+* --------------------
+* This software is protected by Copyright and the information contained
+* herein is confidential. The software may not be copied and the information
+* contained herein may not be used or disclosed except with the written
+* permission of MediaTek Inc. (C) 2005
+*
+* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
+* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
+* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
+* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
+* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
+* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
+* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
+* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
+* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
+*
+* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
+* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
+* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
+* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
+* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+*
+* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
+* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
+* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
+* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
+* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
+*
+*****************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ * l4c_upds_struct.h
+ *
+ * Project:
+ * --------
+ * 6298
+ *
+ * Description:
+ * ------------
+ * This file is intends for struct definition between L4C and UPDS
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *******************************************************************************/
+
+/********************************************************************************
+* Copyright Statement:
+* --------------------
+*
+* This product has been developed using a protocol stack
+* developed by Sasken Communication Technologies Limited.
+*
+********************************************************************************/
+#ifndef _L4C_UPDS_STRUCT_H
+#define _L4C_UPDS_STRUCT_H
+
+#include "ps_public_struct.h"
+
+/********************************************
+ * MACROS *
+ ********************************************/
+
+
+/********************************************
+ * TYPE DEFINITIONS & ENUMS *
+ ********************************************/
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ kal_uint8 os_id_num;
+ os_id_info_struct os_id_info[MAX_UE_OS_ID_NUM];
+} l4c_upds_os_id_update_req_struct;
+
+
+/********************************************
+ * VARIABLES *
+ ********************************************/
+
+
+/********************************************
+* FUNCTION DECLARATIONS *
+********************************************/
+
+#endif /* _L4C_UPDS_STRUCT_H */
diff --git a/mcu/protocol/interface/l4misc/l4c_em.h b/mcu/protocol/interface/l4misc/l4c_em.h
index e235ee0..bc12866 100755
--- a/mcu/protocol/interface/l4misc/l4c_em.h
+++ b/mcu/protocol/interface/l4misc/l4c_em.h
@@ -474,7 +474,7 @@
#if defined(__CHANNEL_LOCK__)
void l4c_emmchlck_read(kal_uint8 src_id);
void l4c_emmchlck_write(kal_uint8 src_id, kal_uint8 mode, kal_uint8 act,
- kal_uint16 *band_indicator_ptr, kal_uint32 *arfcn_ptr, kal_uint16 cell_id,kal_uint8 channel_num,kal_uint8 lock_mode);
+ kal_uint16 *band_indicator_ptr, kal_uint32 *arfcn_ptr, kal_uint16 cell_id,kal_uint8 channel_num,kal_uint8 lock_mode, kal_uint8 is_user_scenario);
#endif /* __CHANNEL_LOCK__ */
#endif /* __MODEM_EM_MODE__ */
diff --git a/mcu/protocol/interface/l4misc/l5_l4c_struct.h b/mcu/protocol/interface/l4misc/l5_l4c_struct.h
index b76df59..ddb0528 100755
--- a/mcu/protocol/interface/l4misc/l5_l4c_struct.h
+++ b/mcu/protocol/interface/l4misc/l5_l4c_struct.h
@@ -65,6 +65,7 @@
#include "l5_l4c_enums.h"
#include "rac2l4c_struct.h"
#include "mmrf_msg_interface.h"
+#include "l4c_upds_struct.h"
#ifdef __MBIM_MS_NETWORK_BLACKLIST__
@@ -185,6 +186,7 @@
typedef l4crac_get_nssai_req_struct l5_l4c_get_nssai_req_struct;
typedef l4crac_get_nssai_cnf_struct l5_l4c_get_nssai_cnf_struct;
typedef l4crac_vgmm_nw_params_ind_struct l5_l4c_vgmm_nw_params_ind_struct;
-
#endif
+typedef l4c_upds_os_id_update_req_struct l5_l4c_os_id_update_req_struct;
+
#endif /* _L5_L4C_STRUCT_H */
diff --git a/mcu/protocol/layer4/l4/include/atci_trc_mod_atci_utmd.json b/mcu/protocol/layer4/l4/include/atci_trc_mod_atci_utmd.json
index 04f8982..22b37a0 100755
--- a/mcu/protocol/layer4/l4/include/atci_trc_mod_atci_utmd.json
+++ b/mcu/protocol/layer4/l4/include/atci_trc_mod_atci_utmd.json
@@ -4785,7 +4785,7 @@
{
"INFO_CHANNEL_LOCK_COMMON": {
"apiType": "index",
- "format": "channel lock: mode = %d, act = %d, channel_num = %d, cell_id = %d, lock_mode= %d",
+ "format": "channel lock: mode = %d, act = %d, channel_num = %d, cell_id = %d, lock_mode= %d, is_user_scenario = %d",
"traceClass": "TRACE_INFO"
}
},
diff --git a/mcu/protocol/layer4/l4/phb/include/phb_common.h b/mcu/protocol/layer4/l4/phb/include/phb_common.h
index cc80066..0e94f3e 100755
--- a/mcu/protocol/layer4/l4/phb/include/phb_common.h
+++ b/mcu/protocol/layer4/l4/phb/include/phb_common.h
@@ -87,6 +87,7 @@
extern void phb_me_reconfig_handler(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr);
extern void phb_swap_context(kal_uint8 * sim_switch_ps_old);
extern void phb_abort_data(phb_context_type *phb_ptr_temp, kal_uint8 cur_sim, phb_errno_enum result);
+extern void phb_send_dhl_dump_context_ind(void);
#ifdef __cplusplus
}
diff --git a/mcu/protocol/layer4/l4/phb/include/phb_context.h b/mcu/protocol/layer4/l4/phb/include/phb_context.h
index 0e65565..c21f91c 100755
--- a/mcu/protocol/layer4/l4/phb/include/phb_context.h
+++ b/mcu/protocol/layer4/l4/phb/include/phb_context.h
@@ -207,6 +207,19 @@
#endif
kal_bool is_full_changed_sat_file_change_ongoing;
} phb_context_type;
+
+typedef struct
+{
+ LOCAL_PARA_HDR
+ phb_context_type phb_context_dump[PHB_SIM_NUM];
+#ifdef __PHB_USIM_ADDITIONAL_SUPPORT__
+ kal_uint8 free_bitmap_ADN_dump[PHB_SIM_NUM][PHB_MAX_PBR_ENTRIES][FREE_BITMAP_ADN_BYTES];
+#else
+ kal_uint8 free_bitmap_ADN_dump[PHB_SIM_NUM][FREE_BITMAP_ADN_BYTES];
+#endif
+
+}phb_dhl_dump_context_ind_struct;
+
extern phb_context_type phb_context[PHB_SIM_NUM];
extern phb_context_type *phb_ptr;
diff --git a/mcu/protocol/layer4/l4/phb/src/phb_common.c b/mcu/protocol/layer4/l4/phb/src/phb_common.c
index c572733..fba5bab 100755
--- a/mcu/protocol/layer4/l4/phb/src/phb_common.c
+++ b/mcu/protocol/layer4/l4/phb/src/phb_common.c
@@ -76,6 +76,8 @@
#if defined(__CDMA2000_RAT__)
#include "uim_msgid.h"
#endif
+#include "ps_public_l4_msgid.h"
+#include "md_sap.h"
#undef _FILE_CODE_
#define _FILE_CODE_ _PHB_COMMON_C_
@@ -84,7 +86,12 @@
extern kal_uint8 sim_switch_ps[];
extern kal_int32 phb_query_count[];
static kal_uint8 phb_find_protocol_index(kal_uint8 * sim_switch_ps_old, kal_uint8 index);
-
+extern void dhl_log_primitive(ilm_struct *ilm);
+#ifdef __PHB_USIM_ADDITIONAL_SUPPORT__
+extern kal_uint8 free_bitmap_ADN[PHB_SIM_NUM][PHB_MAX_PBR_ENTRIES][FREE_BITMAP_ADN_BYTES];
+#else
+extern kal_uint8 free_bitmap_ADN[PHB_SIM_NUM][FREE_BITMAP_ADN_BYTES];
+#endif
/*****************************************************************************
* FUNCTION
* phb_IO_create_cntx
@@ -519,3 +526,58 @@
}
}
+void phb_send_dhl_dump_context_ind(void)
+{
+ ilm_struct ilm;
+ kal_uint8 i=0,j=0, index=0;
+#ifdef __PHB_USIM_ADDITIONAL_SUPPORT__
+ kal_uint8 k=0;
+#endif
+
+ phb_dhl_dump_context_ind_struct *dump_ind;
+
+ /* fill ilm paramter */
+#if defined(__GEMINI__) || defined(GEMINI_PLUS) || defined(__SGLTE__)
+ ilm.src_mod_id = phb_current_mod;
+#else
+ ilm.src_mod_id = MOD_PHB;
+#endif
+ ilm.dest_mod_id = MOD_DHL;
+ ilm.sap_id = DHL_PHB_SAP;
+ ilm.msg_id = MSG_ID_PHB_DHL_DUMP_CONTEXT_IND;
+
+ dump_ind = (phb_dhl_dump_context_ind_struct*)construct_local_para(sizeof(phb_dhl_dump_context_ind_struct), TD_RESET);
+
+ for(index=0; index<PHB_SIM_NUM; index++)
+ {
+ memcpy(&(dump_ind->phb_context_dump[index]), &(phb_context[index]), sizeof(phb_context_type));
+ }
+#ifdef __PHB_USIM_ADDITIONAL_SUPPORT__
+ for(i=0; i<PHB_SIM_NUM; i++)
+ {
+ for(j=0; j<PHB_MAX_PBR_ENTRIES; j++)
+ {
+ for(k=0; k<FREE_BITMAP_ADN_BYTES; k++)
+ {
+ dump_ind->free_bitmap_ADN_dump[i][j][k] = free_bitmap_ADN[i][j][k];
+ }
+ }
+ }
+#else
+ for(i=0; i<PHB_SIM_NUM; i++)
+ {
+ for(j=0; j<FREE_BITMAP_ADN_BYTES; j++)
+ {
+ dump_ind->free_bitmap_ADN_dump[i][j] = free_bitmap_ADN[i][j];
+ }
+ }
+#endif
+ ilm.local_para_ptr = (local_para_struct*)dump_ind;
+ ilm.peer_buff_ptr = NULL;
+
+ /* send to DHL */
+ dhl_log_primitive(&ilm);
+
+ //dhl_EM_logger(&ilm);
+ destroy_ilm(&ilm);
+}
diff --git a/mcu/protocol/layer4/l4/phb/src/phb_data_desc.c b/mcu/protocol/layer4/l4/phb/src/phb_data_desc.c
index de5ac66..c4458d9 100755
--- a/mcu/protocol/layer4/l4/phb/src/phb_data_desc.c
+++ b/mcu/protocol/layer4/l4/phb/src/phb_data_desc.c
@@ -78,6 +78,7 @@
extern kal_uint8 free_bitmap_TYPE2_FILE[PHB_SIM_NUM][PHB_TYPE2_BITMAP_COUNT][FREE_BITMAP_TYPE2_FILE_BYTES];
extern kal_uint8 phb_map_sim(kal_uint8 sim);
+extern kal_uint8 sim_switch_ps[];
kal_uint16 phb_desc_get_used_file_id(kal_uint16 g_file_id)
{
@@ -243,7 +244,14 @@
phb_ptr->phb_pbr_table[count][occurrence].filetype = filetype;
sim = phb_which_sim_ex();
- sim = phb_map_sim(sim);
+ if (MAX_SIM_NUM > 2) // If number of slots in device is more than 2
+ {
+ sim = sim_switch_ps[sim];
+ }
+ else
+ {
+ sim = phb_map_sim(sim);
+ }
if (filetype == 2)
{
diff --git a/mcu/protocol/layer4/l4/phb/src/phb_main.c b/mcu/protocol/layer4/l4/phb/src/phb_main.c
index ec67c15..205c2b3 100755
--- a/mcu/protocol/layer4/l4/phb/src/phb_main.c
+++ b/mcu/protocol/layer4/l4/phb/src/phb_main.c
@@ -393,6 +393,14 @@
/* consume abnormal primitives */
return;
}
+
+#if !defined(__SENSITIVE_DATA_MOSAIC__)
+ if (sbp_query_md_feature_by_ps(SBP_ENABLE_PHB_DUMP_LOGGING, (protocol_id_enum)phb_which_sim_ex()) == KAL_TRUE)
+ {
+ phb_send_dhl_dump_context_ind();
+ }
+#endif
+
} /* end of module main function */
diff --git a/mcu/protocol/layer4/sim/include/sim_cache_files.h b/mcu/protocol/layer4/sim/include/sim_cache_files.h
index 7e81bc2..9d23a35 100755
--- a/mcu/protocol/layer4/sim/include/sim_cache_files.h
+++ b/mcu/protocol/layer4/sim/include/sim_cache_files.h
@@ -266,5 +266,6 @@
extern kal_bool sim_get_cached_file_size(sim_file_index_enum file_idx, kal_uint8 *cached_rec_num, kal_uint16 *cached_rec_size, const sim_context_struct *this_sim);
extern kal_uint16 sim_get_cached_file_data(sim_file_index_enum file_idx, kal_uint8 rec_id, kal_uint16 res_buffer_size, kal_uint8 *res_data, const sim_context_struct *this_sim);
+extern kal_bool sim_set_cached_file_data(sim_file_index_enum file_idx, kal_uint8 rec_id, kal_uint32 data_size, kal_uint8 *data, const sim_context_struct *this_sim);
#endif /* SIM_CACHE_FILES_H */
diff --git a/mcu/protocol/layer4/sim/include/sim_private_api.h b/mcu/protocol/layer4/sim/include/sim_private_api.h
index 32bd02a..625eb10 100755
--- a/mcu/protocol/layer4/sim/include/sim_private_api.h
+++ b/mcu/protocol/layer4/sim/include/sim_private_api.h
@@ -1260,6 +1260,7 @@
#ifdef __FAKEID_SUPPORT__
void sim_fake_id_req_handler(ilm_struct *sim_ilm_ptr, sim_context_struct *this_sim);
+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);
#endif
diff --git a/mcu/protocol/layer4/sim/include/sim_private_utility.h b/mcu/protocol/layer4/sim/include/sim_private_utility.h
index 0ada928..6e6b6f2 100755
--- a/mcu/protocol/layer4/sim/include/sim_private_utility.h
+++ b/mcu/protocol/layer4/sim/include/sim_private_utility.h
@@ -122,6 +122,8 @@
kal_bool is_system_status_word(kal_uint16 status_word);
+kal_bool is_system_status_word_during_mf_select(kal_uint16 status_word);
+
/* This function is check the request to get the full response with case 4 APDU command. */
kal_bool is_uicc_case4_get_full_response(kal_uint8 apdu_p3,
kal_uint16 txSize,