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.
master
Andre Puschmann 3 years ago
parent 40499e6b6d
commit e1776f8d28

@ -454,6 +454,8 @@ bool phy::set_config(const srsran::phy_cfg_t& config_, uint32_t cc_idx)
Info("Setting configuration"); Info("Setting configuration");
// Apply configurations asynchronously to avoid race conditions
cmd_worker.add_cmd([this, config_, cc_idx]() {
// The PRACH configuration shall be updated only if: // The PRACH configuration shall be updated only if:
// - The new configuration belongs to the primary cell // - The new configuration belongs to the primary cell
// - The PRACH configuration is present // - The PRACH configuration is present
@ -462,8 +464,6 @@ bool phy::set_config(const srsran::phy_cfg_t& config_, uint32_t cc_idx)
prach_cfg.tdd_config = tdd_config; prach_cfg.tdd_config = tdd_config;
} }
// Apply configurations asynchronously to avoid race conditions
cmd_worker.add_cmd([this, config_, cc_idx]() {
logger_phy.info("Setting new PHY configuration cc_idx=%d...", cc_idx); logger_phy.info("Setting new PHY configuration cc_idx=%d...", cc_idx);
lte_workers.set_config(cc_idx, config_); lte_workers.set_config(cc_idx, config_);

Loading…
Cancel
Save