From 6413a674859f34ea76760def5a7ed3ce6b159499 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 8 Nov 2021 09:34:52 +0100 Subject: [PATCH] adding assertion in case of reconfiguration of nb of harq processes --- openair2/LAYER2/NR_MAC_gNB/config.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 1038cca087..9e27e26b31 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -612,10 +612,10 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]); const NR_ServingCellConfig_t *servingCellConfig = CellGroup ? CellGroup->spCellConfig->spCellConfigDedicated : NULL; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + const NR_PDSCH_ServingCellConfig_t *pdsch = servingCellConfig ? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL; + const int nrofHARQ = pdsch ? (pdsch->nrofHARQ_ProcessesForPDSCH ? + get_nrofHARQ_ProcessesForPDSCH(*pdsch->nrofHARQ_ProcessesForPDSCH) : 8) : 8; if (sched_ctrl->available_dl_harq.len == 0) { - const NR_PDSCH_ServingCellConfig_t *pdsch = servingCellConfig ? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL; - const int nrofHARQ = pdsch ? (pdsch->nrofHARQ_ProcessesForPDSCH ? - get_nrofHARQ_ProcessesForPDSCH(*pdsch->nrofHARQ_ProcessesForPDSCH) : 8) : 8; // add all available DL HARQ processes for this UE create_nr_list(&sched_ctrl->available_dl_harq, nrofHARQ); for (int harq = 0; harq < nrofHARQ; harq++) @@ -623,6 +623,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, create_nr_list(&sched_ctrl->feedback_dl_harq, nrofHARQ); create_nr_list(&sched_ctrl->retrans_dl_harq, nrofHARQ); } + else + AssertFatal(sched_ctrl->available_dl_harq.len==nrofHARQ, + "Nr of harq processes reconfiguration not yet supported\n"); // update coreset/searchspace void *bwpd = NULL; target_ss = NR_SearchSpace__searchSpaceType_PR_common;