aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-11-13 12:51:17 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-11-14 16:36:00 +0100
commite5e122630102f5197357b6afef3de0e73d372f4c (patch)
tree16fa2271afcd0ac8c1b6bf2a0e6ef4fc1672bb9e /src/common
parentd8d459c7e2d5fded700d5bb708a45187eb6d094f (diff)
Change gsm_bts_trx field to bool and rename it
Thies field is used to store and retrieve whether MS power needs to be calculated and updated by osmo-bts software or autonomously by lower layers. Previous name was not clear and may have been understood as indicating whether MS Power Control loop is done or not in general, and the responsible for that is located under lchan's ms_power_ctrl.fixed. Related: OS#1851 Change-Id: Ic690ab69866a7377f1597e24aa7b0214831c1cbe
Diffstat (limited to 'src/common')
-rw-r--r--src/common/bts.c4
-rw-r--r--src/common/vty.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/bts.c b/src/common/bts.c
index 60e27cc8..3809eb3e 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -778,9 +778,9 @@ int bts_supports_cipher(struct gsm_bts *bts, int rsl_cipher)
return sup > 0;
}
-int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx)
+bool trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx)
{
- return trx->ms_power_control == 1;
+ return trx->ms_pwr_ctl_soft;
}
struct gsm_time *get_time(struct gsm_bts *bts)
diff --git a/src/common/vty.c b/src/common/vty.c
index e775d999..fd9be40c 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -332,7 +332,7 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " power-ramp step-interval %d%s",
tpp->ramp.step_interval_sec, VTY_NEWLINE);
vty_out(vty, " ms-power-control %s%s",
- trx->ms_power_control == 0 ? "dsp" : "osmo",
+ trx->ms_pwr_ctl_soft ? "osmo" : "dsp",
VTY_NEWLINE);
vty_out(vty, " phy %u instance %u%s", pinst->phy_link->num,
pinst->num, VTY_NEWLINE);
@@ -790,7 +790,7 @@ DEFUN(cfg_trx_ms_power_control, cfg_trx_ms_power_control_cmd,
{
struct gsm_bts_trx *trx = vty->index;
- trx->ms_power_control = argv[0][0] == 'd' ? 0 : 1;
+ trx->ms_pwr_ctl_soft = !strcmp(argv[0], "osmo");
return CMD_SUCCESS;
}