From 75162427ad26b9834433757b790a29f4995b9b60 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 1 Dec 2020 18:29:28 +0100 Subject: rsl: properly initialize MS/BS Power Control state struct lchan_power_ctrl_state actually contains more fields, which also must be initialized on CHANnel ACTIVation. Change-Id: Id9719088fc6e9479c13e9b327a3466d9e2810a3a Related: SYS#4918 --- src/common/rsl.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/common/rsl.c b/src/common/rsl.c index 2ebfb323..30fa2591 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1154,14 +1154,18 @@ static int rsl_rx_chan_activ(struct msgb *msg) gsm_lchans_name(lchan->state)); /* Initialize MS Power Control defaults */ - lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); - lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; - lchan->ms_power_ctrl.fixed = true; + lchan->ms_power_ctrl = (struct lchan_power_ctrl_state) { + .max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0), + .current = lchan->ms_power_ctrl.max, + .fixed = true, + }; /* Initialize BS Power Control defaults */ - lchan->bs_power_ctrl.max = 2 * 15; - lchan->bs_power_ctrl.current = 0; - lchan->bs_power_ctrl.fixed = true; + lchan->bs_power_ctrl = (struct lchan_power_ctrl_state) { + .max = 2 * 15, /* maximum defined in 9.3.4 */ + .current = 0, + .fixed = true, + }; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); -- cgit v1.2.3