Change in osmo-bts[master]: rsl: properly initialize MS/BS Power Control state

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Tue Dec 1 17:41:36 UTC 2020


fixeria has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/48/21448/1

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: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201201/073e1ef6/attachment.htm>


More information about the gerrit-log mailing list