aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-12-02 11:56:57 +0100
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-12-04 09:27:48 +0100
commit567ea2a07913db725e2c47c6a6a000907672ff80 (patch)
treed7d4f325764984a9cd6e09efd06ce6d26ec3652d /src
parent2b59a625e843a94ff0d612f58896db3aea2264d7 (diff)
power_control: remove a logging statement and early return
This change would allow to separate the common logic from lchan_ms_pwr_ctrl() and re-use it for Downlink power control. The logging statement was quite useful during early stages of development and testing of hysteresis and filtering, but now we can sacrifice it. Change-Id: I3c07cb6e14acd5a988761bbc51a9c3b60fb22d87 Related: SYS#4918
Diffstat (limited to 'src')
-rw-r--r--src/common/power_control.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/common/power_control.c b/src/common/power_control.c
index 21f7ce5b..e08966f1 100644
--- a/src/common/power_control.c
+++ b/src/common/power_control.c
@@ -148,16 +148,8 @@ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
/* Tolerate small deviations from 'rx-target' */
- if (abs(diff) <= params->hysteresis) {
- LOGPLCHAN(lchan, DLOOP, LOGL_INFO,
- "Keeping MS power at control level %d (%d dBm) because diff %d dBm "
- "from 'rx-target' %d dBm is not significant (hysteresis %d dBm)\n",
- ms_power_lvl, ms_dbm, diff, params->target, params->hysteresis);
- /* Keep the current power level in sync (just to be sure) */
- state->current = ms_power_lvl;
- bts_model_adjst_ms_pwr(lchan);
- return 0;
- }
+ if (abs(diff) <= params->hysteresis)
+ diff = 0;
/* don't ever change more than MS_{LOWER,RAISE}_MAX_DBM during one loop
iteration, i.e. reduce the speed at which the MS transmit power can