Change in osmo-bsc[master]: add FIXME comments around bs_power

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/.

neels gerrit-no-reply at lists.osmocom.org
Wed May 26 19:54:55 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24421 )


Change subject: add FIXME comments around bs_power
......................................................................

add FIXME comments around bs_power

Change-Id: I229db1d6bcf532af95aff56b2ad18b5ed9d81616
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/abis_rsl.c
2 files changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/24421/1

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 5a202bf..91cb0e0 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -665,6 +665,8 @@
 	enum gsm48_chan_mode tch_mode;
 	enum lchan_csd_mode csd_mode;
 	/* Power levels for MS and BTS */
+	/* FIXME: these are stored as dB/2 as encoded on the wire. For logging and VTY output as well as dB
+	 * calculations, these values should probably be stored as plain dB values here. */
 	uint8_t bs_power;
 	uint8_t ms_power;
 	/* Encryption information */
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index eb30345..a01a78a 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -307,9 +307,14 @@
 
 	msg = rsl_msgb_alloc();
 
+	/* FIXME: this function is weird in that it takes the db arg as an input to write to a msgb, but it also
+	 * modifies lchan->bs_power. Probably the caller should first set lchan->bs_power and then this function should
+	 * merely write lchan->bs_power to the msgb.
+	 */
 	lchan->bs_power = db/2;
 	if (fpc)
 		lchan->bs_power |= 0x10;
+		/* FIXME: This is insane! the Fast Power Control bit should never be written to lchan->bs_power! */
 
 	dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh));
 	init_dchan_hdr(dh, RSL_MT_BS_POWER_CONTROL);

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I229db1d6bcf532af95aff56b2ad18b5ed9d81616
Gerrit-Change-Number: 24421
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210526/79412366/attachment.htm>


More information about the gerrit-log mailing list