diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 834c955b03..5e4e7b207c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -361,7 +361,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, int UE_id; uint64_t *dlsch_in_slot_bitmap=NULL; uint64_t *ulsch_in_slot_bitmap=NULL; - int pucch_sched; UE_id=0; int bwp_id = 1; @@ -468,8 +467,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, // Phytest scheduling if (UE_list->fiveG_connected[UE_id] && (is_xlsch_in_slot(*dlsch_in_slot_bitmap,slot_txP%num_slots_per_tdd))) { ue_sched_ctl->current_harq_pid = slot_txP % num_slots_per_tdd; - nr_update_pucch_scheduling(module_idP, UE_id, frame_txP, slot_txP, num_slots_per_tdd,&pucch_sched); - nr_schedule_uss_dlsch_phytest(module_idP, frame_txP, slot_txP, &UE_list->UE_sched_ctrl[UE_id].sched_pucch[pucch_sched], NULL); + nr_schedule_uss_dlsch_phytest(module_idP, frame_txP, slot_txP, num_slots_per_tdd, NULL); // resetting ta flag gNB->ta_len = 0; } @@ -479,7 +477,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) allocate_CCEs(module_idP, CC_id, subframeP, 0); */ - } //is_nr_DL_slot if (is_nr_UL_slot(cc->ServingCellConfigCommon,slot_rxP)) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 93277bbb96..5693a1e9c3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -541,12 +541,13 @@ void configure_fapi_dl_Tx(module_id_t Mod_idP, void nr_schedule_uss_dlsch_phytest(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, - NR_sched_pucch *pucch_sched, + int num_slots_per_tdd, nfapi_nr_dl_tti_pdsch_pdu_rel15_t *dlsch_config){ int post_padding = 0, ta_len = 0, header_length_total = 0, sdu_length_total = 0, num_sdus = 0; int lcid, offset, i, header_length_last, TBS_bytes; int UE_id = 0, CC_id = 0; + int pucch_sched; gNB_MAC_INST *gNB_mac = RC.nrmac[module_idP]; //NR_COMMON_channels_t *cc = nr_mac->common_channels; @@ -607,9 +608,11 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP, LOG_I(MAC, "configure fapi due to data availability \n"); + nr_update_pucch_scheduling(module_idP, UE_id, frameP, slotP, num_slots_per_tdd, &pucch_sched); + TBS_bytes = configure_fapi_dl_pdu(module_idP, dl_req, - pucch_sched, + &UE_list->UE_sched_ctrl[UE_id].sched_pucch[pucch_sched], dlsch_config!=NULL ? dlsch_config->mcsIndex : NULL, dlsch_config!=NULL ? &dlsch_config->rbSize : NULL, dlsch_config!=NULL ? &dlsch_config->rbStart : NULL); @@ -646,9 +649,11 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP, } else if(ta_len > 0){ LOG_I(MAC, "configure fapi due to TA \n"); + + nr_update_pucch_scheduling(module_idP, UE_id, frameP, slotP, num_slots_per_tdd, &pucch_sched); TBS_bytes = configure_fapi_dl_pdu(module_idP, dl_req, - pucch_sched, + &UE_list->UE_sched_ctrl[UE_id].sched_pucch[pucch_sched], dlsch_config!=NULL ? dlsch_config->mcsIndex : NULL, dlsch_config!=NULL ? &dlsch_config->rbSize : NULL, dlsch_config!=NULL ? &dlsch_config->rbStart : NULL); @@ -664,9 +669,10 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP, } //if (IS_SOFTMODEM_NOS1 || get_softmodem_params()->phy_test) else { + nr_update_pucch_scheduling(module_idP, UE_id, frameP, slotP, num_slots_per_tdd, &pucch_sched); TBS_bytes = configure_fapi_dl_pdu(module_idP, dl_req, - pucch_sched, + &UE_list->UE_sched_ctrl[UE_id].sched_pucch[pucch_sched], dlsch_config!=NULL ? dlsch_config->mcsIndex : NULL, dlsch_config!=NULL ? &dlsch_config->rbSize : NULL, dlsch_config!=NULL ? &dlsch_config->rbStart : NULL); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index fa1e860c57..a87f406571 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -497,7 +497,6 @@ int nr_configure_pdcch(gNB_MAC_INST *nr_mac, //precoderGranularity pdcch_pdu->precoderGranularity = coreset->precoderGranularity; - pdcch_pdu->dci_pdu.RNTI[pdcch_pdu->numDlDci]=rnti; if (coreset->pdcch_DMRS_ScramblingID != NULL && diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 4e29adf978..b190866c5d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -145,7 +145,7 @@ void configure_fapi_dl_Tx(module_id_t Mod_idP, void nr_schedule_uss_dlsch_phytest(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, - NR_sched_pucch *pucch_sched, + int num_slots_per_tdd, nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_config); void nr_schedule_uss_ulsch_phytest(int Mod_idP,