Commit 83f66f2a authored by Bartosz Podrygajlo's avatar Bartosz Podrygajlo

Replace 0 with module id for NR UE

Add UE id to several LOG macros
parent 5af81bbc
...@@ -416,7 +416,7 @@ static void RU_write(nr_rxtx_thread_data_t *rxtxD, bool sl_tx_action) ...@@ -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; 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 && if (mac->phy_config_request_sent &&
openair0_cfg[0].duplex_mode == duplex_mode_TDD && openair0_cfg[0].duplex_mode == duplex_mode_TDD &&
!get_softmodem_params()->continuous_tx) { !get_softmodem_params()->continuous_tx) {
...@@ -769,7 +769,7 @@ void *UE_thread(void *arg) ...@@ -769,7 +769,7 @@ void *UE_thread(void *arg)
initNotifiedFIFO_nothreadSafe(&freeBlocks); initNotifiedFIFO_nothreadSafe(&freeBlocks);
int timing_advance = UE->timing_advance; 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; bool syncRunning = false;
const int nb_slot_frame = fp->slots_per_frame; const int nb_slot_frame = fp->slots_per_frame;
......
...@@ -1004,7 +1004,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, ...@@ -1004,7 +1004,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
switch (csirs_config_pdu->measurement_bitmap) { switch (csirs_config_pdu->measurement_bitmap) {
case 1 : 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; break;
case 26 : case 26 :
LOG_I(NR_PHY, "RI = %i i1 = %i.%i.%i, i2 = %i, SINR = %i dB, CQI = %i\n", LOG_I(NR_PHY, "RI = %i i1 = %i.%i.%i, i2 = %i, SINR = %i dB, CQI = %i\n",
......
...@@ -944,7 +944,7 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_ ...@@ -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 output[harq_output_len];
char *p = output; char *p = output;
const char *end = output + harq_output_len; 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) for (int round = 1; round < 16 && (round < 3 || ue->dl_stats[round] != 0); ++round)
p += snprintf(p, end - p,"/%d", ue->dl_stats[round]); p += snprintf(p, end - p,"/%d", ue->dl_stats[round]);
LOG_I(NR_PHY,"%s\n", output); LOG_I(NR_PHY,"%s\n", output);
......
...@@ -250,7 +250,7 @@ static void config_common_ue(NR_UE_MAC_INST_t *mac, ...@@ -250,7 +250,7 @@ static void config_common_ue(NR_UE_MAC_INST_t *mac,
mac->phy_config.CC_id = cc_idP; mac->phy_config.CC_id = cc_idP;
// carrier config // 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"); 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, ...@@ -2219,7 +2219,7 @@ void nr_rrc_mac_config_req_cg(module_id_t module_id,
NR_CellGroupConfig_t *cell_group_config, NR_CellGroupConfig_t *cell_group_config,
NR_UE_NR_Capability_t *ue_Capability) 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"); AssertFatal(cell_group_config, "CellGroupConfig should not be NULL\n");
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
......
...@@ -130,7 +130,7 @@ NR_UE_MAC_INST_t *nr_l2_init_ue(int nb_inst) ...@@ -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); AssertFatal(nr_ue_mac_inst, "Couldn't allocate %d instances of MAC module\n", nb_inst);
for (int j = 0; j < nb_inst; j++) { 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; mac->ue_id = j;
nr_ue_init_mac(mac); nr_ue_init_mac(mac);
nr_ue_mac_default_configs(mac); nr_ue_mac_default_configs(mac);
......
...@@ -225,7 +225,7 @@ static void nr_rrc_ue_process_rrcReconfiguration(NR_UE_RRC_INST_t *rrc, ...@@ -225,7 +225,7 @@ static void nr_rrc_ue_process_rrcReconfiguration(NR_UE_RRC_INST_t *rrc,
nr_rrc_cellgroup_configuration(rrc, cellGroupConfig); nr_rrc_cellgroup_configuration(rrc, cellGroupConfig);
AssertFatal(!get_softmodem_params()->sa, "secondaryCellGroup only used in NSA for now\n"); 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); asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, cellGroupConfig);
} }
if (ie->measConfig != NULL) { if (ie->measConfig != NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment