From 5a7d2755460119874513c80a842c0d5f6e1ac83a Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 11 Aug 2025 16:39:52 +0200 Subject: [PATCH] fix bug in computing number of LCG IDs with data at UE --- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index b95597a0ba..cf7fda5ccf 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -2375,7 +2375,7 @@ static void nr_ue_get_sdu_mac_ce_post(NR_UE_MAC_INST_t *mac, int short_bsr_sz = sizeof(NR_BSR_SHORT) + sizeof(NR_MAC_SUBHEADER_FIXED); int num_lcg_id_with_data = 0; for (int lcg_id = 0; lcg_id < NR_MAX_NUM_LCGID; lcg_id++) - num_lcg_id_with_data += LCG_bytes > 0; + num_lcg_id_with_data += LCG_bytes[lcg_id] > 0; int long_bsr_sz = num_lcg_id_with_data + sizeof(NR_BSR_LONG) + sizeof(NR_MAC_SUBHEADER_SHORT); if (num_lcg_id_with_data < 2 && padding_len >= short_bsr_sz) { mac_ce_p->bsr.type_bsr = b_short;