diff --git a/srsenb/src/phy/lte/sf_worker.cc b/srsenb/src/phy/lte/sf_worker.cc index 19a4a0981..6ab897427 100644 --- a/srsenb/src/phy/lte/sf_worker.cc +++ b/srsenb/src/phy/lte/sf_worker.cc @@ -209,10 +209,6 @@ void sf_worker::work_imp() } } - // Make sure CFI is in the right range - dl_grants[0].cfi = SRSRAN_MAX(dl_grants[0].cfi, 1); - dl_grants[0].cfi = SRSRAN_MIN(dl_grants[0].cfi, 3); - // Get UL scheduling for the TX TTI from MAC if (stack->get_ul_sched(tti_tx_ul, ul_grants_tx) < 0) { Error("Getting UL scheduling from MAC"); @@ -230,7 +226,11 @@ void sf_worker::work_imp() // Process DL for (uint32_t cc = 0; cc < cc_workers.size(); cc++) { + // Select CFI and make sure it is in the right range dl_sf.cfi = dl_grants[cc].cfi; + dl_sf.cfi = SRSRAN_MAX(dl_sf.cfi, 1); + dl_sf.cfi = SRSRAN_MIN(dl_sf.cfi, 3); + cc_workers[cc]->work_dl(dl_sf, dl_grants[cc], ul_grants_tx[cc], &mbsfn_cfg); } diff --git a/srsenb/test/phy/enb_phy_test.cc b/srsenb/test/phy/enb_phy_test.cc index 53d35bab6..0ee4c226f 100644 --- a/srsenb/test/phy/enb_phy_test.cc +++ b/srsenb/test/phy/enb_phy_test.cc @@ -504,17 +504,16 @@ public: // Notify test engine notify_get_dl_sched(); - /// Make sure it writes the first cell always - dl_sched_res[0].cfi = cfi; + // Make sure it writes the CFI in all cells + for (dl_sched_t& dl_sched : dl_sched_res) { + dl_sched.cfi = cfi; + } // Iterate for each carrier uint32_t ue_cc_idx = 0; for (uint32_t& cc_idx : active_cell_list) { auto& dl_sched = dl_sched_res[cc_idx]; - // Required - dl_sched.cfi = cfi; - // Default TB scheduling bool sched_tb[SRSRAN_MAX_TB] = {};