diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 85c5645615865a4b725ae086e5ea2f53c2d9db1d..93c9e32842be46d33936d09739bf0c1b04616c34 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -58,6 +58,7 @@ //#define SIZE_OF_POINTER sizeof (void *) int nr_generate_dlsch_pdu(module_id_t module_idP, + NR_UE_sched_ctrl_t *ue_sched_ctl, unsigned char *sdus_payload, unsigned char *mac_pdu, unsigned char num_sdus, @@ -74,12 +75,6 @@ int nr_generate_dlsch_pdu(module_id_t module_idP, // MAC CEs uint8_t mac_header_control_elements[16], *ce_ptr; ce_ptr = &mac_header_control_elements[0]; - uint16_t UE_id = 0; //TODO need to get as a function parameter or need to invoke api to UE_id using module Id and RNTI - gNB_MAC_INST *gNB_mac = RC.nrmac[module_idP]; - NR_UE_info_t *UE_info = &gNB_mac->UE_info; - NR_UE_sched_ctrl_t *ue_sched_ctl = NULL; - //NR_CellGroupConfig_t *config = UE_info->secondaryCellGroup[UE_id]; - ue_sched_ctl = &(UE_info->UE_sched_ctrl[UE_id]); // 1) Compute MAC CE and related subheaders @@ -768,6 +763,7 @@ void nr_schedule_ue_spec(module_id_t module_id, const int offset = nr_generate_dlsch_pdu( module_id, + sched_ctrl, (unsigned char *)mac_sdus, (unsigned char *)buf, num_sdus, // num_sdus diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 9f69edcdfa308c26af649c77fef98f6ac3e419cf..450ffa2268f4b156be9d7301ac53b770ee978b98 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -742,6 +742,7 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP, } offset = nr_generate_dlsch_pdu(module_idP, + &UE_info->UE_sched_ctrl[UE_id], (unsigned char *) mac_sdus, (unsigned char *) gNB_mac->UE_info.DLSCH_pdu[0][0].payload[0], num_sdus, //num_sdus diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 420a37bd524eca8ea39d2abe636dbf406ac029ed..f636a27300d583188aedf52c031ae29b65594a28 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -67,6 +67,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame_rxP, sub_frame_t slot_rxP); int nr_generate_dlsch_pdu(module_id_t Mod_idP, + NR_UE_sched_ctrl_t *ue_sched_ctl, unsigned char *sdus_payload, unsigned char *mac_pdu, unsigned char num_sdus,