From 4edc5c2d3341281633de679880a60900f4ed3267 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 5 May 2025 16:31:06 +0200 Subject: [PATCH] fix tci_StatesPDCCH --- openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index 35d4c95ece..cfb38cf53a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -296,13 +296,13 @@ static NR_ControlResourceSet_t *get_coreset_config(int bwp_id, int bwp_start, in // The ID space is used across the BWPs of a Serving Cell as per 38.331 coreset->controlResourceSetId = bwp_id + 1; - coreset->tci_StatesPDCCH_ToAddList=calloc(1,sizeof(*coreset->tci_StatesPDCCH_ToAddList)); - NR_TCI_StateId_t *tci[64]; - for (int i=0;i<64;i++) { - if ((ssb_bitmap>>(63-i))&0x01){ - tci[i]=calloc(1,sizeof(*tci[i])); - *tci[i] = i; - asn1cSeqAdd(&coreset->tci_StatesPDCCH_ToAddList->list,tci[i]); + coreset->tci_StatesPDCCH_ToAddList = calloc(1,sizeof(*coreset->tci_StatesPDCCH_ToAddList)); + int num_ssb = 0; + for (int i = 0; i < 64; i++) { + if ((ssb_bitmap >> (63 - i)) & 0x01) { + NR_TCI_StateId_t *tci = calloc(1, sizeof(*tci)); + *tci = num_ssb++; + asn1cSeqAdd(&coreset->tci_StatesPDCCH_ToAddList->list, tci); } } coreset->tci_StatesPDCCH_ToReleaseList = NULL;