aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/vty.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-15 18:51:01 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-15 22:51:20 +0700
commitdf26770d41cc8eed01401ab03f4769e3cc3f0c3e (patch)
treef956eba9c4899a8a2baa2e0d0b31ed81fdd34a27 /src/common/vty.c
parent906a9b5e71aa5d3d814d57fbcc7190faa06ab200 (diff)
A-bis/RSL: refactor handling of BS Power IE (power reduction)
According to 3GPP TS 08.58, section 9.3.4, BS Power IE indicates the transmission power attenuation on a particular channel: +--------------+---------+-----------------+ | Reserved (3) | FPC (1) | Power level (4) | +--------------+---------+-----------------+ so let's change handling of this IE as follows: - s/bs_power/bs_power_red/g, so it reflects 'reduction'; - store power attenuation value in dB, not in 2 db steps; - get rid of ms_power_ctrl.bts_tx_pwr, it's always 0 anyway; - fix rsl_tx_meas_res(): use lchan->bs_power_red; - always check if FPC (Fast Power Control) flag is set; - we don't support it, so reject messages containing it; - fix rsl_rx_chan_activ(): properly apply the bitmask. Change-Id: I16cc50dfca102030380a06e16c234d5f6698f38f
Diffstat (limited to 'src/common/vty.c')
-rw-r--r--src/common/vty.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/vty.c b/src/common/vty.c
index 3dfd3878..6a1fd9c6 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -1182,8 +1182,7 @@ static void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan)
lchan->state == LCHAN_S_BROKEN ? lchan->broken_reason : "",
VTY_NEWLINE);
vty_out(vty, " BS Power: %d dBm, MS Power: %u dBm%s",
- lchan->ts->trx->nominal_power - lchan->ts->trx->max_power_red
- - lchan->bs_power*2,
+ lchan->ts->trx->nominal_power - (lchan->ts->trx->max_power_red + lchan->bs_power_red),
ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power_ctrl.max),
VTY_NEWLINE);
vty_out(vty, " Channel Mode / Codec: %s%s",