From 616927c04d993820cefc25fb5276c22bf7a19837 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Wed, 1 Jun 2022 17:22:59 +0100 Subject: [PATCH] Fixes after merge --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 5571d27597..ad7db304bf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -789,15 +789,14 @@ void handle_nr_srs_measurements(const module_id_t module_id, } #endif - const int UE_id = find_nr_UE_id(module_id,rnti); - if (UE_id < 0) { + NR_UE_info_t* UE = find_nr_UE(&RC.nrmac[module_id]->UE_info, rnti); + if (!UE) { LOG_W(NR_MAC, "Could not find UE for RNTI 0x%04x\n", rnti); return; } gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; - NR_UE_info_t *UE_info = &nr_mac->UE_info; - NR_mac_stats_t *stats = &UE_info->mac_stats[UE_id]; + NR_mac_stats_t *stats = &UE->mac_stats; stats->srs_wide_band_snr = (wide_band_snr>>1)-64; int ul_prbblack_SNR_threshold = nr_mac->ul_prbblack_SNR_threshold;