diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 4770d0a967..d25e3499b9 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -12,7 +12,7 @@ int CU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { DevAssert(pdu != NULL); - + UNUSED(stream); f1ap_reset_ack_t ack = {0}; /* Decode */ if (!decode_f1ap_reset_ack(pdu, &ack)) { @@ -30,6 +30,8 @@ int CU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint int CU_send_RESET_ACKNOWLEDGE(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack) { + UNUSED(assoc_id); + UNUSED(ack); AssertFatal(1 == 0, "Not implemented yet\n"); } diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index 32082c27a7..c28daa4263 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -19,6 +19,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(stream); f1ap_initial_ul_rrc_message_t msg; if (!decode_initial_ul_rrc_message_transfer(pdu, &msg)) { LOG_E(F1AP, "cannot decode F1 initial UL RRC message Transfer\n"); diff --git a/openair2/F1AP/f1ap_cu_task.c b/openair2/F1AP/f1ap_cu_task.c index 362d4d280d..6b8ad48198 100644 --- a/openair2/F1AP/f1ap_cu_task.c +++ b/openair2/F1AP/f1ap_cu_task.c @@ -26,9 +26,7 @@ static instance_t cu_task_create_gtpu_instance(eth_params_t *IPaddrs) { return gtpv1Init(tmp); } -static void cu_task_handle_sctp_association_ind(instance_t instance, - sctp_new_association_ind_t *sctp_new_association_ind, - eth_params_t *IPaddrs) +static void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind) { // save the assoc id f1ap_cudu_inst_t *f1ap_cu_data = getCxt(instance); @@ -80,7 +78,9 @@ static void cu_task_send_sctp_init_req(instance_t instance, char *my_addr) itti_send_msg_to_task(TASK_SCTP, instance, message_p); } -void *F1AP_CU_task(void *arg) { +void *F1AP_CU_task(void *arg) +{ + UNUSED(arg); MessageDef *received_msg = NULL; int result; LOG_I(F1AP, "Starting F1AP at CU\n"); @@ -113,8 +113,7 @@ void *F1AP_CU_task(void *arg) { switch (ITTI_MSG_ID(received_msg)) { case SCTP_NEW_ASSOCIATION_IND: cu_task_handle_sctp_association_ind(ITTI_MSG_ORIGIN_INSTANCE(received_msg), - &received_msg->ittiMsg.sctp_new_association_ind, - IPaddrs); + &received_msg->ittiMsg.sctp_new_association_ind); break; case SCTP_NEW_ASSOCIATION_RESP: diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index b7c853e66a..ff48873a5f 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -41,6 +41,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(sctp_assoc_t assoc_id, const f1ap_ue_contex int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(stream); f1ap_ue_context_setup_resp_t resp = {0}; if (!decode_ue_context_setup_resp(pdu, &resp)) { LOG_E(F1AP, "cannot decode F1 UE Context Setup Resp\n"); @@ -57,11 +58,16 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_ int CU_handle_UE_CONTEXT_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); + UNUSED(pdu); AssertFatal(1==0,"Not implemented yet\n"); } int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(stream); f1ap_ue_context_rel_req_t req = {0}; if (!decode_ue_context_rel_req(pdu, &req)) { LOG_E(F1AP, "cannot decode F1 UE Context Release Request\n"); @@ -94,6 +100,7 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, f1ap_ue_context_re int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(stream); f1ap_ue_context_rel_cplt_t cplt = {0}; if (!decode_ue_context_rel_cplt(pdu, &cplt)) { LOG_E(F1AP, "cannot decode F1 UE Context Release Complete\n"); @@ -126,6 +133,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(sctp_assoc_t assoc_id, const f1ap_ue int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(stream); f1ap_ue_context_mod_resp_t resp = {0}; if (!decode_ue_context_mod_resp(pdu, &resp)) { LOG_E(F1AP, "cannot decode F1 UE Context Modification Response\n"); @@ -141,13 +149,17 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, sctp_assoc_t int CU_handle_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { - AssertFatal(1 == 0, "Not implemented yet\n"); + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); + UNUSED(pdu); + AssertFatal(1 == 0, "Not implemented yet\n"); } int CU_handle_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { DevAssert(pdu != NULL); - + UNUSED(stream); MessageDef *msg_p = itti_alloc_new_message(TASK_DU_F1, 0, F1AP_UE_CONTEXT_MODIFICATION_REQUIRED); msg_p->ittiMsgHeader.originInstance = assoc_id; f1ap_ue_context_modif_required_t *required = &F1AP_UE_CONTEXT_MODIFICATION_REQUIRED(msg_p); diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 848e7ab02a..c2bbda1b69 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -14,6 +14,7 @@ int DU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); LOG_D(F1AP, "DU_handle_RESET\n");\ F1AP_Reset_t *container; F1AP_ResetIEs_t *ie; @@ -133,6 +134,9 @@ int DU_send_F1_SETUP_REQUEST(sctp_assoc_t assoc_id, const f1ap_setup_req_t *setu int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); LOG_D(F1AP, "DU_handle_F1_SETUP_RESPONSE\n"); /* Decode */ f1ap_setup_resp_t resp = {0}; @@ -153,6 +157,9 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint */ int DU_handle_F1_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); f1ap_setup_failure_t fail; if (!decode_f1ap_setup_failure(pdu, &fail)) { LOG_E(F1AP, "Failed to decode F1AP Setup Failure\n"); @@ -189,6 +196,8 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(sctp_assoc_t assoc_id, f1ap_gnb_du_confi */ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(stream); LOG_D(F1AP, "DU_handle_gNB_CU_CONFIGURATION_UPDATE\n"); f1ap_gnb_cu_configuration_update_t in = {0}; if (!decode_f1ap_cu_configuration_update(pdu, &in)) { @@ -212,6 +221,9 @@ int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); // Decoding f1ap_gnb_du_configuration_update_acknowledge_t in = {0}; if (!decode_f1ap_du_configuration_update_acknowledge(pdu, &in)) { @@ -225,8 +237,10 @@ int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, return 0; } -int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(sctp_assoc_t assoc_id, - f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure) { +int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(sctp_assoc_t assoc_id, + f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure) +{ + UNUSED(assoc_id); AssertFatal(1==0,"received gNB CU CONFIGURATION UPDATE FAILURE with cause %d\n", GNBCUConfigurationUpdateFailure->cause); } diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 7d1811d212..e2439b4f42 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -29,6 +29,9 @@ /* DL RRC Message Transfer */ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); f1ap_dl_rrc_message_t msg = {0}; if (!decode_dl_rrc_message_transfer(pdu, &msg)) { LOG_E(F1AP, "cannot decode F1 DL RRC message Transfer\n"); diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 3d27f7db19..78117bd0c1 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -90,7 +90,9 @@ void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_dat AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); } -void *F1AP_DU_task(void *arg) { +void *F1AP_DU_task(void *arg) +{ + UNUSED(arg); //sctp_cu_init(); LOG_I(F1AP, "Starting F1AP at DU\n"); itti_mark_task_ready(TASK_DU_F1); diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c index 0c3eb853f8..9e620106c7 100644 --- a/openair2/F1AP/f1ap_du_ue_context_management.c +++ b/openair2/F1AP/f1ap_du_ue_context_management.c @@ -14,6 +14,9 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); f1ap_ue_context_setup_req_t req = {0}; if (!decode_ue_context_setup_req(pdu, &req)) { LOG_E(F1AP, "cannot decode F1 UE Context Setup Request\n"); @@ -45,6 +48,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(sctp_assoc_t assoc_id, f1ap_ue_context_set int DU_send_UE_CONTEXT_SETUP_FAILURE(sctp_assoc_t assoc_id) { + UNUSED(assoc_id); AssertFatal(1==0,"Not implemented yet\n"); } @@ -66,6 +70,9 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(sctp_assoc_t assoc_id, f1ap_ue_context_re int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); f1ap_ue_context_rel_cmd_t cmd = {0}; if (!decode_ue_context_rel_cmd(pdu, &cmd)) { LOG_E(F1AP, "cannot decode F1 UE Context Release Command\n"); @@ -96,6 +103,9 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(sctp_assoc_t assoc_id, f1ap_ue_context_r int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); f1ap_ue_context_mod_req_t req = {0}; if (!decode_ue_context_mod_req(pdu, &req)) { LOG_E(F1AP, "cannot decode F1 UE Context Modification Request\n"); @@ -124,7 +134,9 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(sctp_assoc_t assoc_id, f1ap_ue_cont return 0; } -int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(sctp_assoc_t assoc_id) { +int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(sctp_assoc_t assoc_id) +{ + UNUSED(assoc_id); AssertFatal(1==0,"Not implemented yet\n"); } @@ -250,6 +262,9 @@ int DU_send_UE_CONTEXT_MODIFICATION_REQUIRED(sctp_assoc_t assoc_id, f1ap_ue_cont int DU_handle_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); F1AP_UEContextModificationConfirm_t *container = &pdu->choice.successfulOutcome->value.choice.UEContextModificationConfirm; f1ap_ue_context_modif_confirm_t confirm = {0}; F1AP_UEContextModificationConfirmIEs_t *ie = NULL; @@ -326,6 +341,9 @@ int DU_handle_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, sctp_assoc_t int DU_handle_UE_CONTEXT_MODIFICATION_REFUSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); F1AP_UEContextModificationRefuse_t *container = &pdu->choice.unsuccessfulOutcome->value.choice.UEContextModificationRefuse; f1ap_ue_context_modif_refuse_t refuse = {0}; F1AP_UEContextModificationRefuseIEs_t *ie = NULL; diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c index ae7ff9933b..040a549462 100644 --- a/openair2/GNB_APP/gnb_app.c +++ b/openair2/GNB_APP/gnb_app.c @@ -82,11 +82,11 @@ uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end) { void *gNB_app_task(void *args_p) { - - MessageDef *msg_p = NULL; - const char *msg_name = NULL; - instance_t instance; - int result; + UNUSED(args_p); + MessageDef *msg_p = NULL; + const char *msg_name = NULL; + instance_t instance; + int result; /* for no gcc warnings */ (void)instance; diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h index f4d6d6bda8..74adb9325f 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h @@ -37,14 +37,12 @@ void nr_ue_decode_mib(NR_UE_MAC_INST_t *mac, int cc_id); /**\brief decode SIB1 and other SIs pdus in NR_UE, from if_module dl_ind \param mac pointer to MAC instance - \param cc_id component carrier id \param gNB_index gNB index \param sibs_mask sibs mask \param pduP pointer to pdu \param pdu_length length of pdu \param frame,slot Received TTI*/ void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac, - int cc_id, unsigned int gNB_index, uint8_t ack_nack, uint8_t *pduP, diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c index 2937794ca3..8576028f9b 100644 --- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c +++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c @@ -15,7 +15,7 @@ static NR_UE_MAC_INST_t *nr_ue_mac_inst[MAX_NUM_NR_UE_INST] = {0}; void send_srb0_rrc(int ue_id, const uint8_t *sdu, sdu_size_t sdu_len, void *data) { AssertFatal(sdu_len > 0 && sdu_len < CCCH_SDU_SIZE, "invalid CCCH SDU size %d\n", sdu_len); - + UNUSED(data); MessageDef *message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_CCCH_DATA_IND); memset(NR_RRC_MAC_CCCH_DATA_IND(message_p).sdu, 0, sdu_len); memcpy(NR_RRC_MAC_CCCH_DATA_IND(message_p).sdu, sdu, sdu_len); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index d6c49d3797..65dab84a0b 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -270,7 +270,6 @@ static void configure_ratematching_csi(fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsc } void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac, - int cc_id, unsigned int gNB_index, uint8_t ack_nack, uint8_t *pduP, @@ -281,7 +280,7 @@ void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac, { if(ack_nack) { LOG_D(NR_MAC, "Decoding NR-BCCH-DL-SCH-Message (SIB1 or SI)\n"); - nr_mac_rrc_data_ind_ue(mac->ue_id, cc_id, gNB_index, hfn, frame, slot, 0, mac->physCellId, 0, NR_BCCH_DL_SCH, (uint8_t *) pduP, pdu_len); + nr_mac_rrc_data_ind_ue(mac->ue_id, gNB_index, hfn, frame, slot, mac->physCellId, 0, NR_BCCH_DL_SCH, (uint8_t *) pduP, pdu_len); if (mac->get_sib1) mac->get_sib1 = false; for (int i = 0; i < MAX_SI_GROUPS; i++) { @@ -298,7 +297,7 @@ void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac, } else { LOG_E(NR_MAC, "Got NACK on NR-BCCH-DL-SCH-Message (%s)\n", mac->get_sib1 ? "SIB1" : "other SI"); - nr_mac_rrc_data_ind_ue(mac->ue_id, cc_id, gNB_index, hfn, frame, slot, 0, mac->physCellId, 0, NR_BCCH_DL_SCH, NULL, 0); + nr_mac_rrc_data_ind_ue(mac->ue_id, gNB_index, hfn, frame, slot, mac->physCellId, 0, NR_BCCH_DL_SCH, NULL, 0); } } diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index e461459238..202590f9fc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -1213,7 +1213,7 @@ bool nr_mac_add_test_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t bool res = add_connected_nr_ue(nrmac, UE); if (!res) { LOG_E(NR_MAC, "Error adding UE %04x\n", rnti); - delete_nr_ue_data(UE, NULL, &nrmac->UE_info.uid_allocator); + delete_nr_ue_data(UE, &nrmac->UE_info.uid_allocator); NR_SCHED_UNLOCK(&nrmac->sched_lock); return false; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 48fa4a3aca..ab2588a25b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -169,7 +169,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, slot_t slo } nr_measgap_scheduling(gNB, frame, slot); - nr_mac_update_timers(module_idP, frame, slot); + nr_mac_update_timers(module_idP); if (wait_prach_completed || get_softmodem_params()->phy_test) { // This schedules MIB diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 180c43b12a..6b2c9e23ac 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -24,7 +24,7 @@ #include -static void nr_fill_rar(uint8_t Mod_idP, NR_UE_info_t *UE, uint8_t *dlsch_buffer, nfapi_nr_pusch_pdu_t *pusch_pdu); +static void nr_fill_rar(NR_UE_info_t *UE, uint8_t *dlsch_buffer, nfapi_nr_pusch_pdu_t *pusch_pdu); static const float ssb_per_rach_occasion[8] = {0.125, 0.25, 0.5, 1, 2, 4, 8}; @@ -640,6 +640,7 @@ static uint8_t nr_get_msg3_tpc(uint32_t preamble_power) // in any case OAI L1 sets this as invalid // and Aerial report doesn't seem to be reliable (not matching preambleReceivedTargetPower) // so for now we feedback 0dB TPC + UNUSED(preamble_power); return 3; // it means 0dB } @@ -700,7 +701,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, UE = get_new_nr_ue_inst(&nr_mac->UE_info.uid_allocator, rnti, NULL, &nr_mac->radio_config); if (!add_new_UE_RA(nr_mac, UE)) { LOG_E(NR_MAC, "FAILURE: %4d.%2d initiating RA procedure for preamble index %d: no free RA process\n", frame, slot, preamble_index); - delete_nr_ue_data(UE, NULL, &nr_mac->UE_info.uid_allocator); + delete_nr_ue_data(UE, &nr_mac->UE_info.uid_allocator); NR_SCHED_UNLOCK(&nr_mac->sched_lock); return; } @@ -1176,7 +1177,7 @@ static void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, slot_ future_ul_tti_req->n_pdus += 1; // calling function to fill rar message - nr_fill_rar(module_idP, UE, RAR_pdu, pusch_pdu); + nr_fill_rar(UE, RAR_pdu, pusch_pdu); } static bool check_msg2_monitoring(const NR_SearchSpace_t *ss, int slots_per_frame, int current_frame, int current_slot) @@ -1260,7 +1261,6 @@ static void prepare_dl_pdus(gNB_MAC_INST *nr_mac, nr_rnti_type_t rnti_type, int aggregation_level, int CCEIndex, - int ndi, int current_harq_pid, int CC_id, int rnti, @@ -1574,7 +1574,6 @@ static void nr_generate_Msg2(module_id_t module_idP, aggregation_level, CCEIndex, 0, - 0, CC_id, ra->RA_rnti, 0, @@ -1867,7 +1866,6 @@ static void nr_generate_Msg4_MsgB(module_id_t module_idP, TYPE_TC_RNTI_, aggregation_level, CCEIndex, - harq->ndi, current_harq_pid, CC_id, rnti, @@ -1996,7 +1994,7 @@ bool nr_check_Msg4_MsgB_Ack(module_id_t module_id, frame_t frame, slot_t slot, N // - sending only 1 RAR subPDU // - UL Grant: hardcoded CSI, TPC, time alloc // - padding -static void nr_fill_rar(uint8_t Mod_idP, NR_UE_info_t *UE, uint8_t *dlsch_buffer, nfapi_nr_pusch_pdu_t *pusch_pdu) +static void nr_fill_rar(NR_UE_info_t *UE, uint8_t *dlsch_buffer, nfapi_nr_pusch_pdu_t *pusch_pdu) { NR_RA_t *ra = UE->ra; LOG_D(NR_MAC, @@ -2095,7 +2093,7 @@ void nr_release_ra_UE(gNB_MAC_INST *mac, rnti_t rnti) NR_UEs_t *UE_info = &mac->UE_info; NR_UE_info_t *UE = remove_UE_from_list(NR_NB_RA_PROC_MAX, UE_info->access_ue_list, rnti); if (UE) { - delete_nr_ue_data(UE, mac->common_channels, &UE_info->uid_allocator); + delete_nr_ue_data(UE, &UE_info->uid_allocator); } else { LOG_W(NR_MAC,"Call to release RA UE with rnti %04x, but not existing\n", rnti); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 894a829909..977c3d12a9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -328,7 +328,6 @@ static void nr_fill_nfapi_dl_SIB_pdu(gNB_MAC_INST *gNB_mac, int cce_index, nfapi_nr_dl_tti_request_body_t *dl_req, int pdu_index, - NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config, bool is_sib1, int beam_index) { @@ -574,7 +573,6 @@ void schedule_nr_sib1(module_id_t module_idP, cce_index, dl_req, pdu_index, - type0_PDCCH_CSS_config, true, beam_index); @@ -710,7 +708,6 @@ static void other_sib_sched_control(module_id_t module_idP, cce_index, dl_req, pdu_index, - type0_PDCCH_CSS_config, false, beam_index); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 9bd6ecc686..d2f3b764d7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -577,7 +577,7 @@ static void ack_reconfig(gNB_MAC_INST *mac, NR_UE_info_t *UE) configure_UE_BWP(mac, scc, UE, false, NR_SearchSpace__searchSpaceType_PR_common, -1, -1); } -static bool dlsch_to_schedule(const NR_UE_sched_ctrl_t *sched_ctrl, int frame) +static bool dlsch_to_schedule(const NR_UE_sched_ctrl_t *sched_ctrl) { /* Check DL buffer, TA to be sent and beam switch needed*/ if (sched_ctrl->num_total_bytes > 0) @@ -686,7 +686,7 @@ static void pf_dl(gNB_MAC_INST *mac, update_dlsch_buffer(pp_pdsch->frame, pp_pdsch->slot, UE); - if (!dlsch_to_schedule(sched_ctrl, frame)) + if (!dlsch_to_schedule(sched_ctrl)) continue; /* Calculate coeff */ @@ -915,7 +915,7 @@ static void nr_dlsch_preprocessor(gNB_MAC_INST *mac, post_process_pdsch_t *pp_pd pf_dl(mac, pp_pdsch, UE_info->connected_ue_list, max_sched_ues, num_beams, n_rb_sched); } -nr_pp_impl_dl nr_init_dlsch_preprocessor(int CC_id) +nr_pp_impl_dl nr_init_dlsch_preprocessor() { return nr_dlsch_preprocessor; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 20e92f7130..9d267d4d2e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -2509,7 +2509,7 @@ NR_UE_info_t *find_ra_UE(NR_UEs_t *UEs, rnti_t rntiP) return NULL; } -void delete_nr_ue_data(NR_UE_info_t *UE, NR_COMMON_channels_t *ccPtr, uid_allocator_t *uia) +void delete_nr_ue_data(NR_UE_info_t *UE, uid_allocator_t *uia) { ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->CellGroup); ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->reconfigCellGroup); @@ -2553,7 +2553,7 @@ void free_transportBlock_buffer(byte_array_t *tb) free_byte_array(*tb); } -void set_max_fb_time(NR_UE_UL_BWP_t *UL_BWP, const NR_UE_DL_BWP_t *DL_BWP) +static void set_max_fb_time(NR_UE_UL_BWP_t *UL_BWP) { UL_BWP->max_fb_time = 8; // default value // take the maximum in dl_DataToUL_ACK list @@ -2955,7 +2955,7 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac, create_dl_harq_list(sched_ctrl, sc_info, format_00_10); create_ul_harq_list(sched_ctrl, sc_info, format_00_10); - set_max_fb_time(UL_BWP, DL_BWP); + set_max_fb_time(UL_BWP); set_sched_pucch_list(sched_ctrl, UL_BWP, scc, &nr_mac->frame_structure); // Set MCS tables @@ -3073,7 +3073,7 @@ bool add_connected_nr_ue(gNB_MAC_INST *nr_mac, NR_UE_info_t *UE) bool success = add_UE_to_list(MAX_MOBILES_PER_GNB, UE_info->connected_ue_list, UE); if (!success) { LOG_E(NR_MAC,"Try to add UE %04x but the list is full\n", UE->rnti); - delete_nr_ue_data(UE, NULL, &UE_info->uid_allocator); + delete_nr_ue_data(UE, &UE_info->uid_allocator); return false; } @@ -3140,7 +3140,7 @@ void mac_remove_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rnti) NR_UEs_t *UE_info = &nr_mac->UE_info; NR_UE_info_t *UE = remove_UE_from_list(MAX_MOBILES_PER_GNB + 1, UE_info->connected_ue_list, rnti); if (UE) - delete_nr_ue_data(UE, nr_mac->common_channels, &UE_info->uid_allocator); + delete_nr_ue_data(UE, &UE_info->uid_allocator); else nr_release_ra_UE(nr_mac, rnti); } @@ -3606,7 +3606,7 @@ void beam_switching_procedure(gNB_MAC_INST *mac, NR_UE_info_t *UE, int new_beam_ nr_mac_trigger_reconfiguration(mac, UE, -1, true); } -void nr_mac_update_timers(module_id_t module_id, frame_t frame, slot_t slot) +void nr_mac_update_timers(module_id_t module_id) { gNB_MAC_INST *mac = RC.nrmac[module_id]; @@ -3617,7 +3617,7 @@ void nr_mac_update_timers(module_id_t module_id, frame_t frame, slot_t slot) UE_iterator(UE_info->connected_ue_list, UE) { NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; - if (nr_mac_check_release(sched_ctrl, UE->rnti)) { + if (nr_mac_check_release(sched_ctrl)) { // trigger release first as nr_mac_release_ue() invalidates UE ptr nr_mac_trigger_release_complete(mac, UE->rnti); nr_mac_release_ue(mac, UE->rnti); @@ -3886,7 +3886,7 @@ void nr_mac_trigger_release_timer(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierS sched_ctrl->release_timer = 100 << subcarrier_spacing; } -bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl, int rnti) +bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl) { if (sched_ctrl->release_timer == 0) return false; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index b779489abd..a6f66d738a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -421,8 +421,7 @@ static uint8_t pickandreverse_bits(uint8_t *payload, uint16_t bitlen, uint8_t st return rev_bits; } -static void evaluate_sinr_report(gNB_MAC_INST *nrmac, - NR_UE_info_t *UE, +static void evaluate_sinr_report(NR_UE_info_t *UE, NR_UE_sched_ctrl_t *sched_ctrl, uint8_t csi_report_id, uint8_t *payload, @@ -504,8 +503,7 @@ static void evaluate_sinr_report(gNB_MAC_INST *nrmac, LOG_D(MAC, "Reported SSB-SINR = %01f, dl_max_mcs %d\n", sinr_report->r[0].SINRx10 / 10.0, sched_ctrl->dl_max_mcs); } -static void evaluate_rsrp_report(gNB_MAC_INST *nrmac, - NR_UE_info_t *UE, +static void evaluate_rsrp_report(NR_UE_info_t *UE, NR_UE_sched_ctrl_t *sched_ctrl, uint8_t csi_report_id, uint8_t *payload, @@ -741,7 +739,7 @@ static void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig, LOG_D(MAC, "SFN/SF:%d/%d reportQuantity type = %d, type_r16 = %d\n", frame, slot, reportQuantity_type, reportQuantity_type_r16); if (reportQuantity_type_r16 == NR_CSI_ReportConfig__ext2__reportQuantity_r16_PR_cri_SINR_r16 || reportQuantity_type_r16 == NR_CSI_ReportConfig__ext2__reportQuantity_r16_PR_ssb_Index_SINR_r16) { - evaluate_sinr_report(nrmac, UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type_r16); + evaluate_sinr_report(UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type_r16); } else { // phy-test has hardcoded allocation, so no use to handle CSI reports except RSRP if (get_softmodem_params()->phy_test @@ -750,10 +748,10 @@ static void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig, continue; switch (reportQuantity_type) { case NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP: - evaluate_rsrp_report(nrmac, UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type); + evaluate_rsrp_report(UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type); break; case NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP: - evaluate_rsrp_report(nrmac, UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type); + evaluate_rsrp_report(UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type); new_bf_index = beam_selection_procedures(nrmac, UE); break; case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_CQI: @@ -1046,7 +1044,7 @@ static void set_pucch_allocation(const NR_UE_UL_BWP_t *ul_bwp, const int r_pucch } } -static bool test_pucch0_vrb_occupation(const NR_sched_pucch_t *pucch, uint16_t *vrb_map_UL, const int bwp_start, const int bwp_size) +static bool test_pucch0_vrb_occupation(const NR_sched_pucch_t *pucch, uint16_t *vrb_map_UL, const int bwp_start) { // We assume initial cyclic shift is always 0 so different pucch resources can't overlap @@ -1235,7 +1233,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac, } const int index = ul_buffer_index(pucch_frame, pucch_slot, n_slots_frame, mac->vrb_map_UL_size); uint16_t *vrb_map_UL = &mac->common_channels[CC_id].vrb_map_UL[beam.idx][index * MAX_BWP_SIZE]; - bool ret = test_pucch0_vrb_occupation(curr_pucch, vrb_map_UL, bwp_start, bwp_size); + bool ret = test_pucch0_vrb_occupation(curr_pucch, vrb_map_UL, bwp_start); if(!ret) { LOG_D(NR_MAC, "DL %4d.%2d, UL_ACK %4d.%2d PRB resources for this occasion are already occupied, move to the following occasion\n", @@ -1336,10 +1334,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, slot_t slot) const int bwp_start = ul_bwp->BWPStart; const int bwp_size = ul_bwp->BWPSize; set_pucch_allocation(ul_bwp, -1, bwp_size, curr_pucch); - bool ret = test_pucch0_vrb_occupation(curr_pucch, - vrb_map_UL, - bwp_start, - bwp_size); + bool ret = test_pucch0_vrb_occupation(curr_pucch, vrb_map_UL, bwp_start); if (!ret) { LOG_E(NR_MAC,"Cannot schedule SR. PRBs not available\n"); continue; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 6a85cfb970..a223684741 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -339,7 +339,6 @@ static rnti_t lcid_crnti_lookahead(uint8_t *pdu, uint32_t pdu_len) static int nr_process_mac_pdu(instance_t module_idP, NR_UE_info_t *UE, - uint8_t CC_id, frame_t frameP, slot_t slot, uint8_t *pduP, @@ -640,13 +639,7 @@ static void abort_nr_ul_harq(NR_UE_info_t *UE, int8_t harq_pid) sched_ctrl->sched_ul_bytes = 0; } -static void handle_nr_ul_harq(gNB_MAC_INST *nrmac, - NR_UE_info_t *UE, - frame_t frame, - slot_t slot, - rnti_t rnti, - int crc_harq_id, - bool crc_status) +static void handle_nr_ul_harq(gNB_MAC_INST *nrmac, NR_UE_info_t *UE, rnti_t rnti, int crc_harq_id, bool crc_status) { if (nrmac->radio_config.disable_harq) { LOG_D(NR_MAC, "skipping UL feedback handling as HARQ is disabled\n"); @@ -756,7 +749,7 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, UE->UE_sched_ctrl.ta_frame = (frame + 100) % MAX_FRAME_NUMBER; if (!transition_ra_connected_nr_ue(mac, UE)) { LOG_E(NR_MAC, "cannot add UE %04x: list is full\n", UE->rnti); - delete_nr_ue_data(UE, NULL, &mac->UE_info.uid_allocator); + delete_nr_ue_data(UE, &mac->UE_info.uid_allocator); } else { LOG_A(NR_MAC, "(rnti 0x%04x) CFRA procedure succeeded!\n", UE->rnti); } @@ -869,7 +862,7 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, // Decode the entire MAC PDU // It may have multiple MAC subPDUs, for example, a MAC subPDU with LCID 1 caring a RRCReestablishmentComplete - nr_process_mac_pdu(mod_id, old_UE, CC_id, frame, slot, sdu, sdu_len, -1); + nr_process_mac_pdu(mod_id, old_UE, frame, slot, sdu, sdu_len, -1); return; } @@ -884,7 +877,7 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, // Decode MAC PDU // the function is only called to decode the contention resolution sub-header // harq_pid set a non-valid value because it is not used in this call - nr_process_mac_pdu(mod_id, UE, CC_id, frame, slot, sdu, sdu_len, -1); + nr_process_mac_pdu(mod_id, UE, frame, slot, sdu, sdu_len, -1); LOG_I(NR_MAC, "Activating scheduling %s for TC_RNTI 0x%04x (state %s)\n", @@ -982,7 +975,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, if (UE_scheduling_control->sched_ul_bytes < 0) UE_scheduling_control->sched_ul_bytes = 0; - nr_process_mac_pdu(gnb_mod_idP, UE, CC_idP, frameP, slotP, sduP, sdu_lenP, harq_pid); + nr_process_mac_pdu(gnb_mod_idP, UE, frameP, slotP, sduP, sdu_lenP, harq_pid); } else { if (ul_cqi == 0xff || ul_cqi <= 128) { UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt++; @@ -1000,7 +993,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, nr_mac_trigger_ul_failure(&UE->UE_sched_ctrl, UE->current_UL_BWP.scs); } } - handle_nr_ul_harq(gNB_mac, UE, frameP, slotP, current_rnti, harq_pid, sduP == NULL); + handle_nr_ul_harq(gNB_mac, UE, current_rnti, harq_pid, sduP == NULL); } else { nr_rx_ra_sdu(gnb_mod_idP, CC_idP, frameP, slotP, current_rnti, sduP, sdu_lenP, harq_pid, timing_advance, ul_cqi, rssi); } @@ -1381,10 +1374,8 @@ static void get_precoder_matrix_coef(char *w, static int nr_srs_tpmi_estimation(const NR_PUSCH_Config_t *pusch_Config, const long transform_precoding, const uint8_t *channel_matrix, - const uint8_t normalized_iq_representation, const uint16_t num_gnb_antenna_elements, const uint16_t num_ue_srs_ports, - const uint16_t prg_size, const uint16_t num_prgs, const uint8_t ul_ri) { @@ -1593,10 +1584,8 @@ void handle_nr_srs_measurements(const module_id_t module_id, sched_ctrl->srs_feedback.tpmi = nr_srs_tpmi_estimation(current_BWP->pusch_Config, current_BWP->transform_precoding, nr_srs_channel_iq_matrix.channel_matrix, - nr_srs_channel_iq_matrix.normalized_iq_representation, nr_srs_channel_iq_matrix.num_gnb_antenna_elements, nr_srs_channel_iq_matrix.num_ue_srs_ports, - nr_srs_channel_iq_matrix.prg_size, nr_srs_channel_iq_matrix.num_prgs, sched_ctrl->srs_feedback.ul_ri); stop_meas(&nr_mac->nr_srs_tpmi_computation_timer); @@ -2642,7 +2631,7 @@ static void nr_ulsch_preprocessor(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp } } -nr_pp_impl_ul nr_init_ulsch_preprocessor(int CC_id) +nr_pp_impl_ul nr_init_ulsch_preprocessor() { return nr_ulsch_preprocessor; } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 433bb4aa32..0c62645318 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -26,7 +26,7 @@ int get_dl_slots_per_period(const frame_structure_t *fs); int get_full_ul_slots_per_period(const frame_structure_t *fs); int get_full_dl_slots_per_period(const frame_structure_t *fs); int get_ul_slot_offset(const frame_structure_t *fs, int idx, bool count_mixed); -void delete_nr_ue_data(NR_UE_info_t *UE, NR_COMMON_channels_t *ccPtr, uid_allocator_t *uia); +void delete_nr_ue_data(NR_UE_info_t *UE, uid_allocator_t *uia); void mac_top_init_gNB(ngran_node_t node_type, NR_ServingCellConfigCommon_t *scc, @@ -47,7 +47,7 @@ int nr_transmission_action_indicator_stop(gNB_MAC_INST *mac, NR_UE_info_t *UE_in void clear_nr_nfapi_information(gNB_MAC_INST *gNB, int CC_idP, frame_t frameP, slot_t slotP); -void nr_mac_update_timers(module_id_t module_id, frame_t frame, slot_t slot); +void nr_mac_update_timers(module_id_t module_id); void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame_rxP, slot_t slot_rxP, NR_Sched_Rsp_t *sched_info); @@ -61,7 +61,7 @@ void nr_schedule_ue_spec(module_id_t module_id, nfapi_nr_tx_data_request_t *TX_req); /* \brief default DL preprocessor init routine, returns preprocessor to call */ -nr_pp_impl_dl nr_init_dlsch_preprocessor(int CC_id); +nr_pp_impl_dl nr_init_dlsch_preprocessor(); void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, @@ -85,7 +85,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, slot_t slotP, nfapi void nr_schedule_ulsch(module_id_t module_id, frame_t frame, slot_t slot, nfapi_nr_ul_dci_request_t *ul_dci_req); /* \brief default UL preprocessor init routine, returns preprocessor to call */ -nr_pp_impl_ul nr_init_ulsch_preprocessor(int CC_id); +nr_pp_impl_ul nr_init_ulsch_preprocessor(); /////// Random Access MAC-PHY interface functions and primitives /////// @@ -284,7 +284,6 @@ void remove_front_nr_list(NR_list_t *listP); void nr_release_ra_UE(gNB_MAC_INST *mac, rnti_t rnti); NR_UE_info_t * find_nr_UE(NR_UEs_t* UEs, rnti_t rntiP); NR_UE_info_t *find_ra_UE(NR_UEs_t *UEs, rnti_t rntiP); -void delete_nr_ue_data(NR_UE_info_t *UE, NR_COMMON_channels_t *ccPtr, uid_allocator_t *uia); void configure_UE_BWP(gNB_MAC_INST *nr_mac, NR_ServingCellConfigCommon_t *scc, NR_UE_info_t *UE, @@ -469,7 +468,7 @@ void finish_nr_dl_harq(NR_UE_sched_ctrl_t *sched_ctrl, int harq_pid); void abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid); void nr_mac_trigger_release_timer(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierSpacing_t subcarrier_spacing); -bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl, int rnti); +bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl); void nr_mac_trigger_release_complete(gNB_MAC_INST *mac, int rnti); void nr_mac_release_ue(gNB_MAC_INST *mac, int rnti); bool nr_mac_request_release_ue(const gNB_MAC_INST *nrmac, int rnti); diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c index edb0eec898..64779bc250 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -74,6 +74,10 @@ bool DURecvCb(protocol_ctxt_t *ctxt_pP, const uint32_t *sourceL2Id, const uint32_t *destinationL2Id) { + UNUSED(confirmP); + UNUSED(modeP); + UNUSED(sourceL2Id); + UNUSED(destinationL2Id); // The buffer comes from the stack in gtp-u thread, we have a make a separate buffer to enqueue in a inter-thread message queue uint8_t *sdu = malloc16(sdu_buffer_sizeP); memcpy(sdu, sdu_buffer_pP, sdu_buffer_sizeP); @@ -196,6 +200,7 @@ void f1_setup_response(const f1ap_setup_resp_t *resp) void f1_setup_failure(const f1ap_setup_failure_t *failure) { + UNUSED(failure); LOG_E(MAC, "the CU reported F1AP Setup Failure, is there a configuration mismatch?\n"); exit(1); } @@ -577,7 +582,7 @@ static NR_UE_info_t *create_new_UE(gNB_MAC_INST *mac, uint32_t cu_id, const NR_C DevAssert(res); } else { if (!add_new_UE_RA(mac, UE)) { - delete_nr_ue_data(UE, /*not used*/ NULL, &mac->UE_info.uid_allocator); + delete_nr_ue_data(UE, &mac->UE_info.uid_allocator); LOG_E(NR_MAC, "UE list full while creating new UE\n"); return NULL; } diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index 405c7fa306..ca12c48c48 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -303,8 +303,8 @@ void mac_top_init_gNB(ngran_node_t node_type, RC.nrmac[i]->pre_processor_dl = nr_preprocessor_phytest; RC.nrmac[i]->pre_processor_ul = nr_ul_preprocessor_phytest; } else { - RC.nrmac[i]->pre_processor_dl = nr_init_dlsch_preprocessor(0); - RC.nrmac[i]->pre_processor_ul = nr_init_ulsch_preprocessor(0); + RC.nrmac[i]->pre_processor_dl = nr_init_dlsch_preprocessor(); + RC.nrmac[i]->pre_processor_ul = nr_init_ulsch_preprocessor(); } if (!IS_SOFTMODEM_NOSTATS) threadCreate(&RC.nrmac[i]->stats_thread, @@ -344,10 +344,10 @@ void mac_top_destroy_gNB(gNB_MAC_INST *mac) NR_UEs_t *UE_info = &mac->UE_info; for (int i = 0; i < sizeofArray(UE_info->connected_ue_list); ++i) if (UE_info->connected_ue_list[i]) - delete_nr_ue_data(UE_info->connected_ue_list[i], cc, &UE_info->uid_allocator); + delete_nr_ue_data(UE_info->connected_ue_list[i], &UE_info->uid_allocator); for (int i = 0; i < sizeofArray(UE_info->access_ue_list); ++i) if (UE_info->access_ue_list[i]) - delete_nr_ue_data(UE_info->access_ue_list[i], cc, &UE_info->uid_allocator); + delete_nr_ue_data(UE_info->access_ue_list[i], &UE_info->uid_allocator); if (mac->f1_config.setup_resp) free_f1ap_setup_response(mac->f1_config.setup_resp); free(mac->f1_config.setup_resp); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index c652dd927e..ad3b4997dc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -662,8 +662,7 @@ static void set_dl_maxmimolayers(NR_PDSCH_ServingCellConfig_t *pdsch_servingcell *pdsch_servingcellconfig->ext1->maxMIMO_Layers = min(maxMIMO_layers, ue_supported_layers); } -static struct NR_SRS_Resource__resourceType__periodic *configure_periodic_srs(const NR_ServingCellConfigCommon_t *scc, - const int uid) +static struct NR_SRS_Resource__resourceType__periodic *configure_periodic_srs(const int uid) { frame_structure_t *fs = &RC.nrmac[0]->frame_structure; int offset = get_ul_slot_offset(fs, uid, false); // only full UL slots for SRS @@ -771,8 +770,7 @@ static NR_SRS_ResourceSet_t *get_srs_resourceset(const int resset_id, return srs_resset; } -static NR_SRS_Resource_t *get_srs_resource(const NR_ServingCellConfigCommon_t *scc, - const NR_UE_NR_Capability_t *uecap, +static NR_SRS_Resource_t *get_srs_resource(const NR_UE_NR_Capability_t *uecap, const int curr_bwp, const int uid, const int res_id, @@ -849,7 +847,7 @@ static NR_SRS_Resource_t *get_srs_resource(const NR_ServingCellConfigCommon_t *s srs_res->groupOrSequenceHopping = NR_SRS_Resource__groupOrSequenceHopping_neither; if (do_srs) { srs_res->resourceType.present = NR_SRS_Resource__resourceType_PR_periodic; - srs_res->resourceType.choice.periodic = configure_periodic_srs(scc, uid); + srs_res->resourceType.choice.periodic = configure_periodic_srs(uid); } else { srs_res->resourceType.present = NR_SRS_Resource__resourceType_PR_aperiodic; srs_res->resourceType.choice.aperiodic = calloc_or_fail(1, sizeof(*srs_res->resourceType.choice.aperiodic)); @@ -863,8 +861,7 @@ static NR_SRS_Resource_t *get_srs_resource(const NR_ServingCellConfigCommon_t *s return srs_res; } -static NR_SetupRelease_SRS_Config_t *get_config_srs(const NR_ServingCellConfigCommon_t *scc, - const NR_UE_NR_Capability_t *uecap, +static NR_SetupRelease_SRS_Config_t *get_config_srs(const NR_UE_NR_Capability_t *uecap, const int curr_bwp, const int uid, const int res_id, @@ -879,7 +876,7 @@ static NR_SetupRelease_SRS_Config_t *get_config_srs(const NR_ServingCellConfigCo srs_Config->srs_ResourceToAddModList = calloc_or_fail(1, sizeof(*srs_Config->srs_ResourceToAddModList)); NR_SRS_Resource_t *srs_res0 = - get_srs_resource(scc, uecap, curr_bwp, uid, res_id, maxMIMO_Layers, NR_SRS_Resource__transmissionComb_PR_n2, do_srs); + get_srs_resource(uecap, curr_bwp, uid, res_id, maxMIMO_Layers, NR_SRS_Resource__transmissionComb_PR_n2, do_srs); asn1cSeqAdd(&srs_Config->srs_ResourceToAddModList->list, srs_res0); srs_Config->srs_ResourceSetToAddModList = calloc_or_fail(1, sizeof(*srs_Config->srs_ResourceSetToAddModList)); @@ -1184,7 +1181,7 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay, i qsort(tda_list->list.array, tda_list->list.count, sizeof(tda_list->list.array), tda_cmp); } -static void set_dl_DataToUL_ACK(NR_PUCCH_Config_t *pucch_Config, int min_feedback_time, NR_SubcarrierSpacing_t subcarrierSpacing) +static void set_dl_DataToUL_ACK(NR_PUCCH_Config_t *pucch_Config, int min_feedback_time) { pucch_Config->dl_DataToUL_ACK = calloc(1,sizeof(*pucch_Config->dl_DataToUL_ACK)); long *delay[8]; @@ -1294,8 +1291,8 @@ static void config_pucch_resset1(const NR_ServingCellConfigCommon_t *scc, *pucchfmt2->simultaneousHARQ_ACK_CSI = NR_PUCCH_FormatConfig__simultaneousHARQ_ACK_CSI_true; } -void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config, int do_csirs) { - +static void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config) +{ pucch_Config->pucch_PowerControl = calloc(1,sizeof(*pucch_Config->pucch_PowerControl)); NR_P0_PUCCH_t *p00 = calloc(1,sizeof(*p00)); p00->p0_PUCCH_Id = 1; @@ -1331,7 +1328,7 @@ void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config, int do_csirs) { asn1cSeqAdd(&pucch_Config->spatialRelationInfoToAddModList->list,pucchspatial); } -static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedulingRequestResourceConfig, const NR_ServingCellConfigCommon_t *scc, int scs) +static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedulingRequestResourceConfig, int scs) { const frame_structure_t *fs = &RC.nrmac[0]->frame_structure; int sr_slot = 1; // in FDD SR in slot 1 @@ -1376,7 +1373,7 @@ static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedul } } -static void scheduling_request_config(const NR_ServingCellConfigCommon_t *scc, NR_PUCCH_Config_t *pucch_Config, int scs) +static void scheduling_request_config(NR_PUCCH_Config_t *pucch_Config, int scs) { // format with <=2 bits in pucch resource set 0 NR_PUCCH_ResourceSet_t *pucchresset = pucch_Config->resourceSetToAddModList->list.array[0]; @@ -1388,7 +1385,7 @@ static void scheduling_request_config(const NR_ServingCellConfigCommon_t *scc, N schedulingRequestResourceConfig->schedulingRequestResourceId = 1; schedulingRequestResourceConfig->schedulingRequestID = 0; - set_SR_periodandoffset(schedulingRequestResourceConfig, scc, scs); + set_SR_periodandoffset(schedulingRequestResourceConfig, scs); schedulingRequestResourceConfig->resource = calloc(1,sizeof(*schedulingRequestResourceConfig->resource)); *schedulingRequestResourceConfig->resource = *pucchressetid; @@ -1694,11 +1691,7 @@ static NR_PTRS_DownlinkConfig_t *config_dlptrs(const nr_ptrs_config_t *ptrs) return ptrs_config; } -static NR_SetupRelease_PDSCH_Config_t *config_pdsch(uint64_t ssb_bitmap, - int bwp_Id, - int dl_antenna_ports, - bool do_TCI, - nr_ptrs_config_t *ptrs) +static NR_SetupRelease_PDSCH_Config_t *config_pdsch(uint64_t ssb_bitmap, int bwp_Id, bool do_TCI, nr_ptrs_config_t *ptrs) { NR_SetupRelease_PDSCH_Config_t *setup_pdsch_Config = calloc(1,sizeof(*setup_pdsch_Config)); setup_pdsch_Config->present = NR_SetupRelease_PDSCH_Config_PR_setup; @@ -1752,7 +1745,6 @@ static NR_SetupRelease_PDSCH_Config_t *config_pdsch(uint64_t ssb_bitmap, static NR_BWP_Downlink_t *config_downlinkBWP(const NR_ServingCellConfigCommon_t *scc, const NR_UE_NR_Capability_t *uecap, - int dl_antenna_ports, bool force_256qam_off, bool is_SA, const nr_mac_config_t *configuration) @@ -1848,7 +1840,7 @@ static NR_BWP_Downlink_t *config_downlinkBWP(const NR_ServingCellConfigCommon_t asn1cSeqAdd(&bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list, ss3); bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToReleaseList = NULL; - bwp->bwp_Dedicated->pdsch_Config = config_pdsch(ssb_bitmap, bwp->bwp_Id, dl_antenna_ports, configuration->do_TCI, configuration->ptrs); + bwp->bwp_Dedicated->pdsch_Config = config_pdsch(ssb_bitmap, bwp->bwp_Id, configuration->do_TCI, configuration->ptrs); set_dl_mcs_table(bwp->bwp_Common->genericParameters.subcarrierSpacing, force_256qam_off ? NULL : uecap, @@ -1904,14 +1896,13 @@ static NR_BWP_Uplink_t *config_uplinkBWP(bool is_SA, pucch_Config->resourceToReleaseList = NULL; config_pucch_resset0(scc, pucch_Config, uid, curr_bwp, uecap, &configuration->pdsch_AntennaPorts); config_pucch_resset1(scc, pucch_Config, uid, curr_bwp, uecap, &configuration->pdsch_AntennaPorts); - set_pucch_power_config(pucch_Config, configuration->do_CSIRS); - scheduling_request_config(scc, pucch_Config, ubwp->bwp_Common->genericParameters.subcarrierSpacing); - set_dl_DataToUL_ACK(pucch_Config, configuration->minRXTXTIME, ubwp->bwp_Common->genericParameters.subcarrierSpacing); + set_pucch_power_config(pucch_Config); + scheduling_request_config(pucch_Config, ubwp->bwp_Common->genericParameters.subcarrierSpacing); + set_dl_DataToUL_ACK(pucch_Config, configuration->minRXTXTIME); ubwp->bwp_Dedicated->pusch_Config = config_pusch(configuration, scc, uecap); - ubwp->bwp_Dedicated->srs_Config = get_config_srs(scc, - NULL, + ubwp->bwp_Dedicated->srs_Config = get_config_srs(NULL, curr_bwp, uid, ubwp->bwp_Id, @@ -3351,15 +3342,15 @@ static NR_BWP_UplinkDedicated_t *configure_initial_ul_bwp(const NR_ServingCellCo pucch_Config->resourceToReleaseList = NULL; config_pucch_resset0(scc, pucch_Config, id, curr_bwp, uecap, &configuration->pdsch_AntennaPorts); config_pucch_resset1(scc, pucch_Config, id, curr_bwp, uecap, &configuration->pdsch_AntennaPorts); - set_pucch_power_config(pucch_Config, configuration->do_CSIRS); + set_pucch_power_config(pucch_Config); initialUplinkBWP->pusch_Config = config_pusch(configuration, scc, uecap); // We are using do_srs = 0 here because the periodic SRS will only be enabled in update_cellGroupConfig() if do_srs == 1 - initialUplinkBWP->srs_Config = get_config_srs(scc, uecap, curr_bwp, id, 0, maxMIMO_Layers, configuration->minRXTXTIME, 0); + initialUplinkBWP->srs_Config = get_config_srs(uecap, curr_bwp, id, 0, maxMIMO_Layers, configuration->minRXTXTIME, 0); - scheduling_request_config(scc, pucch_Config, scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing); - set_dl_DataToUL_ACK(pucch_Config, configuration->minRXTXTIME, genericParameters->subcarrierSpacing); + scheduling_request_config(pucch_Config, scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing); + set_dl_DataToUL_ACK(pucch_Config, configuration->minRXTXTIME); return initialUplinkBWP; } @@ -3398,7 +3389,7 @@ static NR_BWP_DownlinkDedicated_t *configure_initial_dl_bwp(const NR_ServingCell asn1cSeqAdd(&pdcch_Config->searchSpacesToAddModList->list, ss2); bwp_Dedicated->pdcch_Config->choice.setup = pdcch_Config; - bwp_Dedicated->pdsch_Config = config_pdsch(bitmap, 0, pdsch_AntennaPorts, configuration->do_TCI, configuration->ptrs); + bwp_Dedicated->pdsch_Config = config_pdsch(bitmap, 0, configuration->do_TCI, configuration->ptrs); // we might call configuration of initial BWP for BWP switch when we already have UE capabilities set_dl_mcs_table(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing, configuration->force_256qam_off ? NULL : uecap, @@ -3576,12 +3567,7 @@ static NR_SpCellConfig_t *get_initial_SpCellConfig(int uid, configDedicated->initialDownlinkBWP = configure_initial_dl_bwp(scc, pdsch_AntennaPorts, bitmap, NULL, configuration); } else { configDedicated->downlinkBWP_ToAddModList = calloc(1, sizeof(*configDedicated->downlinkBWP_ToAddModList)); - NR_BWP_Downlink_t *bwp = config_downlinkBWP(scc, - NULL, - 0, - false, - true, - configuration); + NR_BWP_Downlink_t *bwp = config_downlinkBWP(scc, NULL, false, true, configuration); asn1cSeqAdd(&configDedicated->downlinkBWP_ToAddModList->list, bwp); uplinkConfig->uplinkBWP_ToAddModList = calloc(1, sizeof(*uplinkConfig->uplinkBWP_ToAddModList)); NR_BWP_Uplink_t *ubwp = config_uplinkBWP(true, uid, maxMIMO_Layers, configuration, scc, NULL); @@ -3839,12 +3825,7 @@ NR_CellGroupConfig_t *update_cellGroupConfig_for_BWP_switch(NR_CellGroupConfig_t } else { if (!configDedicated->downlinkBWP_ToAddModList) configDedicated->downlinkBWP_ToAddModList = calloc_or_fail(1, sizeof(*configDedicated->downlinkBWP_ToAddModList)); - NR_BWP_Downlink_t *dl_bwp = config_downlinkBWP(scc, - uecap, - pdsch_AntennaPorts, - local_config.force_256qam_off, - true, - &local_config); + NR_BWP_Downlink_t *dl_bwp = config_downlinkBWP(scc, uecap, local_config.force_256qam_off, true, &local_config); asn1cSeqAdd(&configDedicated->downlinkBWP_ToAddModList->list, dl_bwp); if (!uplinkConfig->uplinkBWP_ToAddModList) @@ -3980,8 +3961,7 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, *pusch_Config->maxRank = maxMIMO_Layers; if (configuration->do_SRS) { ASN_STRUCT_FREE(asn_DEF_NR_SetupRelease_SRS_Config, ul_bwp_Dedicated->srs_Config); - ul_bwp_Dedicated->srs_Config = get_config_srs(scc, - uecap, + ul_bwp_Dedicated->srs_Config = get_config_srs(uecap, curr_bwp, uid, bwp_id, @@ -4043,8 +4023,6 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC int uid, int ssb_index) { - const nr_pdsch_AntennaPorts_t *pdschap = &configuration->pdsch_AntennaPorts; - const int dl_antenna_ports = pdschap->N1 * pdschap->N2 * pdschap->XP; AssertFatal(servingcellconfigcommon, "servingcellconfigcommon is null\n"); if (uecap == NULL) @@ -4084,8 +4062,7 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC configDedicated->initialDownlinkBWP = calloc(1, sizeof(*configDedicated->initialDownlinkBWP)); configDedicated->initialDownlinkBWP->pdcch_Config = NULL; - configDedicated->initialDownlinkBWP->pdsch_Config = - config_pdsch(bitmap, 0, dl_antenna_ports, configuration->do_TCI, configuration->ptrs); + configDedicated->initialDownlinkBWP->pdsch_Config = config_pdsch(bitmap, 0, configuration->do_TCI, configuration->ptrs); configDedicated->initialDownlinkBWP->sps_Config = NULL; // calloc(1,sizeof(struct NR_SetupRelease_SPS_Config)); configDedicated->initialDownlinkBWP->radioLinkMonitoringConfig = NULL; @@ -4105,8 +4082,7 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC long maxMIMO_Layers = set_ul_max_layers(configuration, uecap); int curr_bwp = NRRIV2BW(servingcellconfigcommon->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - initialUplinkBWP->srs_Config = get_config_srs(servingcellconfigcommon, - NULL, + initialUplinkBWP->srs_Config = get_config_srs(NULL, curr_bwp, uid, 0, @@ -4119,7 +4095,6 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC configDedicated->downlinkBWP_ToAddModList = calloc(1, sizeof(*configDedicated->downlinkBWP_ToAddModList)); NR_BWP_Downlink_t *bwp = config_downlinkBWP(servingcellconfigcommon, uecap, - dl_antenna_ports, configuration->force_256qam_off, false, configuration); diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 0214beee89..182f6f8d49 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -398,7 +398,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, LOG_D(PDCP, "IP packet received with size %d, to be sent to SDAP interface, UE ID/RNTI: %ld\n", size, ue->ue_id); // in NoS1 mode: the SDAP should write() packets to an FD (TUN interface), // so below, set is_gnb == 0 to do that - sdap_data_ind(entity->rb_id, 0, entity->has_sdap_rx, entity->pdusession_id, ue->ue_id, buf, size); + sdap_data_ind(entity->rb_id, 0, entity->pdusession_id, ue->ue_id, buf, size); } else{ for (i = 0; i < MAX_DRBS_PER_UE; i++) { @@ -414,13 +414,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, rb_found: { LOG_D(PDCP, "%s() (drb %d) sending message to SDAP size %d\n", __func__, rb_id, size); - sdap_data_ind(rb_id, - ue->drb[rb_id - 1]->is_gnb, - ue->drb[rb_id - 1]->has_sdap_rx, - ue->drb[rb_id - 1]->pdusession_id, - ue->ue_id, - buf, - size); + sdap_data_ind(rb_id, ue->drb[rb_id - 1]->is_gnb, ue->drb[rb_id - 1]->pdusession_id, ue->ue_id, buf, size); } } } diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 61292048c4..21e95164e7 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -80,7 +80,6 @@ void print_ue_mac_stats(const module_id_t mod, const int frame_rx, const int slo // L2 Abstraction Layer static int handle_bcch_bch(NR_UE_MAC_INST_t *mac, - int cc_id, unsigned int gNB_index, uint8_t *pduP, unsigned int additional_bits, @@ -104,13 +103,12 @@ static int handle_bcch_bch(NR_UE_MAC_INST_t *mac, else mac->frequency_range = FR1; // fixed 3 bytes MIB PDU - nr_mac_rrc_data_ind_ue(mac->ue_id, cc_id, gNB_index, 0, 0, 0, 0, cell_id, ssb_arfcn, NR_BCCH_BCH, (uint8_t *) pduP, 3); + nr_mac_rrc_data_ind_ue(mac->ue_id, gNB_index, 0, 0, 0, cell_id, ssb_arfcn, NR_BCCH_BCH, (uint8_t *) pduP, 3); return 0; } // L2 Abstraction Layer static int handle_bcch_dlsch(NR_UE_MAC_INST_t *mac, - int cc_id, unsigned int gNB_index, uint8_t ack_nack, uint8_t *pduP, @@ -119,7 +117,7 @@ static int handle_bcch_dlsch(NR_UE_MAC_INST_t *mac, int frame, int slot) { - nr_ue_decode_BCCH_DL_SCH(mac, cc_id, gNB_index, ack_nack, pduP, pdu_len, hfn, frame, slot); + nr_ue_decode_BCCH_DL_SCH(mac, gNB_index, ack_nack, pduP, pdu_len, hfn, frame, slot); return 0; } @@ -256,7 +254,6 @@ static uint32_t nr_ue_dl_processing(NR_UE_MAC_INST_t *mac, nr_downlink_indicatio mac); if(rx_indication_body.ssb_pdu.decoded_pdu) { ret_mask |= (handle_bcch_bch(mac, - dl_info->cc_id, dl_info->gNB_index, rx_indication_body.ssb_pdu.pdu, rx_indication_body.ssb_pdu.additional_bits, @@ -269,7 +266,6 @@ static uint32_t nr_ue_dl_processing(NR_UE_MAC_INST_t *mac, nr_downlink_indicatio break; case FAPI_NR_RX_PDU_TYPE_SIB: ret_mask |= (handle_bcch_dlsch(mac, - dl_info->cc_id, dl_info->gNB_index, rx_indication_body.pdsch_pdu.ack_nack, rx_indication_body.pdsch_pdu.pdu, @@ -396,7 +392,7 @@ static void handle_sl_bch(int ue_id, sl_mac->decoded_DFN = frame; sl_mac->decoded_slot = slot; - nr_mac_rrc_data_ind_ue(ue_id, 0, 0, hfn_rx, frame_rx, slot_rx, 0, rx_slss_id, 0, NR_SBCCH_SL_BCH, (uint8_t *)sl_mib, len); + nr_mac_rrc_data_ind_ue(ue_id, 0, hfn_rx, frame_rx, slot_rx, rx_slss_id, 0, NR_SBCCH_SL_BCH, (uint8_t *)sl_mib, len); return; } diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index d12b627cd9..8d5d00c975 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1141,7 +1141,6 @@ static NR_MeasIdToAddMod_t *get_MeasId(NR_MeasId_t measId, NR_ReportConfigId_t r NR_MeasConfig_t *get_MeasConfig(const NR_MeasTiming_t *mt, int band, - int scs, int nr_pci, NR_ReportConfigToAddMod_t *rc_PER, NR_ReportConfigToAddMod_t *rc_A2, @@ -1444,7 +1443,7 @@ byte_array_t get_HandoverCommandMessage(nr_rrc_reconfig_param_t *params) * 2) encodes UE Capabilities from UE Context * 3) encodes AS context * 4) generates HO Preparation Info */ -byte_array_t get_HandoverPreparationInformation(nr_rrc_reconfig_param_t *params, int scell_pci) +byte_array_t get_HandoverPreparationInformation(nr_rrc_reconfig_param_t *params) { // Buffer to return byte_array_t buffer = {.buf = NULL, .len = 0}; diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.h b/openair2/RRC/NR/MESSAGES/asn1_msg.h index 543749d40d..7aeb2b4ed0 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.h +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.h @@ -140,7 +140,6 @@ int do_RRCReestablishmentComplete(uint8_t *buffer, size_t buffer_size, int64_t r NR_MeasConfig_t *get_MeasConfig(const NR_MeasTiming_t *mt, int band, - int scs, int nr_pci, NR_ReportConfigToAddMod_t *rc_PER, NR_ReportConfigToAddMod_t *rc_A2, @@ -150,7 +149,7 @@ NR_MeasConfig_t *get_MeasConfig(const NR_MeasTiming_t *mt, void free_MeasConfig(NR_MeasConfig_t *mc); int do_NR_Paging(uint8_t Mod_id, uint8_t *buffer, uint32_t tmsi); -byte_array_t get_HandoverPreparationInformation(nr_rrc_reconfig_param_t *params, int scell_pci); +byte_array_t get_HandoverPreparationInformation(nr_rrc_reconfig_param_t *params); byte_array_t get_HandoverCommandMessage(nr_rrc_reconfig_param_t *params); void fill_removal_lists_from_source_measConfig(NR_MeasConfig_t *measConfig, byte_array_t prep_info); byte_array_t doRRCReconfiguration_from_HandoverCommand(byte_array_t handoverCommand); diff --git a/openair2/RRC/NR/mac_rrc_dl_direct.c b/openair2/RRC/NR/mac_rrc_dl_direct.c index 7f69afaa82..693e9ccbf4 100644 --- a/openair2/RRC/NR/mac_rrc_dl_direct.c +++ b/openair2/RRC/NR/mac_rrc_dl_direct.c @@ -19,6 +19,7 @@ static void f1_reset_cu_initiated_direct(sctp_assoc_t assoc_id, const f1ap_reset static void f1_reset_acknowledge_du_initiated_direct(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack) { + UNUSED(assoc_id); (void)ack; AssertFatal(false, "%s() not implemented yet\n", __func__); } diff --git a/openair2/RRC/NR/mac_rrc_dl_f1ap.c b/openair2/RRC/NR/mac_rrc_dl_f1ap.c index a102e30101..1385c3fd82 100644 --- a/openair2/RRC/NR/mac_rrc_dl_f1ap.c +++ b/openair2/RRC/NR/mac_rrc_dl_f1ap.c @@ -29,6 +29,7 @@ static void f1_reset_cu_initiated_f1ap(sctp_assoc_t assoc_id, const f1ap_reset_t static void f1_reset_acknowledge_du_initiated_f1ap(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack) { + UNUSED(assoc_id); (void)ack; AssertFatal(false, "%s() not implemented yet\n", __func__); } diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h index 4e9061138b..ad69ab19df 100644 --- a/openair2/RRC/NR/nr_rrc_proto.h +++ b/openair2/RRC/NR/nr_rrc_proto.h @@ -23,7 +23,7 @@ #define SRB2 2 void rrc_add_nsa_user(gNB_RRC_INST *rrc, x2ap_ENDC_sgnb_addition_req_t *m, sctp_assoc_t assoc_id); -void rrc_add_nsa_user_resp(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, const f1ap_ue_context_setup_resp_t *resp); +void rrc_add_nsa_user_resp(gNB_RRC_UE_t *UE, const f1ap_ue_context_setup_resp_t *resp); void rrc_release_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context); void rrc_remove_nsa_user_context(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context); @@ -43,18 +43,18 @@ void rrc_gNB_generate_RRCRelease(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE); \param args_p Pointer on arguments to start the task. */ void *rrc_gnb_task(void *args_p); -int nr_rrc_reconfiguration_req(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p, const int dl_bwp_id, const int ul_bwp_id); +int nr_rrc_reconfiguration_req(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p); NR_MeasConfig_t *nr_rrc_get_measconfig(const gNB_RRC_INST *rrc, uint64_t nr_cellid); -bool ue_associated_to_cuup(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue); -sctp_assoc_t get_existing_cuup_for_ue(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue); +bool ue_associated_to_cuup(const gNB_RRC_UE_t *ue); +sctp_assoc_t get_existing_cuup_for_ue(const gNB_RRC_UE_t *ue); sctp_assoc_t get_new_cuup_for_ue(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue, int sst, int sd); int rrc_gNB_process_e1_setup_req(sctp_assoc_t assoc_id, const e1ap_setup_req_t *req); bool is_cuup_associated(gNB_RRC_INST *rrc); /* Process indication of E1 connection loss on CU-CP */ -void rrc_gNB_process_e1_lost_connection(gNB_RRC_INST *rrc, e1ap_lost_connection_t *lc, sctp_assoc_t assoc_id); +void rrc_gNB_process_e1_lost_connection(gNB_RRC_INST *rrc, sctp_assoc_t assoc_id); void bearer_context_setup_direct(e1ap_bearer_setup_req_t *req, instance_t instance); @@ -91,7 +91,7 @@ void rrc_gNB_generate_UeContextModificationRequest(const gNB_RRC_INST *rrc, void free_RRCReconfiguration_params(nr_rrc_reconfig_param_t params); -byte_array_t rrc_gNB_encode_RRCReconfiguration(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, nr_rrc_reconfig_param_t params); +byte_array_t rrc_gNB_encode_RRCReconfiguration(gNB_RRC_UE_t *UE, nr_rrc_reconfig_param_t params); nr_rrc_reconfig_param_t get_RRCReconfiguration_params(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, uint8_t srb_reest_bitmap, bool drb_reestablish); diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 2d876cce25..71054ac2fc 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -221,6 +221,9 @@ const NR_RedCapParameters_r17_t *get_redcapparam_r17(NR_UE_NR_Capability_t *UE_C static void rrc_deliver_ue_ctxt_release_cmd(void *deliver_pdu_data, ue_id_t ue_id, int srb_id, char *buf, int size, int sdu_id) { + UNUSED(ue_id); + UNUSED(srb_id); + UNUSED(sdu_id); DevAssert(deliver_pdu_data != NULL); deliver_ue_ctxt_release_data_t *data = deliver_pdu_data; byte_array_t rrc_cont = {.buf = (uint8_t *)buf, .len = size}; @@ -277,8 +280,11 @@ typedef struct deliver_dl_rrc_message_data_s { f1ap_dl_rrc_message_t *dl_rrc; sctp_assoc_t assoc_id; } deliver_dl_rrc_message_data_t; + static void rrc_deliver_dl_rrc_message(void *deliver_pdu_data, ue_id_t ue_id, int srb_id, char *buf, int size, int sdu_id) { + UNUSED(ue_id); + UNUSED(sdu_id); DevAssert(deliver_pdu_data != NULL); deliver_dl_rrc_message_data_t *data = (deliver_dl_rrc_message_data_t *)deliver_pdu_data; data->dl_rrc->rrc_container = (uint8_t *)buf; @@ -309,6 +315,8 @@ static void nr_rrc_transfer_protected_rrc_message(const gNB_RRC_INST *rrc, #ifdef E2_AGENT E2_AGENT_SIGNAL_DL_DCCH_RRC_MSG(buffer, size, message_id); +#else + UNUSED(message_id); #endif } @@ -551,7 +559,6 @@ static f1ap_ue_context_setup_req_t rrc_fill_f1_ue_context_setup(gNB_RRC_UE_t *ue //----------------------------------------------------------------------------- static void rrc_gNB_generate_RRCSetup(instance_t instance, - rnti_t rnti, rrc_gNB_ue_context_t *const ue_context_pP, const uint8_t *masterCellGroup, int masterCellGroup_len) @@ -759,7 +766,6 @@ NR_MeasConfig_t *nr_rrc_get_measconfig(const gNB_RRC_INST *rrc, uint64_t nr_cell seq_arr_init(&neigh_seq, sizeof(nr_neighbour_cell_t)); // Get cell info from the cell container - int scs = cell->info.mode == NR_MODE_TDD ? cell->info.tdd.dlul.scs : cell->info.fdd.dl.scs; int band = cell->info.mode == NR_MODE_TDD ? cell->info.tdd.dlul.band : cell->info.fdd.dl.band; const NR_MeasTimingList_t *mtlist = cell->mtc->criticalExtensions.choice.c1->choice.measTimingConf->measTiming; @@ -814,7 +820,7 @@ NR_MeasConfig_t *nr_rrc_get_measconfig(const gNB_RRC_INST *rrc, uint64_t nr_cell if (rrc->measurementConfiguration.a2_event) rc_A2 = prepare_a2_event_report(rrc->measurementConfiguration.a2_event); - NR_MeasConfig_t *result = get_MeasConfig(mt, band, scs, cell->info.pci, rc_PER, rc_A2, &rc_A3_seq, &neigh_seq, neigh_a3_id); + NR_MeasConfig_t *result = get_MeasConfig(mt, band, cell->info.pci, rc_PER, rc_A2, &rc_A3_seq, &neigh_seq, neigh_a3_id); // Clean up sequence arrays seq_arr_free(&rc_A3_seq, NULL); @@ -884,7 +890,7 @@ nr_rrc_reconfig_param_t get_RRCReconfiguration_params(gNB_RRC_INST *rrc, gNB_RRC return params; } -byte_array_t rrc_gNB_encode_RRCReconfiguration(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, nr_rrc_reconfig_param_t params) +byte_array_t rrc_gNB_encode_RRCReconfiguration(gNB_RRC_UE_t *UE, nr_rrc_reconfig_param_t params) { byte_array_t msg = do_RRCReconfiguration(¶ms); if (msg.len <= 0) { @@ -930,7 +936,7 @@ static void rrc_gNB_generate_dedicatedRRCReconfiguration(gNB_RRC_INST *rrc, gNB_ ue_p->xids[params.transaction_id] = params.n_drb_rel > 0 ? RRC_PDUSESSION_RELEASE : RRC_PDUSESSION_ESTABLISH; } - byte_array_t msg = rrc_gNB_encode_RRCReconfiguration(rrc, ue_p, params); + byte_array_t msg = rrc_gNB_encode_RRCReconfiguration(ue_p, params); if (msg.len <= 0) { LOG_E(NR_RRC, "UE %d: Failed to generate RRCReconfiguration%s\n", @@ -1138,7 +1144,7 @@ static void cuup_notify_reestablishment(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p) .gNB_cu_up_ue_id = ue_p->rrc_ue_id, }; // Quit re-establishment notification if no CU-UP is associated - if (!is_cuup_associated(rrc) || !ue_associated_to_cuup(rrc, ue_p)) { + if (!is_cuup_associated(rrc) || !ue_associated_to_cuup(ue_p)) { return; } @@ -1158,7 +1164,7 @@ static void cuup_notify_reestablishment(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p) fill_security_info(rrc, ue_p, req.secInfo); /* Send E1 Bearer Context Modification Request (3GPP TS 38.463) */ - sctp_assoc_t assoc_id = get_existing_cuup_for_ue(rrc, ue_p); + sctp_assoc_t assoc_id = get_existing_cuup_for_ue(ue_p); rrc->cucp_cuup.bearer_context_mod(assoc_id, &req); free_e1ap_context_mod_request(&req); } @@ -1249,10 +1255,7 @@ static void rrc_gNB_generate_RRCReestablishment(rrc_gNB_ue_context_t *ue_context } /// @brief Function tha processes RRCReestablishmentComplete message sent by the UE, after RRCReestasblishment request. -static void rrc_gNB_process_RRCReestablishmentComplete(gNB_RRC_INST *rrc, - gNB_RRC_UE_t *ue_p, - const uint8_t xid, - const sctp_assoc_t assoc_id) +static void rrc_gNB_process_RRCReestablishmentComplete(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p, const uint8_t xid) { LOG_I(NR_RRC, "UE %d Processing NR_RRCReestablishmentComplete from UE\n", ue_p->rrc_ue_id); @@ -1294,7 +1297,7 @@ static void rrc_gNB_process_RRCReestablishmentComplete(gNB_RRC_INST *rrc, } } -int nr_rrc_reconfiguration_req(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p, const int dl_bwp_id, const int ul_bwp_id) +int nr_rrc_reconfiguration_req(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p) { uint8_t xid = rrc_gNB_get_next_transaction_identifier(rrc->module_id); ue_p->xids[xid] = RRC_DEDICATED_RECONF; @@ -1405,7 +1408,7 @@ static void rrc_handle_RRCSetupRequest(gNB_RRC_INST *rrc, UE->ongoing_reconfiguration = false; UE->measConfig = nr_rrc_get_measconfig(rrc, msg->nr_cellid); activate_srb(UE, 1); - rrc_gNB_generate_RRCSetup(0, msg->crnti, ue_context_p, msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); + rrc_gNB_generate_RRCSetup(0, ue_context_p, msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); } static const char *get_reestab_cause(NR_ReestablishmentCause_t c) @@ -1671,7 +1674,7 @@ fallback_rrc_setup: activate_srb(&new->ue_context, 1); added = rrc_update_ue_pcell(&new->ue_context, current_cell); DevAssert(added); - rrc_gNB_generate_RRCSetup(0, msg->crnti, new, msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); + rrc_gNB_generate_RRCSetup(0, new, msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); return; } @@ -1791,7 +1794,7 @@ static void process_Event_Based_Measurement_Report(gNB_RRC_INST *rrc, // UE can send multiple neighbour cells A3 event report in 1 Meas Report. So, we need to find the best neighbour best_rsrp = neighbourCellRSRP; LOG_I(NR_RRC, "HO LOG: Serving Cell RSRP: %d - Best Neighbor RSRP: %d ! Trigger N2 HO\n", servingCellRSRP, best_rsrp); - nr_rrc_trigger_n2_ho(rrc, ue, scell_pci, neighbour); + nr_rrc_trigger_n2_ho(rrc, ue, neighbour); } LOG_D(NR_RRC, "HO LOG: Trigger N2 HO for the neighbour gnb: %u cell: %lu\n", neighbour->gNB_ID, neighbour->nrcell_id); } @@ -1868,9 +1871,7 @@ static void rrc_gNB_process_MeasurementReport(gNB_RRC_INST *rrc, gNB_RRC_UE_t *U static void handle_rrcReestablishmentComplete(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, - const uint32_t gNB_DU_ue_id, - const NR_RRCReestablishmentComplete_t *cplt, - const sctp_assoc_t assoc_id) + const NR_RRCReestablishmentComplete_t *cplt) { NR_RRCReestablishmentComplete__criticalExtensions_PR p = cplt->criticalExtensions.present; if (p != NR_RRCReestablishmentComplete__criticalExtensions_PR_rrcReestablishmentComplete) { @@ -1878,7 +1879,7 @@ static void handle_rrcReestablishmentComplete(gNB_RRC_INST *rrc, return; } - rrc_gNB_process_RRCReestablishmentComplete(rrc, UE, cplt->rrc_TransactionIdentifier, assoc_id); + rrc_gNB_process_RRCReestablishmentComplete(rrc, UE, cplt->rrc_TransactionIdentifier); UE->ue_reestablishment_counter++; } @@ -2122,7 +2123,7 @@ static void handle_rrcReconfigurationComplete(gNB_RRC_INST *rrc, gNB_RRC_UE_t *U free(UE->initial_pdus); UE->initial_pdus = NULL; } else if (seq_arr_size(&UE->pduSessions) > 0) - rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(rrc, UE, xid); + rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(rrc, UE); else LOG_W(NR_RRC, "UE %d: RRC Reconfiguration Complete for PDU session establishment, but no PDU sessions were setup\n", @@ -2187,7 +2188,7 @@ static void rrc_gNB_generate_UECapabilityEnquiry(gNB_RRC_INST *rrc, gNB_RRC_UE_t nr_rrc_transfer_protected_rrc_message(rrc, ue, DL_SCH_LCID_DCCH, msg_id, buffer, size); } -static int rrc_gNB_decode_dcch(gNB_RRC_INST *rrc, const f1ap_ul_rrc_message_t *msg, const sctp_assoc_t assoc_id) +static int rrc_gNB_decode_dcch(gNB_RRC_INST *rrc, const f1ap_ul_rrc_message_t *msg) { /* we look up by CU UE ID! Do NOT change back to RNTI! */ rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(rrc, msg->gNB_CU_ue_id); @@ -2293,7 +2294,7 @@ static int rrc_gNB_decode_dcch(gNB_RRC_INST *rrc, const f1ap_ul_rrc_message_t *m case NR_UL_DCCH_MessageType__c1_PR_rrcReestablishmentComplete: LOG_UE_UL_EVENT(UE, "Received RRCReestablishmentComplete\n"); const NR_RRCReestablishmentComplete_t *rc = ul_dcch_msg->message.choice.c1->choice.rrcReestablishmentComplete; - handle_rrcReestablishmentComplete(rrc, UE, msg->gNB_DU_ue_id, rc, assoc_id); + handle_rrcReestablishmentComplete(rrc, UE, rc); break; default: @@ -2453,7 +2454,7 @@ static void e1_send_bearer_modification_request(gNB_RRC_INST *rrc, gNB_RRC_UE_t req->secInfo = malloc_or_fail(sizeof(*req->secInfo)); fill_security_info(rrc, UE, req->secInfo); - sctp_assoc_t assoc_id = get_existing_cuup_for_ue(rrc, UE); + sctp_assoc_t assoc_id = get_existing_cuup_for_ue(UE); rrc->cucp_cuup.bearer_context_mod(assoc_id, req); } @@ -2607,7 +2608,7 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, instance } if (!IS_SA_MODE(get_softmodem_params())) { - rrc_add_nsa_user_resp(rrc, UE, resp); + rrc_add_nsa_user_resp(UE, resp); return; } @@ -2804,7 +2805,7 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, i DevAssert(source_ctx->old_rnti == UE->rnti); nr_rrc_apply_target_context(UE); /* Update cell association after handover */ - if (!nr_rrc_update_cell_assoc_after_ho(rrc, UE)) { + if (!nr_rrc_update_cell_assoc_after_ho(UE)) { return; } } @@ -2882,7 +2883,7 @@ static void rrc_CU_process_ue_modification_required(MessageDef *msg_p, instance_ /* trigger reconfiguration */ if (!UE->ongoing_reconfiguration) - nr_rrc_reconfiguration_req(rrc, UE, 0, 0); + nr_rrc_reconfiguration_req(rrc, UE); return; } LOG_W(RRC, @@ -3037,7 +3038,7 @@ static int fill_drb_to_be_setup_from_e1_resp(const gNB_RRC_INST *rrc, /** * @brief E1AP Bearer Context Setup Response processing on CU-CP */ -void rrc_gNB_process_e1_bearer_context_setup_resp(e1ap_bearer_setup_resp_t *resp, instance_t instance) +static void rrc_gNB_process_e1_bearer_context_setup_resp(e1ap_bearer_setup_resp_t *resp) { gNB_RRC_INST *rrc = RC.nrrrc[0]; rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(rrc, resp->gNB_cu_cp_ue_id); @@ -3313,10 +3314,12 @@ static bool write_rrc_stats(const gNB_RRC_INST *rrc) return true; } -void *rrc_gnb_task(void *args_p) { +void *rrc_gnb_task(void *args_p) +{ + UNUSED(args_p); MessageDef *msg_p; - instance_t instance; - int result; + instance_t instance; + int result; long stats_timer_id = 1; if (!IS_SOFTMODEM_NOSTATS) { @@ -3367,12 +3370,12 @@ void *rrc_gnb_task(void *args_p) { /* Messages from PDCP */ /* From DU -> CU */ case F1AP_UL_RRC_MESSAGE: - rrc_gNB_decode_dcch(RC.nrrrc[instance], &F1AP_UL_RRC_MESSAGE(msg_p), msg_p->ittiMsgHeader.originInstance); + rrc_gNB_decode_dcch(RC.nrrrc[instance], &F1AP_UL_RRC_MESSAGE(msg_p)); free_ul_rrc_message_transfer(&F1AP_UL_RRC_MESSAGE(msg_p)); break; case NGAP_DOWNLINK_NAS: - rrc_gNB_process_NGAP_DOWNLINK_NAS(msg_p, instance, &rrc_gNB_mui); + rrc_gNB_process_NGAP_DOWNLINK_NAS(msg_p, instance); break; case NGAP_PDUSESSION_SETUP_REQ: @@ -3478,7 +3481,7 @@ void *rrc_gnb_task(void *args_p) { break; case E1AP_BEARER_CONTEXT_SETUP_RESP: - rrc_gNB_process_e1_bearer_context_setup_resp(&E1AP_BEARER_CONTEXT_SETUP_RESP(msg_p), instance); + rrc_gNB_process_e1_bearer_context_setup_resp(&E1AP_BEARER_CONTEXT_SETUP_RESP(msg_p)); free_e1ap_context_setup_response(&E1AP_BEARER_CONTEXT_SETUP_RESP(msg_p)); break; @@ -3501,7 +3504,7 @@ void *rrc_gnb_task(void *args_p) { break; case E1AP_LOST_CONNECTION: /* CUCP */ - rrc_gNB_process_e1_lost_connection(RC.nrrrc[0], &E1AP_LOST_CONNECTION(msg_p), msg_p->ittiMsgHeader.originInstance); + rrc_gNB_process_e1_lost_connection(RC.nrrrc[0], msg_p->ittiMsgHeader.originInstance); break; case NGAP_PAGING_IND: @@ -3509,7 +3512,7 @@ void *rrc_gnb_task(void *args_p) { break; case NGAP_HANDOVER_REQUEST: - rrc_gNB_process_Handover_Request(RC.nrrrc[instance], instance, &NGAP_HANDOVER_REQUEST(msg_p)); + rrc_gNB_process_Handover_Request(RC.nrrrc[instance], &NGAP_HANDOVER_REQUEST(msg_p)); rrc_gNB_free_Handover_Request(&NGAP_HANDOVER_REQUEST(msg_p)); // Free transfered NG message break; diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index f2971f199b..183e0f0088 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -466,9 +466,7 @@ int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t /* Can not associate this message to an UE index, send a failure to NGAP and discard it! */ LOG_W(NR_RRC, "[gNB %ld] In NGAP_INITIAL_CONTEXT_SETUP_REQ: unknown UE from NGAP ids (%u)\n", instance, req->gNB_ue_ngap_id); ngap_cause_t cause = { .type = NGAP_CAUSE_RADIO_NETWORK, .value = NGAP_CAUSE_RADIO_NETWORK_UNKNOWN_LOCAL_UE_NGAP_ID}; - rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(req->gNB_ue_ngap_id, - NULL, - cause); + rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(req->gNB_ue_ngap_id, cause); return (-1); } gNB_RRC_UE_t *UE = &ue_context_p->ue_context; @@ -618,9 +616,7 @@ void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_ itti_send_msg_to_task (TASK_NGAP, rrc->module_id, msg_p); } -void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(uint32_t gnb, - const rrc_gNB_ue_context_t *const ue_context_pP, - const ngap_cause_t causeP) +void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(uint32_t gnb, const ngap_cause_t causeP) { MessageDef *msg_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_INITIAL_CONTEXT_SETUP_FAIL); ngap_initial_context_setup_fail_t *fail = &NGAP_INITIAL_CONTEXT_SETUP_FAIL(msg_p); @@ -721,7 +717,7 @@ static void set_UE_security_algos(const gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, con } //------------------------------------------------------------------------------ -int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance, mui_t *rrc_gNB_mui) +int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance) //------------------------------------------------------------------------------ { ngap_downlink_nas_t *req = &NGAP_DOWNLINK_NAS(msg_p); @@ -779,7 +775,7 @@ void rrc_gNB_send_NGAP_UPLINK_NAS(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, const NR_ itti_send_msg_to_task(TASK_NGAP, rrc->module_id, msg_p); } -void rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, uint8_t xid) +void rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE) { MessageDef *msg_p; int pdu_sessions_done = 0; @@ -1121,7 +1117,7 @@ void rrc_gNB_send_NGAP_HANDOVER_FAILURE(gNB_RRC_INST *rrc, ngap_handover_failure } /** @brief Process NG Handover Request message (8.4.2.2 3GPP TS 38.413) */ -int rrc_gNB_process_Handover_Request(gNB_RRC_INST *rrc, instance_t instance, ngap_handover_request_t *msg) +int rrc_gNB_process_Handover_Request(gNB_RRC_INST *rrc, ngap_handover_request_t *msg) { // Check if UE context already exists for this AMF UE NGAP ID rrc_gNB_ue_context_t *existing_ue_context = rrc_gNB_get_ue_context_by_amf_ue_ngap_id(rrc, msg->amf_ue_ngap_id); @@ -1374,8 +1370,8 @@ int rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(MessageDef *msg_p, instance_ /* a UE might not be associated to a CU-UP if it never requested a PDU * session (intentionally, or because of erros) */ - if (ue_associated_to_cuup(rrc, UE)) { - sctp_assoc_t assoc_id = get_existing_cuup_for_ue(rrc, UE); + if (ue_associated_to_cuup(UE)) { + sctp_assoc_t assoc_id = get_existing_cuup_for_ue(UE); e1ap_cause_t cause = {.type = E1AP_CAUSE_RADIO_NETWORK, .value = E1AP_RADIO_CAUSE_NORMAL_RELEASE}; e1ap_bearer_release_cmd_t cmd = { .gNB_cu_cp_ue_id = UE->rrc_ue_id, @@ -1613,7 +1609,7 @@ int rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(ngap_pdusession_release_comm if (req.numPDUSessionsRem == 0) { LOG_E(NR_RRC, "Received NG PDU Session Release Command but no PDU Sessions to release\n"); return -1; - } else if (!ue_associated_to_cuup(rrc, UE)) { + } else if (!ue_associated_to_cuup(UE)) { LOG_E(NR_RRC, "UE %d is not associated to CU-UP\n", UE->rrc_ue_id); // TODO handle, e.g., only trigger F1 release return 0; @@ -1625,7 +1621,7 @@ int rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(ngap_pdusession_release_comm LOG_I(NR_RRC, "Send F1 Bearer Context Modification Request with PDU Session release \n"); req.gNB_cu_cp_ue_id = UE->rrc_ue_id; req.gNB_cu_up_ue_id = UE->rrc_ue_id; - sctp_assoc_t assoc_id = get_existing_cuup_for_ue(rrc, UE); + sctp_assoc_t assoc_id = get_existing_cuup_for_ue(UE); rrc->cucp_cuup.bearer_context_mod(assoc_id, &req); } init_delayed_action(&UE->delayed_action); diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.h b/openair2/RRC/NR/rrc_gNB_NGAP.h index ab5e637b2d..035e0a2036 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.h +++ b/openair2/RRC/NR/rrc_gNB_NGAP.h @@ -26,15 +26,13 @@ int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE); -void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(uint32_t gnb, - const rrc_gNB_ue_context_t *const ue_context_pP, - const ngap_cause_t causeP); +void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(uint32_t gnb, const ngap_cause_t causeP); -int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance, mui_t *rrc_gNB_mui); +int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance); void rrc_gNB_send_NGAP_UPLINK_NAS(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, const NR_UL_DCCH_Message_t *const ul_dcch_msg); -void rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, uint8_t xid); +void rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE); void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t instance); @@ -71,7 +69,7 @@ void rrc_gNB_send_NGAP_HANDOVER_REQUIRED(gNB_RRC_INST *rrc, void rrc_gNB_send_NGAP_HANDOVER_FAILURE(gNB_RRC_INST *rrc, ngap_handover_failure_t *msg); -int rrc_gNB_process_Handover_Request(gNB_RRC_INST *rrc, instance_t instance, ngap_handover_request_t *msg); +int rrc_gNB_process_Handover_Request(gNB_RRC_INST *rrc, ngap_handover_request_t *msg); void rrc_gNB_free_Handover_Request(ngap_handover_request_t *msg); void rrc_gNB_send_NGAP_HANDOVER_REQUEST_ACKNOWLEDGE(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, byte_array_t ho_command); diff --git a/openair2/RRC/NR/rrc_gNB_cuup.c b/openair2/RRC/NR/rrc_gNB_cuup.c index bfb78dc0d3..1757cf477a 100644 --- a/openair2/RRC/NR/rrc_gNB_cuup.c +++ b/openair2/RRC/NR/rrc_gNB_cuup.c @@ -90,13 +90,13 @@ bool is_cuup_associated(gNB_RRC_INST *rrc) return false; } -bool ue_associated_to_cuup(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue) +bool ue_associated_to_cuup(const gNB_RRC_UE_t *ue) { f1_ue_data_t ue_data = cu_get_f1_ue_data(ue->rrc_ue_id); return ue_data.e1_assoc_id != 0; } -sctp_assoc_t get_existing_cuup_for_ue(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue) +sctp_assoc_t get_existing_cuup_for_ue(const gNB_RRC_UE_t *ue) { f1_ue_data_t ue_data = cu_get_f1_ue_data(ue->rrc_ue_id); AssertFatal(ue_data.e1_assoc_id != 0, "UE %d should be associated to CU-UP, but is not\n", ue->rrc_ue_id); @@ -178,7 +178,7 @@ static bool has_assoc_id(const void *vval, const void *vit) * that are in the process of connecting or that are on another DU might be * affected by that reset procedure as well; we suppose they will connect later * again. */ -static void remove_unassociated_e1_connections(gNB_RRC_INST *rrc, sctp_assoc_t e1_assoc_id) +static void remove_unassociated_e1_connections(gNB_RRC_INST *rrc) { seq_arr_t affected_du; seq_arr_init(&affected_du, sizeof(sctp_assoc_t)); @@ -189,7 +189,7 @@ static void remove_unassociated_e1_connections(gNB_RRC_INST *rrc, sctp_assoc_t e RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &rrc->rrc_ue_head) { gNB_RRC_UE_t *UE = &ue_context_p->ue_context; uint32_t ue_id = UE->rrc_ue_id; - if (ue_associated_to_cuup(rrc, UE)) + if (ue_associated_to_cuup(UE)) continue; f1_ue_data_t ue_data = cu_get_f1_ue_data(ue_id); elm_arr_t ret = find_if(&affected_du, &ue_data.du_assoc_id, has_assoc_id); @@ -268,7 +268,7 @@ int rrc_gNB_process_e1_setup_req(sctp_assoc_t assoc_id, const e1ap_setup_req_t * RB_INSERT(rrc_cuup_tree, &rrc->cuups, cuup); rrc->num_cuups++; - remove_unassociated_e1_connections(rrc, assoc_id); + remove_unassociated_e1_connections(rrc); MessageDef *msg_p = itti_alloc_new_message(TASK_RRC_GNB, 0, E1AP_SETUP_RESP); msg_p->ittiMsgHeader.originInstance = assoc_id; @@ -300,7 +300,7 @@ static void invalidate_cuup_connections(gNB_RRC_INST *rrc, sctp_assoc_t e1_assoc /** * @brief RRC Processing of the indication of E1 connection loss on CU-CP */ -void rrc_gNB_process_e1_lost_connection(gNB_RRC_INST *rrc, e1ap_lost_connection_t *lc, sctp_assoc_t assoc_id) +void rrc_gNB_process_e1_lost_connection(gNB_RRC_INST *rrc, sctp_assoc_t assoc_id) { LOG_I(NR_RRC, "Received E1 connection loss indication on RRC\n"); AssertFatal(assoc_id != 0, "illegal assoc_id == 0: should be -1 (monolithic) or >0 (split)\n"); diff --git a/openair2/RRC/NR/rrc_gNB_mobility.c b/openair2/RRC/NR/rrc_gNB_mobility.c index f2296f0fdc..e36e6ee684 100644 --- a/openair2/RRC/NR/rrc_gNB_mobility.c +++ b/openair2/RRC/NR/rrc_gNB_mobility.c @@ -154,6 +154,9 @@ typedef struct { static void rrc_deliver_ue_ctxt_modif_req(void *deliver_pdu_data, ue_id_t ue_id, int srb_id, char *buf, int size, int sdu_id) { + UNUSED(ue_id); + UNUSED(srb_id); + UNUSED(sdu_id); DevAssert(deliver_pdu_data != NULL); deliver_ue_ctxt_modification_data_t *data = deliver_pdu_data; byte_array_t ba = {.buf = (uint8_t *) buf, .len = size}; @@ -199,7 +202,7 @@ static void nr_rrc_f1_ho_acknowledge(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE) * in NR, do not re-establish PDCP */ nr_rrc_reconfig_param_t params = get_RRCReconfiguration_params(rrc, UE, (1 << SRB2), true); UE->xids[params.transaction_id] = RRC_DEDICATED_RECONF; - byte_array_t buffer = rrc_gNB_encode_RRCReconfiguration(rrc, UE, params); + byte_array_t buffer = rrc_gNB_encode_RRCReconfiguration(UE, params); free_RRCReconfiguration_params(params); if (!buffer.len) { LOG_E(NR_RRC, "UE %d: Failed to generate RRCReconfiguration\n", UE->rrc_ue_id); @@ -345,12 +348,12 @@ void nr_HO_F1_trigger_telnet(gNB_RRC_INST *rrc, uint32_t rrc_ue_id) /** @brief Generate the HandoverPreparationInformation to be carried * in the RRC Container (9.3.1.29 of 3GPP TS 38.413) of the Source * NG-RAN Node to Target NG-RAN Node Transparent Container IE */ -static byte_array_t rrc_gNB_generate_HandoverPreparationInformation(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue, int serving_pci) +static byte_array_t rrc_gNB_generate_HandoverPreparationInformation(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue) { nr_rrc_reconfig_param_t params = get_RRCReconfiguration_params(rrc, ue, 0, false); params.ue_cap = ue->ue_cap_buffer; - byte_array_t hoPrepInfo = get_HandoverPreparationInformation(¶ms, serving_pci); + byte_array_t hoPrepInfo = get_HandoverPreparationInformation(¶ms); free_RRCReconfiguration_params(params); if (hoPrepInfo.len < 0) { @@ -415,7 +418,7 @@ static byte_array_t rrc_gNB_encode_HandoverCommand(gNB_RRC_UE_t *UE, gNB_RRC_INS * - Source absent (inter-CU): N2 or Xn handover (target CU created new UE * on Handover Request). This UE context has no serving cells yet; add * target cell as first PCell. */ -bool nr_rrc_update_cell_assoc_after_ho(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE) +bool nr_rrc_update_cell_assoc_after_ho(gNB_RRC_UE_t *UE) { DevAssert(UE->ho_context); DevAssert(UE->ho_context->target); @@ -471,7 +474,7 @@ static void nr_rrc_n2_ho_acknowledge(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE) /* Update cell association after handover */ nr_ho_target_cu_t *target = UE->ho_context->target; - if (!nr_rrc_update_cell_assoc_after_ho(rrc, UE)) { + if (!nr_rrc_update_cell_assoc_after_ho(UE)) { ngap_handover_failure_t fail = {.amf_ue_ngap_id = UE->amf_ue_ngap_id, .cause.type = NGAP_CAUSE_RADIO_NETWORK, .cause.value = NGAP_CAUSE_RADIO_NETWORK_HO_FAILURE_IN_TARGET_5GC_NGRAN_NODE_OR_TARGET_SYSTEM}; @@ -547,12 +550,9 @@ void nr_rrc_trigger_n2_ho_target(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue) /** @brief Trigger N2 handover on source gNB: * 1) Prepare RRC Container with HandoverPreparationInformation message * 2) send NGAP Handover Required message */ -void nr_rrc_trigger_n2_ho(gNB_RRC_INST *rrc, - gNB_RRC_UE_t *ue, - int serving_pci, - const nr_neighbour_cell_t *neighbour_config) +void nr_rrc_trigger_n2_ho(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue, const nr_neighbour_cell_t *neighbour_config) { - byte_array_t hoPrepInfo = rrc_gNB_generate_HandoverPreparationInformation(rrc, ue, serving_pci); + byte_array_t hoPrepInfo = rrc_gNB_generate_HandoverPreparationInformation(rrc, ue); if (hoPrepInfo.len < 0) { free_byte_array(hoPrepInfo); LOG_E(NR_RRC, "Failed to trigger N2 handover on source gNB for UE %x\n", ue->rrc_ue_id); @@ -614,7 +614,7 @@ void nr_HO_N2_trigger_telnet(gNB_RRC_INST *rrc, uint32_t neighbour_pci, uint32_t .plmn = pcell->info.plmn, .subcarrierSpacing = pcell->info.mode == NR_MODE_TDD ? pcell->info.tdd.dlul.scs : pcell->info.fdd.dl.scs, }; - nr_rrc_trigger_n2_ho(rrc, UE, neighbour_pci, &neighbourConfig); + nr_rrc_trigger_n2_ho(rrc, UE, &neighbourConfig); return; } @@ -635,7 +635,7 @@ void nr_HO_N2_trigger_telnet(gNB_RRC_INST *rrc, uint32_t neighbour_pci, uint32_t return; } - nr_rrc_trigger_n2_ho(rrc, UE, pcell->info.pci, neighbour); + nr_rrc_trigger_n2_ho(rrc, UE, neighbour); } // This function detects if there are at least two different ssbFrequency values, and if so, returns meas_timing_config; diff --git a/openair2/RRC/NR/rrc_gNB_mobility.h b/openair2/RRC/NR/rrc_gNB_mobility.h index de4eabae64..eada8a6900 100644 --- a/openair2/RRC/NR/rrc_gNB_mobility.h +++ b/openair2/RRC/NR/rrc_gNB_mobility.h @@ -85,10 +85,7 @@ void nr_rrc_trigger_f1_ho(gNB_RRC_INST *rrc, void nr_rrc_finalize_ho(gNB_RRC_UE_t *ue); void nr_rrc_n2_ho_failure(gNB_RRC_INST *rrc, uint32_t gnb_ue_id, ngap_handover_failure_t *msg); -void nr_rrc_trigger_n2_ho(gNB_RRC_INST *rrc, - gNB_RRC_UE_t *ue, - int serving_pci, - const nr_neighbour_cell_t *neighbour_config); +void nr_rrc_trigger_n2_ho(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue, const nr_neighbour_cell_t *neighbour_config); void rrc_gNB_trigger_reconfiguration_for_handover(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue, uint8_t *rrc_reconf, int rrc_reconf_len); @@ -98,6 +95,6 @@ byte_array_t *get_meas_timing_config(const NR_MeasurementTimingConfiguration_t * void nr_rrc_apply_target_context(gNB_RRC_UE_t *UE); -bool nr_rrc_update_cell_assoc_after_ho(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE); +bool nr_rrc_update_cell_assoc_after_ho(gNB_RRC_UE_t *UE); #endif /* RRC_GNB_MOBILITY_H_ */ diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 908956c0e9..44fd779605 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -435,7 +435,7 @@ static NR_CG_Config_t *generate_CG_Config(const NR_RRCReconfiguration_t *reconfi return cg_Config; } -void rrc_add_nsa_user_resp(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, const f1ap_ue_context_setup_resp_t *resp) +void rrc_add_nsa_user_resp(gNB_RRC_UE_t *UE, const f1ap_ue_context_setup_resp_t *resp) { DevAssert(resp->crnti != NULL); /* we did not fill any DU-related ID info in rrc_add_nsa_user() */ diff --git a/openair2/RRC/NR/rrc_gNB_radio_bearers.c b/openair2/RRC/NR/rrc_gNB_radio_bearers.c index de634d27a1..d10f50345e 100644 --- a/openair2/RRC/NR/rrc_gNB_radio_bearers.c +++ b/openair2/RRC/NR/rrc_gNB_radio_bearers.c @@ -63,7 +63,11 @@ nr_rrc_qos_t *add_qos(seq_arr_t *qos, const pdusession_level_qos_parameter_t *in } /** @brief Free QoS flows list items */ -static void free_qos(void *ptr) { /*nothing to do*/ } +static void free_qos(void *ptr) +{ + /*nothing to do*/ + UNUSED(ptr); +} /** @brief Free QoS flows list */ static void free_rrc_qos_list(seq_arr_t *seq) @@ -233,6 +237,7 @@ drb_t *get_drb(seq_arr_t *seq, int id) void free_drb(void *ptr) { // do nothing + UNUSED(ptr); } rrc_pdu_session_param_t *find_pduSession_from_drbId(gNB_RRC_UE_t *ue, int drb_id) diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index 9d921d2131..b0b3b501cd 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -33,12 +33,10 @@ void nr_mac_rrc_sync_ind(const module_id_t module_id, const frame_t frame, const } void nr_mac_rrc_data_ind_ue(const module_id_t module_id, - const int CC_id, const uint8_t gNB_index, const int hfn, const frame_t frame, const int slot, - const rnti_t rnti, const uint32_t cellid, const long arfcn, const channel_t channel, diff --git a/openair2/RRC/NR_UE/L2_interface_ue.h b/openair2/RRC/NR_UE/L2_interface_ue.h index eaac8290c9..09c7b7daae 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.h +++ b/openair2/RRC/NR_UE/L2_interface_ue.h @@ -10,12 +10,10 @@ typedef uint32_t channel_t; #define _L2_INTERFACE_UE_H_ void nr_mac_rrc_sync_ind(const module_id_t module_id, const frame_t frame, const bool in_sync); void nr_mac_rrc_data_ind_ue(const module_id_t module_id, - const int CC_id, const uint8_t gNB_index, const int hfn, const frame_t frame, const int slot, - const rnti_t rnti, const uint32_t cellid, const long arfcn, const channel_t channel, diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 0a4b1a7fb5..37bca1d45a 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -2014,8 +2014,6 @@ static void nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc, const uint8_t gNB_index, uint8_t *const Sdu, const uint8_t Sdu_len, - const uint8_t rsrq, - const uint8_t rsrp, int hfn, int frame, int slot) @@ -3067,6 +3065,7 @@ static void nr_rrc_handle_meas_indication(NR_UE_RRC_INST_t *rrc, NRRrcMacMeasDat void *rrc_nrue_task(void *args_p) { + UNUSED(args_p); itti_mark_task_ready(TASK_RRC_NRUE); while (1) { rrc_nrue(NULL); @@ -3075,6 +3074,7 @@ void *rrc_nrue_task(void *args_p) void *rrc_nrue(void *notUsed) { + UNUSED(notUsed); MessageDef *msg_p = NULL; itti_receive_msg(TASK_RRC_NRUE, &msg_p); instance_t instance = ITTI_MSG_DESTINATION_INSTANCE(msg_p); @@ -3152,24 +3152,15 @@ void *rrc_nrue(void *notUsed) if (bcch->is_bch) nr_rrc_ue_decode_NR_BCCH_BCH_Message(rrc, bcch->gnb_index, bcch->phycellid, bcch->ssb_arfcn, bcch->sdu, bcch->sdu_size); else - nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(rrc, - bcch->gnb_index, - bcch->sdu, - bcch->sdu_size, - bcch->rsrq, - bcch->rsrp, - bcch->hfn, - bcch->frame, - bcch->slot); + nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(rrc, bcch->gnb_index, bcch->sdu, bcch->sdu_size, bcch->hfn, bcch->frame, bcch->slot); break; case NR_RRC_MAC_SBCCH_DATA_IND: LOG_D(NR_RRC, "[UE %ld] Received %s: gNB %d\n", instance, ITTI_MSG_NAME(msg_p), NR_RRC_MAC_SBCCH_DATA_IND(msg_p).gnb_index); NRRrcMacSBcchDataInd *sbcch = &NR_RRC_MAC_SBCCH_DATA_IND(msg_p); - - nr_rrc_ue_decode_NR_SBCCH_SL_BCH_Message(rrc, sbcch->gnb_index,sbcch->frame, sbcch->slot, sbcch->sdu, - sbcch->sdu_size, sbcch->rx_slss_id); + nr_rrc_ue_decode_NR_SBCCH_SL_BCH_Message(rrc, sbcch->sdu, sbcch->sdu_size, sbcch->rx_slss_id); break; + case NR_RRC_MAC_MEAS_DATA_IND: nr_rrc_handle_meas_indication(rrc, &NR_RRC_MAC_MEAS_DATA_IND(msg_p)); break; diff --git a/openair2/RRC/NR_UE/rrc_proto.h b/openair2/RRC/NR_UE/rrc_proto.h index 02005d0986..5efd15306a 100644 --- a/openair2/RRC/NR_UE/rrc_proto.h +++ b/openair2/RRC/NR_UE/rrc_proto.h @@ -67,9 +67,6 @@ void start_sidelink(int instance); void rrc_ue_process_sidelink_Preconfiguration(NR_UE_RRC_INST_t *rrc_inst, int sync_ref); void nr_rrc_ue_decode_NR_SBCCH_SL_BCH_Message(NR_UE_RRC_INST_t *rrc, - const uint8_t gNB_index, - const frame_t frame, - const int slot, uint8_t* pduP, const sdu_size_t pdu_len, const uint16_t rx_slss_id); diff --git a/openair2/RRC/NR_UE/rrc_sl_preconfig.c b/openair2/RRC/NR_UE/rrc_sl_preconfig.c index 8bd5c37104..84f73df4a3 100644 --- a/openair2/RRC/NR_UE/rrc_sl_preconfig.c +++ b/openair2/RRC/NR_UE/rrc_sl_preconfig.c @@ -421,9 +421,7 @@ int configure_NR_SL_Preconfig(NR_UE_RRC_INST_t *rrc,int sync_source) } /*decode SL-BCH (SL-MIB) message*/ -static int8_t nr_sl_rrc_ue_decode_SL_MIB(const uint8_t gNB_index, - uint8_t *const bufferP, - const uint8_t buffer_len) +static int8_t nr_sl_rrc_ue_decode_SL_MIB(uint8_t *const bufferP, const uint8_t buffer_len) { NR_MasterInformationBlockSidelink_t *sl_mib = NULL; @@ -456,15 +454,12 @@ static int8_t nr_sl_rrc_ue_decode_SL_MIB(const uint8_t gNB_index, void nr_rrc_ue_decode_NR_SBCCH_SL_BCH_Message(NR_UE_RRC_INST_t *rrc, - const uint8_t gNB_index, - const frame_t frame, - const int slot, uint8_t* pduP, const sdu_size_t pdu_len, const uint16_t rx_slss_id) { - nr_sl_rrc_ue_decode_SL_MIB(gNB_index, (uint8_t*)pduP, pdu_len); + nr_sl_rrc_ue_decode_SL_MIB((uint8_t*)pduP, pdu_len); DevAssert(rrc->sl_preconfig); diff --git a/openair2/SDAP/nr_sdap/nr_sdap.c b/openair2/SDAP/nr_sdap/nr_sdap.c index e477764c45..c78fdca973 100644 --- a/openair2/SDAP/nr_sdap/nr_sdap.c +++ b/openair2/SDAP/nr_sdap/nr_sdap.c @@ -63,18 +63,13 @@ bool sdap_data_req(protocol_ctxt_t *ctxt_p, return ret; } -void sdap_data_ind(int pdcp_entity, - int is_gnb, - bool has_sdap_rx, - int pdusession_id, - ue_id_t ue_id, - char *buf, - int size) { +void sdap_data_ind(int pdcp_entity, int is_gnb, int pdusession_id, ue_id_t ue_id, char *buf, int size) +{ nr_sdap_entity_t *sdap_entity; sdap_entity = nr_sdap_get_entity(ue_id, pdusession_id); if (sdap_entity == NULL) { - LOG_E(SDAP, "%s:%d:%s: Entity not found for ue rnti/ue_id: %lx and pdusession id: %d\n", __FILE__, __LINE__, __FUNCTION__, ue_id, pdusession_id); + LOG_E(SDAP, "Entity not found for ue rnti/ue_id: %lx and pdusession id: %d\n", ue_id, pdusession_id); return; } diff --git a/openair2/SDAP/nr_sdap/nr_sdap.h b/openair2/SDAP/nr_sdap/nr_sdap.h index f66c954f2c..4275e1757a 100644 --- a/openair2/SDAP/nr_sdap/nr_sdap.h +++ b/openair2/SDAP/nr_sdap/nr_sdap.h @@ -35,13 +35,7 @@ bool sdap_data_req(protocol_ctxt_t *ctxt_p, * Uplink - gNB * Downlink - nrUE */ -void sdap_data_ind(int pdcp_entity, - int is_gnb, - bool has_sdap_rx, - int pdusession_id, - ue_id_t ue_id, - char *buf, - int size); +void sdap_data_ind(int pdcp_entity, int is_gnb, int pdusession_id, ue_id_t ue_id, char *buf, int size); void start_sdap_tun_gnb_first_ue_default_pdu_session(ue_id_t ue_id, int pdu_session_id); void create_ue_ip_if(const char *ipv4, const char *ipv6, int ue_id, int pdu_session_id, bool is_default); diff --git a/openair2/XNAP/lib/xnap_gNB_interface_management.c b/openair2/XNAP/lib/xnap_gNB_interface_management.c index 6fb0985487..bcf2b5ee09 100644 --- a/openair2/XNAP/lib/xnap_gNB_interface_management.c +++ b/openair2/XNAP/lib/xnap_gNB_interface_management.c @@ -451,4 +451,5 @@ bool eq_xnap_setup_failure(const xnap_setup_failure_t *a, const xnap_setup_failu void free_xnap_setup_failure(xnap_setup_failure_t *msg) { // nothing to free + UNUSED(msg); }