[Feature][T800][task-view-1764][Network] report 5g ca info to upplayer
Only Configure£ºNo
Affected branch£ºmaster
Affected module£ºNetwork
Is it affected on: only mtk
Self-test: No
Doc Update:No
Change-Id: I1ee9a21bbfb2c661192010b2fc175a96c19e2645
diff --git a/IC_src/mtk/telephonyware/3.0/hardware/ril/fusion/libril/rilmipc/telephony/network/RpNwController.cpp b/IC_src/mtk/telephonyware/3.0/hardware/ril/fusion/libril/rilmipc/telephony/network/RpNwController.cpp
index fc2eb35..590adce 100755
--- a/IC_src/mtk/telephonyware/3.0/hardware/ril/fusion/libril/rilmipc/telephony/network/RpNwController.cpp
+++ b/IC_src/mtk/telephonyware/3.0/hardware/ril/fusion/libril/rilmipc/telephony/network/RpNwController.cpp
@@ -668,7 +668,7 @@
parcel->writeInt32(1);//count
parcel->writeInt32(volte_enable); //1:VoLTE only, 2:VoNR only, 3: VoLTE+VoNR
Rfx_issueLocalRequest(RIL_REQUEST_SET_IMS_ENABLE,parcel, rid);
- }
+ }
old_attach_state[rid] = attach_state;
/*add by hq at 20240930 for bug 167 sometimes ims registration fail and mtk cr AUTO00283236 AUTO00329655 AUTO00329686 end*/
}
@@ -708,6 +708,37 @@
}
}
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+void mipc_unsol_nw_lte_nr_ca_info_ind_cb(mipc_msg_t *msg_ptr, void *cb_priv_ptr) {
+ mipc_sim_ps_id_enum sim_ps_id;
+ RFX_LOG_D(RFX_LOG_TAG,"mipc_unsol_nw_lte_nr_ca_info_ind_cb \n");
+
+ uint32_t nr_dl_cc_num, lte_dl_cc_num,nr_ul_cc_num,lte_ul_cc_num;
+
+ lte_dl_cc_num= mipc_nw_cainfo_ind_get_lte_dl_serving_cell_count(msg_ptr, 0);
+ lte_ul_cc_num= mipc_nw_cainfo_ind_get_lte_ul_serving_cell_count(msg_ptr, 0);
+ nr_dl_cc_num= mipc_nw_cainfo_ind_get_nr_dl_serving_cell_count(msg_ptr, 0);
+ nr_ul_cc_num= mipc_nw_cainfo_ind_get_nr_ul_serving_cell_count(msg_ptr, 0);
+
+ RFX_LOG_D(RFX_LOG_TAG,"mipc_unsol_nw_lte_nr_ca_info_ind_cb \
+ nr_dl_cc_num %d,lte_dl_cc_num %d,nr_ul_cc_num %d,lte_ul_cc_num %d", nr_dl_cc_num,lte_dl_cc_num,nr_ul_cc_num,lte_ul_cc_num);
+
+ sim_ps_id = (mipc_sim_ps_id_enum)msg_ptr->hdr.msg_sim_ps_id;
+ Parcel *p = new Parcel();
+ if(p == NULL) {
+ RFX_LOG_E(RFX_LOG_TAG,"mipc_unsol_nw_cs_ind_cb new parcel error!");
+ return;
+ }
+ p->writeInt32(4);
+ p->writeInt32(lte_dl_cc_num);
+ p->writeInt32(lte_ul_cc_num);
+ p->writeInt32(nr_dl_cc_num);
+ p->writeInt32(nr_ul_cc_num);
+
+ rfx_enqueue_urc_message(RIL_UNSOL_RILD_LTE_NR_CA_INFO,p,mipc_sim_id_to_slot_id(sim_ps_id),RIL_E_SUCCESS);
+}
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
+
void mipc_unsol_nw_ecell_ind_cb(mipc_msg_t *msg_ptr, void *cb_priv_ptr) {
mipc_sim_ps_id_enum sim_ps_id;
@@ -1032,6 +1063,9 @@
mipc_nw_egmss_ind_register(slot_id_to_mipc_sim_id(getSlotId()),mipc_unsol_nw_egmss_ind_cb,NULL);
mipc_nw_psbearer_ind_register(slot_id_to_mipc_sim_id(getSlotId()),mipc_unsol_nw_psbearer_ind_cb,NULL);
mipc_nw_etxpwr_ind_register(slot_id_to_mipc_sim_id(getSlotId()),mipc_unsol_nw_etxpwr_ind_cb,NULL);
+ //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+ mipc_nw_lte_nr_ca_info_ind_register(slot_id_to_mipc_sim_id(getSlotId()),mipc_unsol_nw_lte_nr_ca_info_ind_cb,NULL);
+ //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
// register request id list
registerToHandleRequest(request_id_list,
@@ -2295,6 +2329,9 @@
ret = mipc_msg_register_ind_api((mipc_msg_sim_ps_id_enum)slot_id_to_mipc_sim_id(getSlotId()), MIPC_IMS_STATE_IND, (void*)mipc_ims_state_ind_cb, NULL, NULL);
/*jb.qi change for channel 228 resume on 2022.11.18 end*/
ret = mipc_call_ecc_list_change_register(slot_id_to_mipc_sim_id(getSlotId()), mipc_call_ecc_list_change_ind_cb, NULL);//jb.qi change for channel 228 resume on 2024.1.8
+ //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+ mipc_nw_lte_nr_ca_info_ind_register(slot_id_to_mipc_sim_id(getSlotId()),mipc_unsol_nw_lte_nr_ca_info_ind_cb,NULL);
+ //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
}else {
mipc_nw_nitz_register(slot_id_to_mipc_sim_id(getSlotId()),NULL,NULL);
mipc_nw_signal_state_register(slot_id_to_mipc_sim_id(getSlotId()),NULL,NULL);
@@ -2305,6 +2342,9 @@
ret = mipc_msg_register_ind_api((mipc_msg_sim_ps_id_enum)slot_id_to_mipc_sim_id(getSlotId()), MIPC_IMS_STATE_IND, NULL, NULL, NULL);
/*jb.qi change for channel 228 resume on 2022.11.18 end*/
ret = mipc_call_ecc_list_change_register(slot_id_to_mipc_sim_id(getSlotId()), NULL, NULL);//jb.qi change for channel 228 resume on 2024.1.8
+ //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+ mipc_nw_lte_nr_ca_info_ind_register(slot_id_to_mipc_sim_id(getSlotId()),NULL,NULL);
+ //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
}
rfx_enqueue_response_message(NULL,request->getRilToken(),(RIL_SOCKET_ID)request->getSlotId(),RIL_E_SUCCESS);
return;
diff --git a/IC_src/mtk/telephonyware/3.0/hardware/ril/include/telephony/mtk_ril.h b/IC_src/mtk/telephonyware/3.0/hardware/ril/include/telephony/mtk_ril.h
old mode 100644
new mode 100755
index 6d86718..e1bbb51
--- a/IC_src/mtk/telephonyware/3.0/hardware/ril/include/telephony/mtk_ril.h
+++ b/IC_src/mtk/telephonyware/3.0/hardware/ril/include/telephony/mtk_ril.h
@@ -1448,6 +1448,10 @@
#define RIL_UNSOL_TCP_KEEPALIVE_STATUS (RIL_UNSOL_VENDOR_BASE + 112)
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+#define RIL_UNSOL_RILD_LTE_NR_CA_INFO (RIL_UNSOL_VENDOR_BASE + 113)
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
+
/*********************************************************************************/
/* Vendor GSM local unsol */
/*********************************************************************************/
diff --git a/IC_src/mtk/telephonyware/3.0/hardware/ril/include/telephony/mtk_ril_unsol_commands.h b/IC_src/mtk/telephonyware/3.0/hardware/ril/include/telephony/mtk_ril_unsol_commands.h
old mode 100644
new mode 100755
index 95cfa62..196528d
--- a/IC_src/mtk/telephonyware/3.0/hardware/ril/include/telephony/mtk_ril_unsol_commands.h
+++ b/IC_src/mtk/telephonyware/3.0/hardware/ril/include/telephony/mtk_ril_unsol_commands.h
@@ -339,4 +339,5 @@
{RIL_UNSOL_INCOMING_CALL_ADDITIONAL_INFO, responseStrings, WAKE_PARTIAL},
{RIL_UNSOL_IMS_RESPONSE_CALL_STATE_CHANGED, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_TCP_KEEPALIVE_STATUS, responseInts, WAKE_PARTIAL},
+ {RIL_UNSOL_RILD_LTE_NR_CA_INFO, responseInts, WAKE_PARTIAL}, //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715
#endif // MTK_USE_HIDL
diff --git a/IC_src/mtk/telephonyware/3.0/hardware/ril/platformlib/libmipc/lib/include/api/mipc_nw_api.h b/IC_src/mtk/telephonyware/3.0/hardware/ril/platformlib/libmipc/lib/include/api/mipc_nw_api.h
old mode 100644
new mode 100755
index 40e7099..8b420aa
--- a/IC_src/mtk/telephonyware/3.0/hardware/ril/platformlib/libmipc/lib/include/api/mipc_nw_api.h
+++ b/IC_src/mtk/telephonyware/3.0/hardware/ril/platformlib/libmipc/lib/include/api/mipc_nw_api.h
@@ -872,6 +872,12 @@
MIPC_MSG_CB cb,
void *cb_priv_ptr);
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+mipc_api_result_enum mipc_nw_lte_nr_ca_info_ind_register(
+ mipc_sim_ps_id_enum sim_ps_id,
+ MIPC_MSG_CB cb,
+ void *cb_priv_ptr);
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
/**
*@brief callback function prototype for async. home provider set operation
*@param[in] sim_ps_id indicate which sim or ps completed the operation (the value is decided by what is used when doing aysnc. operation)
diff --git a/IC_src/mtk/telephonyware/3.0/hardware/ril/platformlib/libmipc/lib/src/api/mipc_nw_api.c b/IC_src/mtk/telephonyware/3.0/hardware/ril/platformlib/libmipc/lib/src/api/mipc_nw_api.c
old mode 100644
new mode 100755
index f68e16b..f211dd4
--- a/IC_src/mtk/telephonyware/3.0/hardware/ril/platformlib/libmipc/lib/src/api/mipc_nw_api.c
+++ b/IC_src/mtk/telephonyware/3.0/hardware/ril/platformlib/libmipc/lib/src/api/mipc_nw_api.c
@@ -1052,6 +1052,18 @@
}
}
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+mipc_api_result_enum mipc_nw_lte_nr_ca_info_ind_register(mipc_sim_ps_id_enum sim_ps_id, MIPC_MSG_CB cb, void *cb_priv_ptr)
+{
+ if (mipc_msg_register_ind_api((mipc_msg_sim_ps_id_enum)sim_ps_id, MIPC_NW_CAINFO_IND, cb, NULL, cb_priv_ptr) == 0) {
+ return MIPC_API_RESULT_SUCCESS;
+ } else {
+ return MIPC_API_RESULT_FAIL;
+ }
+}
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
+
+
/////////////////////////////////////////////////////////////////////////////////////////////////////
//fill result_ptr according to msg_ptr
static mipc_api_result_enum mipc_nw_home_provider_set_cnf(mipc_msg_t *msg_ptr, mipc_nw_providers_struct_v *result_ptr)
diff --git a/IC_src/mtk/telephonyware/3.0/libvendor-ril/include/telephony/mtk_ril_sp.h b/IC_src/mtk/telephonyware/3.0/libvendor-ril/include/telephony/mtk_ril_sp.h
old mode 100644
new mode 100755
index c2ddb3e..95523c4
--- a/IC_src/mtk/telephonyware/3.0/libvendor-ril/include/telephony/mtk_ril_sp.h
+++ b/IC_src/mtk/telephonyware/3.0/libvendor-ril/include/telephony/mtk_ril_sp.h
@@ -1838,6 +1838,9 @@
**/
#define RIL_UNSOL_ECC_NUM (RIL_UNSOL_VENDOR_BASE + 114)
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+#define RIL_UNSOL_LTE_NR_CA_INFO (RIL_UNSOL_VENDOR_BASE + 115)
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
/******************************************************************/
diff --git a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxParcelTransfer.cpp b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxParcelTransfer.cpp
old mode 100644
new mode 100755
index 46261b9..17357d3
--- a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxParcelTransfer.cpp
+++ b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxParcelTransfer.cpp
@@ -299,6 +299,10 @@
return RIL_UNSOL_KEEPALIVE_STATUS_PRO;
case (RIL_UNSOL_VENDOR_BASE + 101):
return RIL_UNSOL_ECC_NUM;
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+ case (RIL_UNSOL_VENDOR_BASE + 113):
+ return RIL_UNSOL_LTE_NR_CA_INFO;
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
case (RIL_UNSOL_VENDOR_BASE + 17):
case (RIL_UNSOL_VENDOR_BASE + 20):
case (RIL_UNSOL_VENDOR_BASE + 23):
diff --git a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/parcel_to_data_mtk_unsol_commands.h b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/parcel_to_data_mtk_unsol_commands.h
index 295121d..50640df 100755
--- a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/parcel_to_data_mtk_unsol_commands.h
+++ b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/parcel_to_data_mtk_unsol_commands.h
@@ -216,7 +216,13 @@
#else
{RIL_UNSOL_ECC_NUM, parcelToString, COMMAND_SUPPORETD(1)},
#endif
-
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+#if defined(TELE_FWK)
+ {RIL_UNSOL_LTE_NR_CA_INFO, parcelToInts, COMMAND_SUPPORETD(0)},
+#else
+ {RIL_UNSOL_LTE_NR_CA_INFO, parcelToInts, COMMAND_SUPPORETD(1)},
+#endif
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
/* M: eMBMS feature */
//{RIL_UNSOL_EMBMS_CELL_INFO_NOTIFICATION, parcelToEmbmsCellInfoNotify, COMMAND_SUPPORETD(0)},
//{RIL_UNSOL_EMBMS_COVERAGE_STATE, parcelToInts, COMMAND_SUPPORETD(0)},
diff --git a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/parcel_transfer_mtk_unsol_commands.h b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/parcel_transfer_mtk_unsol_commands.h
old mode 100644
new mode 100755
index b023985..628dd72
--- a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/parcel_transfer_mtk_unsol_commands.h
+++ b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/parcel_transfer_mtk_unsol_commands.h
@@ -173,6 +173,7 @@
{RIL_UNSOL_KEEPALIVE_STATUS_PRO, tranferUnsolRaw},
{RIL_UNSOL_TELEPHONY_RESTART, tranferUnsolRaw},
{RIL_UNSOL_ECC_NUM, tranferUnsolRaw},
+{RIL_UNSOL_LTE_NR_CA_INFO, tranferUnsolRaw}, //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715
/* M: eMBMS feature */
//{RIL_UNSOL_EMBMS_CELL_INFO_NOTIFICATION, parcelToEmbmsCellInfoNotify},
diff --git a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/ril_callbacks.c b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/ril_callbacks.c
old mode 100644
new mode 100755
index dbec9f9..23b89e1
--- a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/ril_callbacks.c
+++ b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/ril_callbacks.c
@@ -422,6 +422,7 @@
case RIL_UNSOL_INVALID_SIM: return "UNSOL_INVALID_SIM";
case RIL_UNSOL_RESPONSE_MMRR_STATUS_CHANGED: return "UNSOL_RESPONSE_MMRR_STATUS_CHANGED";
case RIL_UNSOL_RESPONSE_PS_NETWORK_STATE_CHANGED: return "UNSOL_RESPONSE_PS_NETWORK_STATE_CHANGED";
+ case RIL_UNSOL_LTE_NR_CA_INFO: return "UNSOL_LTE_NR_CA_INFO"; //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715
///M: MTK added Network part end
diff --git a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/nw/RpNwStateController.cpp b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/nw/RpNwStateController.cpp
index 5a2b143..df2d95b 100755
--- a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/nw/RpNwStateController.cpp
+++ b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/nw/RpNwStateController.cpp
@@ -1468,6 +1468,10 @@
return "RIL_UNSOL_CDMA_OTA_PROVISION_STATUS";
case RIL_UNSOL_RIL_CONNECTED:
return "RIL_UNSOL_RIL_CONNECTED";
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+ case RIL_UNSOL_LTE_NR_CA_INFO:
+ return "RIL_UNSOL_LTE_NR_CA_INFO";
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
default:
return "INVALID URC";
}
diff --git a/common_src/framework/lynq-ril-service/src/mtk_ril_unsol_commands.h b/common_src/framework/lynq-ril-service/src/mtk_ril_unsol_commands.h
index bdd73e2..a41a076 100755
--- a/common_src/framework/lynq-ril-service/src/mtk_ril_unsol_commands.h
+++ b/common_src/framework/lynq-ril-service/src/mtk_ril_unsol_commands.h
@@ -46,6 +46,9 @@
#ifdef KEEP_ALIVE
{ RIL_UNSOL_KEEPALIVE_STATUS_PRO,responseInts, WAKE_PARTIAL},
#endif /*KEEP_ALIVE*/
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+{RIL_UNSOL_LTE_NR_CA_INFO, responseInts, WAKE_PARTIAL},
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
{RIL_UNSOL_ON_USSI, responseStrings, WAKE_PARTIAL},
{ RIL_UNSOL_ECC_NUM,responseString, WAKE_PARTIAL},
{RIL_UNSOL_SIP_CALL_PROGRESS_INDICATOR, responseStrings, WAKE_PARTIAL},
diff --git a/common_src/framework/lynq-ril-service/src/ril.cpp b/common_src/framework/lynq-ril-service/src/ril.cpp
index 9c09c02..97a226f 100755
--- a/common_src/framework/lynq-ril-service/src/ril.cpp
+++ b/common_src/framework/lynq-ril-service/src/ril.cpp
@@ -5517,6 +5517,7 @@
case RIL_UNSOL_ON_USSD_REQUEST: return "UNSOL_ON_USSD_REQUEST(obsolete)";
case RIL_UNSOL_NITZ_TIME_RECEIVED: return "UNSOL_NITZ_TIME_RECEIVED";
case RIL_UNSOL_SIGNAL_STRENGTH: return "UNSOL_SIGNAL_STRENGTH";
+ case RIL_UNSOL_LTE_NR_CA_INFO: return "UNSOL_LTE_NR_CA_INFO";
case RIL_UNSOL_STK_SESSION_END: return "UNSOL_STK_SESSION_END";
case RIL_UNSOL_STK_PROACTIVE_COMMAND: return "UNSOL_STK_PROACTIVE_COMMAND";
case RIL_UNSOL_STK_EVENT_NOTIFY: return "UNSOL_STK_EVENT_NOTIFY";
@@ -5912,6 +5913,7 @@
case RIL_UNSOL_ON_USSD_REQUEST: return 1;
case RIL_UNSOL_NITZ_TIME_RECEIVED: return 1;
case RIL_UNSOL_SIGNAL_STRENGTH: return 1;
+ case RIL_UNSOL_LTE_NR_CA_INFO: return 1;//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715
case RIL_UNSOL_DATA_CALL_LIST_CHANGED: return 1;
case RIL_UNSOL_SUPP_SVC_NOTIFICATION: return 1;
case RIL_UNSOL_STK_SESSION_END: return 1;
@@ -6468,6 +6470,7 @@
case LYNQ_URC_DATA_CALL_STATUS_IND:
case LYNQ_URC_MODIFY_APNDB:
case LYNQ_URC_RESET_APNDB:
+ case RIL_UNSOL_LTE_NR_CA_INFO://LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715
break;
default:
return false;
diff --git a/common_src/lib/liblynq-network/lynq_module_common.h b/common_src/lib/liblynq-network/lynq_module_common.h
index 57ea5b2..89d18b4 100755
--- a/common_src/lib/liblynq-network/lynq_module_common.h
+++ b/common_src/lib/liblynq-network/lynq_module_common.h
@@ -64,5 +64,6 @@
#define MODULE_RUNNING (2)
extern int g_module_init_flag;
+extern int global_slot;
#endif
diff --git a/common_src/lib/liblynq-network/lynq_module_socket.cpp b/common_src/lib/liblynq-network/lynq_module_socket.cpp
index 0f48cd8..fd5f952 100755
--- a/common_src/lib/liblynq-network/lynq_module_socket.cpp
+++ b/common_src/lib/liblynq-network/lynq_module_socket.cpp
@@ -217,6 +217,7 @@
p->readInt32(&(head.token));
p->readInt32(&(head.request));
p->readInt32(&(head.slot_id));
+ global_slot=head.slot_id;//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715
p->readInt32(&(head.error));
PrintHeader(head);
return RESULT_OK;
@@ -984,6 +985,7 @@
case RIL_UNSOL_ON_USSD_REQUEST: return "UNSOL_ON_USSD_REQUEST(obsolete)";
case RIL_UNSOL_NITZ_TIME_RECEIVED: return "UNSOL_NITZ_TIME_RECEIVED";
case RIL_UNSOL_SIGNAL_STRENGTH: return "UNSOL_SIGNAL_STRENGTH";
+ case RIL_UNSOL_LTE_NR_CA_INFO: return "UNSOL_LTE_NR_CA_INFO";
case RIL_UNSOL_STK_SESSION_END: return "UNSOL_STK_SESSION_END";
case RIL_UNSOL_STK_PROACTIVE_COMMAND: return "UNSOL_STK_PROACTIVE_COMMAND";
case RIL_UNSOL_STK_EVENT_NOTIFY: return "UNSOL_STK_EVENT_NOTIFY";
diff --git a/common_src/lib/liblynq-network/lynq_network.cpp b/common_src/lib/liblynq-network/lynq_network.cpp
index b4ce94a..cbcb3e3 100755
--- a/common_src/lib/liblynq-network/lynq_network.cpp
+++ b/common_src/lib/liblynq-network/lynq_network.cpp
@@ -55,8 +55,11 @@
using ::android::Parcel;
static int s_module_wait_urc_id;
-static int s_module_urc_slot_id;
+static int s_module_urc_slot_id=0;
+int global_slot = 0;
static signalStrength_t s_network_urc_solSigStren;
+static int s_ca_cc_num[2][4];//0 lte dl 1 lte ul 2 nr dl 3 nr ul
+
/**g_module_init_flag
* @brief mark network initialization state
@@ -86,7 +89,11 @@
g_module_init_flag = MODULE_SWITCHING;
g_module_Global_uToken = utoken;
-
+
+ //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+ memset(s_ca_cc_num, 0, sizeof(s_ca_cc_num));
+ //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
+
int ret;
init_network_timer_all();
@@ -534,6 +541,43 @@
return ret;
}
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+//LTE CA: lte dl or ul cc num > 1 and nr dl/ul cc num all 0;
+//ENDC CA: lte dl or ul cc num 有>=1 and nr dl or ul cc num >=1;
+//NR CA: lte dl/ul cc num都是0 且 nr dl/ul cc num有一个大于1;
+int get_tech_and_ca_info(int radio_tech)
+{
+
+ if(radio_tech==RADIO_TECH_LTE)
+ {
+ if(global_slot>=0 && global_slot<=1 )
+ {
+ if((s_ca_cc_num[global_slot][0]>1 || s_ca_cc_num[global_slot][1]>1) && (s_ca_cc_num[global_slot][2]==0 && s_ca_cc_num[global_slot][3]==0))
+ {
+ return RADIO_TECH_LTE_CA;
+ }
+
+ if((s_ca_cc_num[global_slot][0]>=1 || s_ca_cc_num[global_slot][1]>=1) && (s_ca_cc_num[global_slot][2]>=1 || s_ca_cc_num[global_slot][3]>=1))
+ {
+ return RADIO_TECH_NR+1;//EN_DC
+ }
+
+ }
+ }
+ else if(radio_tech==RADIO_TECH_NR)
+ {
+ if(global_slot>=0 && global_slot<=1 )
+ {
+ if((s_ca_cc_num[global_slot][0]==0 && s_ca_cc_num[global_slot][1]==0) && (s_ca_cc_num[global_slot][2]>1 || s_ca_cc_num[global_slot][3]>1))
+ {
+ return RADIO_TECH_NR+2;//NR_CA
+ }
+ }
+ }
+ return radio_tech;
+}
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
+
int lynq_query_registration_state_from_parcel(Parcel* p, int num,int reject_index, int* regState,char * LAC,char * CID,int *netType,int *netRejected)
{
int i;
@@ -553,7 +597,7 @@
strcpy(CID,"");
strcpy(LAC,"");
*netType = RADIO_TECH_UNKNOWN;
- *netRejected = -1;
+ *netRejected = -1;
if((*regState)==1 || (*regState)==5)
{
if(resp[1]!=NULL)
@@ -576,7 +620,10 @@
if(resp[3]!=NULL)
{
- *netType = atoi(resp[3]);
+ //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+ int radio_tech= atoi(resp[3]);
+ *netType = get_tech_and_ca_info(radio_tech);
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
}
else
{
@@ -2400,20 +2447,121 @@
case RIL_UNSOL_RESPONSE_PS_NETWORK_STATE_CHANGED:
case RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED:
case RIL_UNSOL_SIGNAL_STRENGTH:
+ case RIL_UNSOL_LTE_NR_CA_INFO: //LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715
return true;
default:
return false;
}
}
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+void ril_urc_lte_nr_ca_info_process(Parcel *p,int slot_id)
+{
+ int num;
+ p->readInt32(&num);
+ if(num<4 || slot_id>=2)
+ {
+ LYERRLOG("ril_urc_lte_nr_ca_info_process num %d or slot id %d error",num,slot_id);
+ return;
+ }
+
+ for(int i=0;i <4;i++)
+ {
+ p->readInt32(&(s_ca_cc_num[slot_id][i]));
+ }
+
+ LYINFLOG("slot %d lte_nr_ca_info %d %d %d %d",slot_id,s_ca_cc_num[slot_id][0],s_ca_cc_num[slot_id][1],s_ca_cc_num[slot_id][2],s_ca_cc_num[slot_id][3]);
+
+}
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
+
+
+void ril_urc_signal_strength_process(Parcel *p, int size)
+{
+ int none = 0;
+ int rscp;
+ int ecno;
+
+ p->readInt32(&s_network_urc_solSigStren.rssi);
+ if(is_rssi_valid(s_network_urc_solSigStren.rssi))
+ {
+ s_network_urc_solSigStren.gw_sig_valid = 1;
+ LYINFLOG("urc_GSM_signalstrength:%d",s_network_urc_solSigStren.rssi);
+ }else{
+ s_network_urc_solSigStren.gw_sig_valid = 0;
+ }
+ p->readInt32(&none);
+ p->readInt32(&none);
+ p->readInt32(&none);
+ p->readInt32(&none);
+ p->readInt32(&none);
+ p->readInt32(&none);
+ p->readInt32(&none);
+ p->readInt32(&s_network_urc_solSigStren.lte_signalstrength);
+ p->readInt32(&s_network_urc_solSigStren.rsrp);
+ p->readInt32(&s_network_urc_solSigStren.rsrq);
+ p->readInt32(&s_network_urc_solSigStren.rssnr);
+ if(is_rssi_valid(s_network_urc_solSigStren.lte_signalstrength))
+ {
+ s_network_urc_solSigStren.lte_sig_valid = 1;
+ LYINFLOG("urc_LTE_signalstrength:%d",s_network_urc_solSigStren.lte_signalstrength);
+ }else{
+ s_network_urc_solSigStren.lte_sig_valid = 0;
+ }
+
+ p->readInt32(&none);
+ p->readInt32(&none);
+ p->readInt32(&none);
+ p->readInt32(&none);
+ p->readInt32(&none);
+ p->readInt32(&s_network_urc_solSigStren.wcdma_signalstrength);
+ p->readInt32(&none);//bitErrorRate
+ p->readInt32(&rscp);
+ p->readInt32(&ecno);
+ if(is_rssi_valid(s_network_urc_solSigStren.wcdma_signalstrength))
+ {
+ s_network_urc_solSigStren.wcdma_sig_valid = 1;
+ convert_rscp(rscp,&s_network_urc_solSigStren.rscp);
+ convert_ecno(ecno,&s_network_urc_solSigStren.ecno);
+ LYINFLOG("urc_WCDMA_signalstrength:%d",s_network_urc_solSigStren.wcdma_signalstrength);
+ }else{
+ s_network_urc_solSigStren.wcdma_sig_valid = 0;
+ }
+
+ if(size >= sizeof(RIL_SignalStrength_v14)+sizeof(int)*LYNQ_URC_MSG_HEAD_ELEMENT_NUM)
+ {
+ p->readInt32(&s_network_urc_solSigStren.ssRsrp);
+ if(is_nr_ss_rsrp_valid(s_network_urc_solSigStren.ssRsrp))
+ {
+ s_network_urc_solSigStren.nr_sig_valid = 1;
+ p->readInt32(&s_network_urc_solSigStren.ssRsrq);
+ p->readInt32(&s_network_urc_solSigStren.ssSinr);
+ p->readInt32(&s_network_urc_solSigStren.csiRsrp);
+ p->readInt32(&s_network_urc_solSigStren.csiRsrq);
+ p->readInt32(&s_network_urc_solSigStren.csiSinr);
+ LYINFLOG("[NR signal]ssRsrp is %d , ssRsrq is %d , ssSinr is %d , csiRsrp is %d , csiRsrq is %d , csiSinr is %d",\
+ s_network_urc_solSigStren.ssRsrp,s_network_urc_solSigStren.ssRsrq,s_network_urc_solSigStren.ssSinr, \
+ s_network_urc_solSigStren.csiRsrp,s_network_urc_solSigStren.csiRsrq,s_network_urc_solSigStren.csiSinr);
+ }
+ else
+ {
+ s_network_urc_solSigStren.nr_sig_valid = 0;
+ }
+ }
+ else
+ {
+ s_network_urc_solSigStren.nr_sig_valid = 0;
+ }
+ send_urc_signal_changes();
+}
+
void urc_msg_process(Parcel *p)
{
int resp_type;
- int none = 0;
+
int NR_sum = 0;
int size=p->dataSize();
- int rscp;
- int ecno;
+
p->readInt32(&resp_type);
p->readInt32(&s_module_wait_urc_id);
p->readInt32(&s_module_urc_slot_id);
@@ -2440,79 +2588,16 @@
}
case RIL_UNSOL_SIGNAL_STRENGTH:
{
- p->readInt32(&s_network_urc_solSigStren.rssi);
- if(is_rssi_valid(s_network_urc_solSigStren.rssi))
- {
- s_network_urc_solSigStren.gw_sig_valid = 1;
- LYINFLOG("urc_GSM_signalstrength:%d",s_network_urc_solSigStren.rssi);
- }else{
- s_network_urc_solSigStren.gw_sig_valid = 0;
- }
- p->readInt32(&none);
- p->readInt32(&none);
- p->readInt32(&none);
- p->readInt32(&none);
- p->readInt32(&none);
- p->readInt32(&none);
- p->readInt32(&none);
- p->readInt32(&s_network_urc_solSigStren.lte_signalstrength);
- p->readInt32(&s_network_urc_solSigStren.rsrp);
- p->readInt32(&s_network_urc_solSigStren.rsrq);
- p->readInt32(&s_network_urc_solSigStren.rssnr);
- if(is_rssi_valid(s_network_urc_solSigStren.lte_signalstrength))
- {
- s_network_urc_solSigStren.lte_sig_valid = 1;
- LYINFLOG("urc_LTE_signalstrength:%d",s_network_urc_solSigStren.lte_signalstrength);
- }else{
- s_network_urc_solSigStren.lte_sig_valid = 0;
- }
-
- p->readInt32(&none);
- p->readInt32(&none);
- p->readInt32(&none);
- p->readInt32(&none);
- p->readInt32(&none);
- p->readInt32(&s_network_urc_solSigStren.wcdma_signalstrength);
- p->readInt32(&none);//bitErrorRate
- p->readInt32(&rscp);
- p->readInt32(&ecno);
- if(is_rssi_valid(s_network_urc_solSigStren.wcdma_signalstrength))
- {
- s_network_urc_solSigStren.wcdma_sig_valid = 1;
- convert_rscp(rscp,&s_network_urc_solSigStren.rscp);
- convert_ecno(ecno,&s_network_urc_solSigStren.ecno);
- LYINFLOG("urc_WCDMA_signalstrength:%d",s_network_urc_solSigStren.wcdma_signalstrength);
- }else{
- s_network_urc_solSigStren.wcdma_sig_valid = 0;
- }
-
- if(size >= sizeof(RIL_SignalStrength_v14)+sizeof(int)*LYNQ_URC_MSG_HEAD_ELEMENT_NUM)
- {
- p->readInt32(&s_network_urc_solSigStren.ssRsrp);
- if(is_nr_ss_rsrp_valid(s_network_urc_solSigStren.ssRsrp))
- {
- s_network_urc_solSigStren.nr_sig_valid = 1;
- p->readInt32(&s_network_urc_solSigStren.ssRsrq);
- p->readInt32(&s_network_urc_solSigStren.ssSinr);
- p->readInt32(&s_network_urc_solSigStren.csiRsrp);
- p->readInt32(&s_network_urc_solSigStren.csiRsrq);
- p->readInt32(&s_network_urc_solSigStren.csiSinr);
- LYINFLOG("[NR signal]ssRsrp is %d , ssRsrq is %d , ssSinr is %d , csiRsrp is %d , csiRsrq is %d , csiSinr is %d",\
- s_network_urc_solSigStren.ssRsrp,s_network_urc_solSigStren.ssRsrq,s_network_urc_solSigStren.ssSinr, \
- s_network_urc_solSigStren.csiRsrp,s_network_urc_solSigStren.csiRsrq,s_network_urc_solSigStren.csiSinr);
- }
- else
- {
- s_network_urc_solSigStren.nr_sig_valid = 0;
- }
- }
- else
- {
- s_network_urc_solSigStren.nr_sig_valid = 0;
- }
- send_urc_signal_changes();
+ ril_urc_signal_strength_process(p,size);
break;
}
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_START
+ case RIL_UNSOL_LTE_NR_CA_INFO:
+ {
+ ril_urc_lte_nr_ca_info_process(p,s_module_urc_slot_id);
+ break;
+ }
+//LYNQ_T800_TASK_1764_RPT_5G_CA_CR_AUTO00455722_Q.HUANG_20250715_END
}
}