Change in libosmocore[master]: rsl: rsl_chan_nr_str_buf(): use ABIS_RSL_CHAN_NR_CBITS_* macros

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
Fri Oct 16 17:27:21 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/20686 )


Change subject: rsl: rsl_chan_nr_str_buf(): use ABIS_RSL_CHAN_NR_CBITS_* macros
......................................................................

rsl: rsl_chan_nr_str_buf(): use ABIS_RSL_CHAN_NR_CBITS_* macros

Change-Id: I3cd745e180787ea5c22f2a13441d599e0220d81f
---
M src/gsm/rsl.c
1 file changed, 10 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/20686/1

diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c
index cdbdf91..c3420b6 100644
--- a/src/gsm/rsl.c
+++ b/src/gsm/rsl.c
@@ -232,25 +232,25 @@
 	int ts = chan_nr & 7;
 	uint8_t cbits = chan_nr >> 3;
 
-	if (cbits == 0x01)
+	if (cbits == ABIS_RSL_CHAN_NR_CBITS_Bm_ACCHs)
 		snprintf(buf, buf_len, "TCH/F on TS%d", ts);
-	else if ((cbits & 0x1e) == 0x02)
+	else if ((cbits & 0x1e) == ABIS_RSL_CHAN_NR_CBITS_Lm_ACCHs(0))
 		snprintf(buf, buf_len, "TCH/H(%u) on TS%d", cbits & 0x01, ts);
-	else if ((cbits & 0x1c) == 0x04)
+	else if ((cbits & 0x1c) == ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(0))
 		snprintf(buf, buf_len, "SDCCH/4(%u) on TS%d", cbits & 0x03, ts);
-	else if ((cbits & 0x18) == 0x08)
+	else if ((cbits & 0x18) == ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(0))
 		snprintf(buf, buf_len, "SDCCH/8(%u) on TS%d", cbits & 0x07, ts);
-	else if (cbits == 0x10)
+	else if (cbits == ABIS_RSL_CHAN_NR_CBITS_BCCH)
 		snprintf(buf, buf_len, "BCCH on TS%d", ts);
-	else if (cbits == 0x11)
+	else if (cbits == ABIS_RSL_CHAN_NR_CBITS_RACH)
 		snprintf(buf, buf_len, "RACH on TS%d", ts);
-	else if (cbits == 0x12)
+	else if (cbits == ABIS_RSL_CHAN_NR_CBITS_PCH_AGCH)
 		snprintf(buf, buf_len, "PCH/AGCH on TS%d", ts);
-	else if (cbits == 0x18)
+	else if (cbits == ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH)
 		snprintf(buf, buf_len, "PDCH on TS%d", ts);
-	else if (cbits == 0x19)
+	else if (cbits == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH4)
 		snprintf(buf, buf_len, "CBCH(SDCCH/4) on TS%d", ts);
-	else if (cbits == 0x1a)
+	else if (cbits == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8)
 		snprintf(buf, buf_len, "CBCH(SDCCH/8) on TS%d", ts);
 	else
 		snprintf(buf, buf_len, "UNKNOWN on TS%d", ts);

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3cd745e180787ea5c22f2a13441d599e0220d81f
Gerrit-Change-Number: 20686
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/20201016/c657fd8c/attachment.htm>


More information about the gerrit-log mailing list