aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-12-19 11:27:22 +0900
committerlaforge <laforge@osmocom.org>2019-12-31 17:03:38 +0000
commita2392f0f9e07e6220c943b458360f1fddc1528b6 (patch)
tree9a1a28be8a41cc5996c8c48f0d1f4d8246711c23
parente1766f1b7dbf90785eda3e75e6d9b6109a58fa3e (diff)
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
-rw-r--r--src/common/vty.c13
1 files changed, 11 insertions, 2 deletions
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;