aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/vty.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-01-05 00:44:40 +0100
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-01-08 02:05:27 +0100
commite8f857453df56a40be61b17aafc509047e141174 (patch)
tree334ceee99829b6af573d3750df195738b55d250d /src/common/vty.c
parent4a0a6fd014e1ce1886fb88e7e37d67ca252b63b2 (diff)
power_control: migrate MS/BS control loops to the new params
In change [1] the new power control structures and default params were introduced. In change [2], the existing VTY commands for MS power control in the BTS were deprecated and changed to use the new structures as storage. Finally, in change [3], handling of the power control parameters on the A-bis/RSL was implemented. This change is the final logical step in the mentioned chain: it makes both MS/BS power control loops use the new parameters, and removes the old structures. The actual implementation of both power control loops remains the same, however the expected output of some unit tests for the Downlink loop needs to be changed: - TC_fixed_mode: disabling dynamic power control becomes a separate step of the test script since the field 'fixed' is removed; - TC_rxlev_target: RxLev thresholds are printed 'as-is'. Not all of the new parameters are used by the power control loops yet. Further improvements to be done in the follow up commits. [1] I6d41eb238aa6d4f5b77596c5477c2ecbe86de2a8 [2] Icbd9a7d31ce6723294130a31a179a002fccb4612 [3] I5a901eca5a78a0335a6954064e602e65cda85390 Change-Id: Ib18f84c40227841d95a36063a6789bf63054fc2e Related: SYS#4918
Diffstat (limited to 'src/common/vty.c')
-rw-r--r--src/common/vty.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/common/vty.c b/src/common/vty.c
index 1c3b4967..689ae58c 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -1489,13 +1489,12 @@ static void lchan_bs_power_ctrl_state_dump(struct vty *vty, unsigned int indent,
const struct lchan_power_ctrl_state *st = &lchan->bs_power_ctrl;
const struct gsm_bts_trx *trx = lchan->ts->trx;
- cfg_out(vty, "BS (Downlink) Power Control (%s):%s",
- st->fixed ? "fixed" : "autonomous",
- VTY_NEWLINE);
+ cfg_out(vty, "BS (Downlink) Power Control (%s mode):%s",
+ st->dpc_params ? "dynamic" : "static", VTY_NEWLINE);
indent += 2;
cfg_out(vty, "Channel reduction: %u dB", st->current);
- if (!st->fixed)
+ if (st->dpc_params != NULL)
vty_out(vty, " (max %u dB)", st->max);
vty_out(vty, "%s", VTY_NEWLINE);
@@ -1520,8 +1519,7 @@ static void lchan_ms_power_ctrl_state_dump(struct vty *vty, unsigned int indent,
const struct gsm_bts_trx *trx = lchan->ts->trx;
cfg_out(vty, "MS (Uplink) Power Control (%s):%s",
- st->fixed ? "fixed" : "autonomous",
- VTY_NEWLINE);
+ st->dpc_params ? "dynamic" : "static", VTY_NEWLINE);
indent += 2;
int current_dbm = ms_pwr_dbm(trx->bts->band, st->current);
@@ -1529,7 +1527,7 @@ static void lchan_ms_power_ctrl_state_dump(struct vty *vty, unsigned int indent,
cfg_out(vty, "Current power level: %u, -%d dBm",
st->current, current_dbm);
- if (!st->fixed)
+ if (st->dpc_params != NULL)
vty_out(vty, " (max %u, -%d dBm)", st->max, max_dbm);
vty_out(vty, "%s", VTY_NEWLINE);