aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-02-07 04:10:03 +0100
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-02-07 04:38:15 +0100
commite1d2691e691c5de26294e4d38198edc41862db7b (patch)
tree3635a0cf9d0b1007136dbd85c09ea55323f7c61d
parentd5a03a59b0eca8ceedd41abcaff8bf0abce49b53 (diff)
power_control: enable Uplink DPC by default if format is known
So far osmo-bsc would enable Uplink DPC (Dynamic Power Control) only for osmo-bts, and the 'static' mode for all other BTS models. This decision dates back to the time when ip.access specific encoding for dynamic power control parameters was not implemented, and the MS Power Parameters IE was sent empty in the RSL messages. Let's make a step forward by enabling Uplink DPC by default for all BTS models which declare the API for vendor-specific encoding of the power control parameters. Currently this includes osmo-bts and nanoBTS, both supporting ip.access specific format. Change-Id: If86d27d4332af3d82f862737340d061e42e34eba Related: SYS#4918
-rw-r--r--doc/manuals/chapters/power_control.adoc6
-rw-r--r--src/osmo-bsc/bts.c7
2 files changed, 8 insertions, 5 deletions
diff --git a/doc/manuals/chapters/power_control.adoc b/doc/manuals/chapters/power_control.adoc
index 5de2b9ca6..dbe2d1381 100644
--- a/doc/manuals/chapters/power_control.adoc
+++ b/doc/manuals/chapters/power_control.adoc
@@ -117,8 +117,10 @@ OsmoBSC(config-net-bts)# no (bs-power-control|ms-power-control) <3>
<2> Send both RSL MS/BS Power IE and vendor-specific MS/BS Power Parameters IE.
<3> Do not send any power control IEs in RSL CHANnel ACTIVation messages.
-By default, `static` mode is used for BS power control, while `dyn-bts` is used
-for MS power control. Changing the mode at run-time would not affect already
+By default, `static` mode is used for BS power control, while `dyn-bts` mode is
+automatically enabled for MS power control if vendor-specific format of the power
+control parameters (see above) is implemented for particular BTS model. Otherwise
+`static` mode is used too. Changing the mode at run-time would not affect already
established connections, only the new ones (check flag `l`).
For BS power control, there is an additional parameter:
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index ac0e2af35..628d301e8 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -522,9 +522,6 @@ int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type)
switch (bts->type) {
case GSM_BTS_TYPE_OSMOBTS:
- /* Enable dynamic Uplink power control by default */
- bts->ms_power_ctrl.mode = GSM_PWR_CTRL_MODE_DYN_BTS;
- /* fall-through */
case GSM_BTS_TYPE_NANOBTS:
/* Set the default OML Stream ID to 0xff */
bts->oml_tei = 0xff;
@@ -543,6 +540,10 @@ int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type)
break;
}
+ /* Enable dynamic Uplink power control by default (if supported) */
+ if (model->power_ctrl_enc_rsl_params != NULL)
+ bts->ms_power_ctrl.mode = GSM_PWR_CTRL_MODE_DYN_BTS;
+
return 0;
}