mirror of https://github.com/PentHertz/srsLTE.git
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.
This commit is contained in:
parent
40499e6b6d
commit
e1776f8d28
|
@ -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_);
|
||||
|
||||
|
|
Loading…
Reference in New Issue