diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 9395670759..bc099d2474 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -46,6 +46,9 @@ /*TAG*/ #include "NR_TAG-Id.h" +/*Softmodem params*/ +#include "executables/softmodem-common.h" + //////////////////////////////////////////////////////// /////* DLSCH MAC PDU generation (6.1.2 TS 38.321) *///// //////////////////////////////////////////////////////// @@ -439,6 +442,8 @@ void nr_schedule_ue_spec(module_id_t module_id, lcid, 0, 0); + if (rlc_status.bytes_in_buffer == 0 && !get_softmodem_params()->phy_test) + return; LOG_D(MAC, "%d.%d, DTCH%d->DLSCH, RLC status %d bytes\n", frame, @@ -575,8 +580,8 @@ void nr_schedule_ue_spec(module_id_t module_id, //ue_sched_ctl->uplane_inactivity_timer = 0; } - else { - LOG_I(MAC, "Configuring DL_TX in %d.%d: random data\n", frame, slot); + else if (get_softmodem_params()->phy_test) { + LOG_D(MAC, "Configuring DL_TX in %d.%d: random data\n", frame, slot); // fill dlsch_buffer with random data for (int i = 0; i < TBS; i++) mac_sdus[i] = (unsigned char) (lrand48()&0xff);