aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-07-01 02:00:14 +0200
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-07-01 02:01:22 +0200
commit30aea88c2cc09b8da4252ba7882c01eff0282790 (patch)
treee5c9c33a2d36249663b2d88b3609013adb310c79
parent0e8d68437af4a99dc99d11d4e1f441246bd3ec00 (diff)
power_control: constrain BS power reduction on BCCH carrier
BS Power Control is not allowed on the BCCH/CCCH carrier, unless the BTS is operating in the BCCH carrier power reduction mode. Allow constrained BS power reduction (up to 6 dB) on active logical channels iff BCCH carrier power reduction mode is enabled. Change-Id: I3299b6cdd230d3767321c3d6c64d468b7f5e1d02 Related: SYS#4919, SYS#4918
-rw-r--r--src/common/rsl.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 5407904b..010b9d3a 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1586,8 +1586,16 @@ static int rsl_rx_chan_activ(struct msgb *msg)
return rsl_tx_chan_act_nack(lchan, RSL_ERR_SERV_OPT_UNIMPL);
}
- lchan->bs_power_ctrl.max = BS_POWER2DB(*TLVP_VAL(&tp, RSL_IE_BS_POWER));
- lchan->bs_power_ctrl.current = lchan->bs_power_ctrl.max;
+ uint8_t red = BS_POWER2DB(*TLVP_VAL(&tp, RSL_IE_BS_POWER));
+
+ /* BS power reduction is generally not allowed on BCCH/CCCH carrier.
+ * However, we allow it in the BCCH carrier power reduction operation.
+ * Constrain BS power value by the maximum reduction for this timeslot. */
+ if (ts->trx->bts->c0 == ts->trx)
+ red = OSMO_MIN(red, ts->c0_power_red_db);
+
+ lchan->bs_power_ctrl.max = red;
+ lchan->bs_power_ctrl.current = red;
LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "BS Power attenuation %u dB\n",
lchan->bs_power_ctrl.current);
@@ -2210,6 +2218,12 @@ static int rsl_rx_bs_pwr_ctrl(struct msgb *msg)
return 0;
}
+ /* BS power reduction is generally not allowed on BCCH/CCCH carrier.
+ * However, we allow it in the BCCH carrier power reduction operation.
+ * Constrain BS power value by the maximum reduction for this timeslot. */
+ if (trx->bts->c0 == trx)
+ new = OSMO_MIN(new, lchan->ts->c0_power_red_db);
+
/* 9.3.32 (TLV) BS Power Parameters IE (vendor specific) */
if ((ie = TLVP_GET(&tp, RSL_IE_BS_POWER_PARAM)) != NULL) {
struct gsm_power_ctrl_params *params = &lchan->bs_dpc_params;