aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/loops.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-11-14 16:27:25 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-11-14 20:02:45 +0100
commitc693067b7e99a643da673cb3e2a36162cbd0f59c (patch)
tree8b4d003f5b9d69e38d80d5098299d9b9b7a40716 /src/osmo-bts-trx/loops.c
parentd0a2caa021b66d1f5272004c42c817c068be5dc9 (diff)
Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP
It indicates whether BTS model supports managing an MS Power Control Loop over HW/DSP instead of using the software based osmocom algorithm present in osmo-bts. osmo-bts-trx own loop implementation is considered to be a "DSP/HW" one since it acts on lower layers and interferes with osmocom algorithm since it controls the same end variable "lchan->ms_power_ctrl.current", this way we make sure both aren't enabled at the same time. Old behavior in kept: if common upper-layer algo is not enabled explicitly in VTY (ms-power-control osmo) and bts-trx specific lower layer algo is neither enabled (osmotrx ms-power-loop <xyz>), then no power control is done at all. Related: OS#1851 Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5
Diffstat (limited to 'src/osmo-bts-trx/loops.c')
-rw-r--r--src/osmo-bts-trx/loops.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c
index 1f54feec..e73d842c 100644
--- a/src/osmo-bts-trx/loops.c
+++ b/src/osmo-bts-trx/loops.c
@@ -237,8 +237,9 @@ void trx_loop_sacch_input(struct l1sched_trx *l1t, uint8_t chan_nr,
.lchan[l1sap_chan2ss(chan_nr)];
struct phy_instance *pinst = trx_phy_instance(l1t->trx);
- /* if MS power control loop is enabled, handle it */
- if (pinst->phy_link->u.osmotrx.trx_ms_power_loop)
+ /* if common upper layer MS power control loop is disabled
+ and lower layer MS power control loop is enabled, handle it */
+ if (!l1t->trx->ms_pwr_ctl_soft && pinst->phy_link->u.osmotrx.trx_ms_power_loop)
ms_power_val(lchan, chan_state, rssi);
/* if TA loop is enabled, handle it */
@@ -257,7 +258,9 @@ void trx_loop_sacch_clock(struct l1sched_trx *l1t, uint8_t chan_nr,
if (lchan->ms_power_ctrl.fixed)
return;
- if (pinst->phy_link->u.osmotrx.trx_ms_power_loop)
+ /* if common upper layer MS power control loop is disabled
+ and lower layer MS power control loop is enabled, handle it */
+ if (!l1t->trx->ms_pwr_ctl_soft && pinst->phy_link->u.osmotrx.trx_ms_power_loop)
ms_power_clock(lchan, chan_state);
/* count the number of SACCH clocks */