diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 126a24d2dd..d741970ac9 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -351,7 +351,6 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) }; send_nsa_standalone_msg(&UL_INFO, crc_ind->header.message_id); free(crc_ind->crc_list); - } } return NULL; diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h index d1e9c9df2d..bd4a52e55a 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h @@ -1761,10 +1761,4 @@ typedef struct } nfapi_nr_rach_indication_t; -typedef union { - nfapi_nr_rach_indication_t rach_ind; - nfapi_nr_rx_data_indication_t rx_ind; - nfapi_nr_crc_indication_t crc_ind; -} nr_queue_candidate; - #endif diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 6f27626ebf..b9b9f3b435 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1030,7 +1030,14 @@ void nr_schedule_ulsch(module_id_t module_id, harq_id, cur_harq->round, cur_harq->ndi); - + gNB_MAC_INST *gNB = RC.nrmac[0]; + if (sched_pusch->frame == gNB->handled_frame && sched_pusch->slot == gNB->handled_slot) { + LOG_D(NR_MAC, "Dropping becasue frame %d == gNB frame %d, slot %d == gNb slot %d\n", + frame, gNB->handled_frame, slot, gNB->handled_slot); + return; + } + gNB->handled_frame = sched_pusch->frame; + gNB->handled_slot = sched_pusch->slot; /* PUSCH in a later slot, but corresponding DCI now! */ nfapi_nr_ul_tti_request_t *future_ul_tti_req = &RC.nrmac[module_id]->UL_tti_req_ahead[0][sched_pusch->slot]; AssertFatal(future_ul_tti_req->SFN == sched_pusch->frame diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index 8dc1303801..02039218f9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -81,6 +81,8 @@ void mac_top_init_gNB(void) RC.nrmac[i]->ul_handle = 0; + RC.nrmac[i]->handled_frame = 1025; + if (get_softmodem_params()->phy_test) { RC.nrmac[i]->pre_processor_dl = nr_preprocessor_phytest; RC.nrmac[i]->pre_processor_ul = nr_ul_preprocessor_phytest; diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 63587d58a4..be2803a56e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -603,6 +603,9 @@ typedef struct gNB_MAC_INST_s { NR_CellGroupConfig_t *secondaryCellGroupCommon; NR_Type0_PDCCH_CSS_config_t type0_PDCCH_CSS_config; + frame_t handled_frame; + sub_frame_t handled_slot; + } gNB_MAC_INST; #endif /*__LAYER2_NR_MAC_GNB_H__ */