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
This commit is contained in:
parent
e1766f1b7d
commit
a2392f0f9e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue