diff --git a/srsue/src/phy/phy_common.cc b/srsue/src/phy/phy_common.cc index db5b6eba7..a20f17420 100644 --- a/srsue/src/phy/phy_common.cc +++ b/srsue/src/phy/phy_common.cc @@ -574,11 +574,6 @@ void phy_common::worker_end(const worker_context_t& w_ctx, const bool& tx_enable // Actual baseband transmission radio_h->tx(tx_buffer, tx_time); - // Reset tx buffer - tx_enabled = false; - for (uint32_t ch = 0; ch < SRSRAN_MAX_CHANNELS; ch++) { - tx_buffer.set(ch, nullptr); - } } else { if (radio_h->is_continuous_tx()) { if (is_pending_tx_end) { @@ -600,9 +595,15 @@ void phy_common::worker_end(const worker_context_t& w_ctx, const bool& tx_enable } } - // Notify that last SF worker finished + // Notify that last SF worker finished. Releases all the threads waiting. last_worker(); + // Reset tx buffer to prevent next SF uses previous data + tx_enabled = false; + for (uint32_t ch = 0; ch < SRSRAN_MAX_CHANNELS; ch++) { + tx_buffer.set(ch, nullptr); + } + // Allow next TTI to transmit semaphore.release(); } diff --git a/srsue/src/phy/sync.cc b/srsue/src/phy/sync.cc index 0367287f2..22b1c3ced 100644 --- a/srsue/src/phy/sync.cc +++ b/srsue/src/phy/sync.cc @@ -522,17 +522,6 @@ void sync::run_camping_in_sync_state(lte::sf_worker* lte_worker, // Compute TX time: Any transmission happens in TTI+4 thus advance 4 ms the reception time last_rx_time.add(FDD_HARQ_DELAY_DL_MS * 1e-3); - // Set LTE worker context - if (lte_worker != nullptr) { - srsran::phy_common_interface::worker_context_t context; - context.sf_idx = tti; - context.worker_ptr = lte_worker; - context.last = true; - context.tx_time.copy(last_rx_time); - - lte_worker->set_context(context); - } - // Advance/reset prach subframe pointer if (prach_ptr) { prach_sf_cnt++;