From 9f8a2573ee14a5897f04426396ded49c6090b767 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Fri, 27 Sep 2024 14:38:28 +0200 Subject: [PATCH] gNB: update DL and UL bler_stats.mcs for logging also in case of harq_round_max == 1 --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 5 +++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index d6829c1ba2..96e0e54827 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -683,9 +683,10 @@ static void pf_dl(module_id_t module_id, const NR_bler_options_t *bo = &mac->dl_bler; const int max_mcs_table = current_BWP->mcsTableIdx == 1 ? 27 : 28; const int max_mcs = min(sched_ctrl->dl_max_mcs, max_mcs_table); - if (bo->harq_round_max == 1) + if (bo->harq_round_max == 1) { sched_pdsch->mcs = min(bo->max_mcs, max_mcs); - else + sched_ctrl->dl_bler_stats.mcs = sched_pdsch->mcs; + } else sched_pdsch->mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->dl_bler_stats, max_mcs, frame); sched_pdsch->nrOfLayers = get_dl_nrOfLayers(sched_ctrl, current_BWP->dci_format); sched_pdsch->pm_index = diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index d091d486ff..596c293ebd 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1848,9 +1848,10 @@ static void pf_ul(module_id_t module_id, const NR_bler_options_t *bo = &nrmac->ul_bler; const int max_mcs_table = (current_BWP->mcs_table == 0 || current_BWP->mcs_table == 2) ? 28 : 27; const int max_mcs = min(bo->max_mcs, max_mcs_table); /* no per-user maximum MCS yet */ - if (bo->harq_round_max == 1) + if (bo->harq_round_max == 1) { sched_pusch->mcs = max_mcs; - else { + sched_ctrl->ul_bler_stats.mcs = sched_pusch->mcs; + } else { sched_pusch->mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->ul_bler_stats, max_mcs, frame); LOG_D(NR_MAC,"%d.%d starting mcs %d bleri %f\n",frame,slot,sched_pusch->mcs,sched_ctrl->ul_bler_stats.bler); }