From df26770d41cc8eed01401ab03f4769e3cc3f0c3e Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 15 Jun 2020 18:51:01 +0700 Subject: 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 --- src/common/vty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/common/vty.c') 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", -- cgit v1.2.3