From e70bb45ebd269b94e22db9e6d4cb27e82ec14880 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 21 Aug 2025 16:59:29 +0200 Subject: [PATCH] gNB: consider the measured PUSCH SNR when computing the UL MCS if only one round is used --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index b08e703076..e758a0cab4 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -2061,7 +2061,11 @@ static int pf_ul(gNB_MAC_INST *nrmac, const int max_mcs = min(bo->max_mcs, max_mcs_table); /* no per-user maximum MCS yet */ int selected_mcs; if (bo->harq_round_max == 1) { - selected_mcs = sched_ctrl->ul_bler_stats.mcs = max_mcs; + int nrOfLayers = get_ul_nrOfLayers(sched_ctrl, current_BWP->dci_format); + selected_mcs = get_mcs_from_SINRx10(current_BWP->mcs_table, sched_ctrl->pusch_snrx10, nrOfLayers); + selected_mcs = min(max_mcs, selected_mcs); + selected_mcs = max(bo->min_mcs, selected_mcs); + sched_ctrl->ul_bler_stats.mcs = selected_mcs; } else { selected_mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->ul_bler_stats, max_mcs, frame); LOG_D(NR_MAC, "%d.%d starting mcs %d bler %f\n", frame, slot, selected_mcs, sched_ctrl->ul_bler_stats.bler);