From 1022311a8e7960c7c21b94d0b7967230bd8cb90f Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 27 Sep 2021 19:35:34 +0200 Subject: [PATCH] another fix in acknack scheduling --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 252144be3b..827d2c6863 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -445,7 +445,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, schedule_nr_prach(module_idP, f, s); } - // This schedule SR + // This schedule SR nr_sr_reporting(module_idP, frame, slot); // Schedule CSI-RS transmission diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 5a61e7973a..d5e51d2a0d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1289,8 +1289,10 @@ int nr_acknack_scheduling(int mod_id, LOG_D(NR_MAC,"pucch_acknak : %d.%d DAI = 0, looking for new pucch occasion\n",frame,slot); /* we need to find a new PUCCH occasion */ - /*Inizialization of timing information*/ - if (pucch->frame == 0 && pucch->ul_slot == 0) { + /*(Re)Inizialization of timing information*/ + if ((pucch->frame == 0 && pucch->ul_slot == 0) || + ((pucch->frame*n_slots_frame + pucch->ul_slot) < + (frame*n_slots_frame + slot))) { AssertFatal(pucch->sr_flag + pucch->dai_c == 0, "expected no SR/AckNack for UE %d in %4d.%2d, but has %d/%d for %4d.%2d\n", UE_id, frame, slot, pucch->sr_flag, pucch->dai_c, pucch->frame, pucch->ul_slot); @@ -1364,7 +1366,6 @@ int nr_acknack_scheduling(int mod_id, } // multiplexing harq and csi in a pucch else { - memset(pucch, 0, sizeof(*pucch)); csi_pucch->timing_indicator = ind_found; csi_pucch->dai_c++; return 1;