diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/bts.c | 4 | ||||
-rw-r--r-- | src/common/gsm_data_shared.c | 1 | ||||
-rw-r--r-- | src/common/vty.c | 8 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/common/bts.c b/src/common/bts.c index 3809eb3e..da411761 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -256,6 +256,10 @@ int bts_trx_init(struct gsm_bts_trx *trx) tpp->ramp.step_size_mdB = to_mdB(2); tpp->ramp.step_interval_sec = 1; + /* IF BTS model doesn't DSP/HW support MS Power Control Loop, enable osmo algo by default: */ + if (!gsm_bts_has_feature(trx->bts, BTS_FEAT_MS_PWR_CTRL_DSP)) + trx->ms_pwr_ctl_soft = true; + rc = bts_model_trx_init(trx); if (rc < 0) { llist_del(&trx->list); diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c index 80acabcb..b31d458b 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -108,6 +108,7 @@ const struct value_string gsm_bts_features_descs[] = { { BTS_FEAT_SPEECH_F_AMR, "Fullrate speech AMR" }, { BTS_FEAT_SPEECH_H_AMR, "Halfrate speech AMR" }, { BTS_FEAT_ETWS_PN, "ETWS Primary Notification on PCH" }, + { BTS_FEAT_MS_PWR_CTRL_DSP, "DSP/HW based MS Power Control Loop" }, { 0, NULL } }; diff --git a/src/common/vty.c b/src/common/vty.c index 514d1202..2558ba85 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -789,8 +789,14 @@ DEFUN(cfg_trx_ms_power_control, cfg_trx_ms_power_control_cmd, "Handled by DSP\n" "Handled by OsmoBTS\n") { struct gsm_bts_trx *trx = vty->index; + bool soft = !strcmp(argv[0], "osmo"); - trx->ms_pwr_ctl_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; + } + + trx->ms_pwr_ctl_soft = soft; return CMD_SUCCESS; } |