diff options
authorPau Espin Pedrol <pespin@sysmocom.de>2019-10-28 16:59:40 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-10-28 16:59:42 +0100
commit725b3158e26277543c6b2dde13341ec41d6f3e95 (patch)
parent5a60287e4426de955dd004b898f5f1d27f61c5f7 (diff)
power_control.c: Take into account RSL CHAN ACT ms power level limits
This is similar commit to Ifda92155bd9c277ac150a327a7ab63c854087788, which previously fixed same issue for osmo-bts-trx specific power control loop code. TS 48.058 sec 4.8 MS power control: """ TRX then attempts to keep the power control parameters within the limits set by the MS POWER CONTROL message (or by the CHANNEL ACTIVATION message) by changing the MS Power Level field of the L1 header sent to MS in each SACCH block. """ Should fix TTCN3 BTS_Tests.TC_rsl_ms_pwr_dyn_max for non-bts-trx BTS models. Related: OS#1622 Change-Id: I376b52d7bee44132993a69cf532bd418171d0ca2
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/power_control.c b/src/common/power_control.c
index b1728705..f467cd53 100644
--- a/src/common/power_control.c
+++ b/src/common/power_control.c
@@ -79,6 +79,13 @@ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
new_pwr = ms_pwr_ctl_lvl(band, new_dBm);
+ /* Don't ask for smaller ms power level than the one set
+ * by BSC upon RSL CHAN ACT
+ */
+ if (new_pwr < lchan->ms_power)
+ new_pwr = lchan->ms_power;
if (lchan->ms_power_ctrl.current != new_pwr) {
lchan->ms_power_ctrl.current = new_pwr;