fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/21448 )

Change subject: rsl: properly initialize MS/BS Power Control state
......................................................................

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
---
M src/common/rsl.c
1 file changed, 10 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/common/rsl.c b/src/common/rsl.c
index 2ebfb32..30fa259 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1154,14 +1154,18 @@
                  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));


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/21448
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id9719088fc6e9479c13e9b327a3466d9e2810a3a
Gerrit-Change-Number: 21448
Gerrit-PatchSet: 7
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged

Reply via email to