diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 2e983e066419888e761c0e53e77a138930b3f211..95834e84c5a8e4112fd683b3ff37d8f5c3bfb71d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -59,8 +59,7 @@ const int get_dl_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon AssertFatal(tdd || nrmac->common_channels->frame_type == FDD, "Dynamic TDD not handled yet\n"); // Use special TDA in case of CSI-RS - const NR_UE_info_t *UE_info = &nrmac->UE_info; - if(UE_info->sched_csirs) + if(nrmac->UE_info.sched_csirs) return 1; if (tdd && tdd->nrofDownlinkSymbols > 1) { // if there is a mixed slot where we can transmit DL diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 03dd076265a3aef40d46aa8a0dc220548473bb80..65d2ce09c5044ef5f9165396dd63ca55c79ac6d5 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -2692,6 +2692,7 @@ void nr_csirs_scheduling(int Mod_idP, gNB_MAC_INST *gNB_mac = RC.nrmac[Mod_idP]; uint16_t *vrb_map = gNB_mac->common_channels[CC_id].vrb_map; + UE_info->sched_csirs = false; UE_iterator(UE_info->list, UE) { @@ -2724,7 +2725,7 @@ void nr_csirs_scheduling(int Mod_idP, if((frame*n_slots_frame+slot-offset)%period == 0) { LOG_D(NR_MAC,"Scheduling CSI-RS in frame %d slot %d\n",frame,slot); - UE->sched_csirs = true; + UE_info->sched_csirs = true; nfapi_nr_dl_tti_request_pdu_t *dl_tti_csirs_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void*)dl_tti_csirs_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 1aca7cae57720b5674d091837d1920f3fb266738..974d6dff4a75ff9e791bc555b5de7268342f2c7b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -716,7 +716,6 @@ typedef struct { uint8_t UE_beam_index; bool Msg4_ACKed; /// Sched CSI-RS: scheduling decisions - bool sched_csirs; NR_gNB_UCI_STATS_t uci_statS; float ul_thr_ue; float dl_thr_ue; @@ -728,6 +727,7 @@ typedef struct { // last element always NULL pthread_mutex_t mutex; NR_UE_info_t *list[MAX_MOBILES_PER_GNB+1]; + bool sched_csirs; } NR_UEs_t; #define UE_iterator(BaSe, VaR) NR_UE_info_t ** VaR##pptr=BaSe, *VaR; while ((VaR=*(VaR##pptr++)))