diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 3a11b4e4e3..e5e3ef3569 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -416,7 +416,7 @@ static void RU_write(nr_rxtx_thread_data_t *rxtxD, bool sl_tx_action) radio_tx_burst_flag_t flags = TX_BURST_INVALID; - NR_UE_MAC_INST_t *mac = get_mac_inst(0); + NR_UE_MAC_INST_t *mac = get_mac_inst(UE->Mod_id); if (mac->phy_config_request_sent && openair0_cfg[0].duplex_mode == duplex_mode_TDD && !get_softmodem_params()->continuous_tx) { @@ -769,7 +769,7 @@ void *UE_thread(void *arg) initNotifiedFIFO_nothreadSafe(&freeBlocks); int timing_advance = UE->timing_advance; - NR_UE_MAC_INST_t *mac = get_mac_inst(0); + NR_UE_MAC_INST_t *mac = get_mac_inst(UE->Mod_id); bool syncRunning = false; const int nb_slot_frame = fp->slots_per_frame; diff --git a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c index fbb6113405..980c8e3813 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c +++ b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c @@ -1004,7 +1004,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, switch (csirs_config_pdu->measurement_bitmap) { case 1 : - LOG_I(NR_PHY, "RSRP = %i dBm\n", rsrp_dBm); + LOG_I(NR_PHY, "[UE %d] RSRP = %i dBm\n", ue->Mod_id, rsrp_dBm); break; case 26 : LOG_I(NR_PHY, "RI = %i i1 = %i.%i.%i, i2 = %i, SINR = %i dB, CQI = %i\n", diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index d3ce92da26..dcc5a058c8 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -944,7 +944,7 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_ char output[harq_output_len]; char *p = output; const char *end = output + harq_output_len; - p += snprintf(p, end - p, "Harq round stats for Downlink: %d", ue->dl_stats[0]); + p += snprintf(p, end - p, "[UE %d] Harq round stats for Downlink: %d", ue->Mod_id, ue->dl_stats[0]); for (int round = 1; round < 16 && (round < 3 || ue->dl_stats[round] != 0); ++round) p += snprintf(p, end - p,"/%d", ue->dl_stats[round]); LOG_I(NR_PHY,"%s\n", output); diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 52d45c938b..9fb3d1cfc9 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -250,7 +250,7 @@ static void config_common_ue(NR_UE_MAC_INST_t *mac, mac->phy_config.CC_id = cc_idP; // carrier config - LOG_D(MAC, "Entering UE Config Common\n"); + LOG_D(MAC, "[UE %d] Entering UE Config Common\n", mac->ue_id); AssertFatal(scc->downlinkConfigCommon, "Not expecting downlinkConfigCommon to be NULL here\n"); @@ -2219,7 +2219,7 @@ void nr_rrc_mac_config_req_cg(module_id_t module_id, NR_CellGroupConfig_t *cell_group_config, NR_UE_NR_Capability_t *ue_Capability) { - LOG_I(MAC,"Applying CellGroupConfig from gNodeB\n"); + LOG_I(MAC,"[UE %d] Applying CellGroupConfig from gNodeB\n", module_id); AssertFatal(cell_group_config, "CellGroupConfig should not be NULL\n"); NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c index 3941488682..4d8b79a2ab 100644 --- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c +++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c @@ -130,7 +130,7 @@ NR_UE_MAC_INST_t *nr_l2_init_ue(int nb_inst) AssertFatal(nr_ue_mac_inst, "Couldn't allocate %d instances of MAC module\n", nb_inst); for (int j = 0; j < nb_inst; j++) { - NR_UE_MAC_INST_t *mac = get_mac_inst(j); + NR_UE_MAC_INST_t *mac = &nr_ue_mac_inst[j]; mac->ue_id = j; nr_ue_init_mac(mac); nr_ue_mac_default_configs(mac); diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 980f793c0a..7192b36af2 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -225,7 +225,7 @@ static void nr_rrc_ue_process_rrcReconfiguration(NR_UE_RRC_INST_t *rrc, nr_rrc_cellgroup_configuration(rrc, cellGroupConfig); AssertFatal(!get_softmodem_params()->sa, "secondaryCellGroup only used in NSA for now\n"); - nr_rrc_mac_config_req_cg(0, 0, cellGroupConfig, rrc->UECap.UE_NR_Capability); + nr_rrc_mac_config_req_cg(rrc->ue_id, 0, cellGroupConfig, rrc->UECap.UE_NR_Capability); asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, cellGroupConfig); } if (ie->measConfig != NULL) {