From e1776f8d28938b801570faf702bb49ed39792cea Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 30 Aug 2021 15:00:51 +0200 Subject: [PATCH] ue,phy: update the PRACH params inside the lambda that also executes the reconfig setting the new PRACH params (writing the the local var) needs to protected as well because it is called from the RRC context and the PHY worker will call configure_prach_params() if it sees changes to it. --- srsue/src/phy/phy.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/srsue/src/phy/phy.cc b/srsue/src/phy/phy.cc index da093bd7c..288df38f2 100644 --- a/srsue/src/phy/phy.cc +++ b/srsue/src/phy/phy.cc @@ -454,16 +454,16 @@ bool phy::set_config(const srsran::phy_cfg_t& config_, uint32_t cc_idx) Info("Setting configuration"); - // The PRACH configuration shall be updated only if: - // - The new configuration belongs to the primary cell - // - The PRACH configuration is present - if (!cc_idx && config_.prach_cfg_present) { - prach_cfg = config_.prach_cfg; - prach_cfg.tdd_config = tdd_config; - } - // Apply configurations asynchronously to avoid race conditions cmd_worker.add_cmd([this, config_, cc_idx]() { + // The PRACH configuration shall be updated only if: + // - The new configuration belongs to the primary cell + // - The PRACH configuration is present + if (!cc_idx && config_.prach_cfg_present) { + prach_cfg = config_.prach_cfg; + prach_cfg.tdd_config = tdd_config; + } + logger_phy.info("Setting new PHY configuration cc_idx=%d...", cc_idx); lte_workers.set_config(cc_idx, config_);