[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);