diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-11-14 15:01:54 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-11-14 16:36:00 +0100 |
commit | f0e66d90f83181a818f8f1c7535ccf6e76952523 (patch) | |
tree | 7f4c388a364aff8668cc17b8891951ccd01fa251 /src | |
parent | e717aec2f733ef32608734a771b80d453654f9a0 (diff) |
bts-trx: loops.c: Avoid always clamping MS power to MS power class 1
The affirmation written there is not true, since actually it depends on
the band. For instance, for DCS1800 the maximum MS power is provided by
class 3. Let ms_pwr_ctl_lvl() take care of campling instead.
Change-Id: I744e7c315b818a1e7d3dd2579cd483c693d89b73
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bts-trx/loops.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index 4b723a01..1f54feec 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -49,7 +49,7 @@ static void ms_power_diff(struct gsm_lchan *lchan, int8_t diff) struct gsm_bts_trx *trx = lchan->ts->trx; enum gsm_band band = trx->bts->band; int8_t new_power; /* TS 05.05 power level */ - int8_t new_dbm, current_dbm, bsc_max_dbm, pwclass_max_dbm; + int8_t new_dbm, current_dbm, bsc_max_dbm; /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */ if (diff < 2 && diff > -2) @@ -89,15 +89,6 @@ static void ms_power_diff(struct gsm_lchan *lchan, int8_t diff) if (new_dbm > bsc_max_dbm) new_dbm = bsc_max_dbm; - /* Make sure in no case the dBm value is higher than the one of ms - power class 1 (the one with more output power) for the given band. - Ideally we should catch the MS specific power class and apply it - here, but for now let's assume the BSC sent us one taking the power - class into account. */ - pwclass_max_dbm = (int)ms_class_gmsk_dbm(band, 1); - if (pwclass_max_dbm >= 0 && new_dbm > pwclass_max_dbm) - new_dbm = pwclass_max_dbm; - new_power = ms_pwr_ctl_lvl(band, new_dbm); if (new_power < 0) { LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, |