Commit df8f632a authored by Robert Schmidt's avatar Robert Schmidt

Make sched_csirs common to all UEs

parent 23c8336a
...@@ -59,8 +59,7 @@ const int get_dl_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon ...@@ -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"); AssertFatal(tdd || nrmac->common_channels->frame_type == FDD, "Dynamic TDD not handled yet\n");
// Use special TDA in case of CSI-RS // Use special TDA in case of CSI-RS
const NR_UE_info_t *UE_info = &nrmac->UE_info; if(nrmac->UE_info.sched_csirs)
if(UE_info->sched_csirs)
return 1; return 1;
if (tdd && tdd->nrofDownlinkSymbols > 1) { // if there is a mixed slot where we can transmit DL if (tdd && tdd->nrofDownlinkSymbols > 1) { // if there is a mixed slot where we can transmit DL
......
...@@ -2692,6 +2692,7 @@ void nr_csirs_scheduling(int Mod_idP, ...@@ -2692,6 +2692,7 @@ void nr_csirs_scheduling(int Mod_idP,
gNB_MAC_INST *gNB_mac = RC.nrmac[Mod_idP]; gNB_MAC_INST *gNB_mac = RC.nrmac[Mod_idP];
uint16_t *vrb_map = gNB_mac->common_channels[CC_id].vrb_map; uint16_t *vrb_map = gNB_mac->common_channels[CC_id].vrb_map;
UE_info->sched_csirs = false;
UE_iterator(UE_info->list, UE) { UE_iterator(UE_info->list, UE) {
...@@ -2724,7 +2725,7 @@ void nr_csirs_scheduling(int Mod_idP, ...@@ -2724,7 +2725,7 @@ void nr_csirs_scheduling(int Mod_idP,
if((frame*n_slots_frame+slot-offset)%period == 0) { if((frame*n_slots_frame+slot-offset)%period == 0) {
LOG_D(NR_MAC,"Scheduling CSI-RS in frame %d slot %d\n",frame,slot); 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]; 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)); memset((void*)dl_tti_csirs_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t));
......
...@@ -716,7 +716,6 @@ typedef struct { ...@@ -716,7 +716,6 @@ typedef struct {
uint8_t UE_beam_index; uint8_t UE_beam_index;
bool Msg4_ACKed; bool Msg4_ACKed;
/// Sched CSI-RS: scheduling decisions /// Sched CSI-RS: scheduling decisions
bool sched_csirs;
NR_gNB_UCI_STATS_t uci_statS; NR_gNB_UCI_STATS_t uci_statS;
float ul_thr_ue; float ul_thr_ue;
float dl_thr_ue; float dl_thr_ue;
...@@ -728,6 +727,7 @@ typedef struct { ...@@ -728,6 +727,7 @@ typedef struct {
// last element always NULL // last element always NULL
pthread_mutex_t mutex; pthread_mutex_t mutex;
NR_UE_info_t *list[MAX_MOBILES_PER_GNB+1]; NR_UE_info_t *list[MAX_MOBILES_PER_GNB+1];
bool sched_csirs;
} NR_UEs_t; } NR_UEs_t;
#define UE_iterator(BaSe, VaR) NR_UE_info_t ** VaR##pptr=BaSe, *VaR; while ((VaR=*(VaR##pptr++))) #define UE_iterator(BaSe, VaR) NR_UE_info_t ** VaR##pptr=BaSe, *VaR; while ((VaR=*(VaR##pptr++)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment