From a2392f0f9e07e6220c943b458360f1fddc1528b6 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Thu, 19 Dec 2019 11:27:22 +0900 Subject: osmo-bts-trx/vty: ensure backwards compatibility with older config files osmo-bts-trx used to have its own (low-level) MS Power Control loop, but recently it has been ripped out. Since [1], the process fails to start if the configuration file still contains 'ms-power-control dsp'. Let's be more tolerant: override 'dsp' by 'osmo' and print a warning. [1] I49706926b1e962b18791174627bc3cc0cd0cd9d5 Change-Id: I4facd21bca3d8cb80d21e83ea267bc013e474533 --- src/common/vty.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/common/vty.c') diff --git a/src/common/vty.c b/src/common/vty.c index 8b947a76..b32b39b8 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -792,8 +792,17 @@ DEFUN(cfg_trx_ms_power_control, cfg_trx_ms_power_control_cmd, bool soft = !strcmp(argv[0], "osmo"); if (!soft && !gsm_bts_has_feature(trx->bts, BTS_FEAT_MS_PWR_CTRL_DSP)) { - vty_out(vty, "This BTS model has no DSP/HW MS Power Control support%s", VTY_NEWLINE); - return CMD_WARNING; + /* NOTE: osmo-bts-trx used to have its own (low-level) MS Power Control loop, which + * has been ripped out in favour of the common implementation. Configuration files + * may still contain 'dsp', so let's be tolerant and override 'dsp' by 'osmo'. */ + if (trx->bts->variant == BTS_OSMO_TRX && vty->type == VTY_FILE) { + vty_out(vty, "BTS model 'osmo-bts-trx' has no DSP/HW MS Power Control support, " + "consider updating your configuration file!%s", VTY_NEWLINE); + soft = true; /* override */ + } else { + vty_out(vty, "This BTS model has no DSP/HW MS Power Control support%s", VTY_NEWLINE); + return CMD_WARNING; + } } trx->ms_pwr_ctl_soft = soft; -- cgit v1.2.3