Change in libosmocore[master]: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon May 27 15:04:00 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14199


Change subject: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH
......................................................................

rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH

We don't really *need* it in libosmocore as such, but the lack of
having all osmocom extensions listed here lead to using overlapping
definitions: 0x18 was used for dynamic PDCH on the Abis side, but also
for CBCH on the L1SAP side.  Let's list them all here to increase
visibility in case anyone wants to extend this further...

Related: OS#4027
Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12
---
M include/osmocom/gsm/protocol/gsm_08_58.h
M src/gsm/rsl.c
2 files changed, 15 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/99/14199/1

diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h
index 3ea4e63..d36920d 100644
--- a/include/osmocom/gsm/protocol/gsm_08_58.h
+++ b/include/osmocom/gsm/protocol/gsm_08_58.h
@@ -50,6 +50,8 @@
 #define ABIS_RSL_CHAN_NR_CBITS_RACH		0x11
 #define ABIS_RSL_CHAN_NR_CBITS_PCH_AGCH	0x12
 #define ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH	0x18 /*< non-standard, for dyn TS */
+#define ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH4	0x19 /*< non-standard, for CBCH/SDCCH4 */
+#define ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8	0x1a /*< non-standard, for CBCH/SDCCH8 */
 
 /* Link Identifier 9.3.2 */
 union abis_rsl_link_id {
@@ -424,6 +426,8 @@
 #define RSL_CHAN_RACH		0x88
 #define RSL_CHAN_PCH_AGCH	0x90
 #define RSL_CHAN_OSMO_PDCH	0xc0	/*< non-standard, for dyn TS */
+#define RSL_CHAN_OSMO_CBCH4	0xc1	/*< non-standard, for CBCH/SDCCH4 */
+#define RSL_CHAN_OSMO_CBCH8	0xc2	/*< non-standard, for CBCH/SDCCH8 */
 
 /* Chapter 9.3.3 */
 #define RSL_ACT_TYPE_INITIAL	0x00
diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c
index 1777479..ea58bfd 100644
--- a/src/gsm/rsl.c
+++ b/src/gsm/rsl.c
@@ -209,6 +209,13 @@
 	} else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_PDCH) {
 		*type = RSL_CHAN_OSMO_PDCH;
 		*subch = 0;
+	} else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH4) {
+		*type = RSL_CHAN_OSMO_CBCH4;
+		*subch = 0;
+	} else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH8) {
+		*type = RSL_CHAN_OSMO_CBCH8;
+		*subch = 0;
+	} else
 	} else
 		return -EINVAL;
 
@@ -242,6 +249,10 @@
 		snprintf(buf, buf_len, "PCH/AGCH on TS%d", ts);
 	else if (cbits == 0x18)
 		snprintf(buf, buf_len, "PDCH on TS%d", ts);
+	else if (cbits == 0x19)
+		snprintf(buf, buf_len, "CBCH(SDCCH/4) on TS%d", ts);
+	else if (cbits == 0x1a)
+		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/14199
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12
Gerrit-Change-Number: 14199
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190527/3ee1750c/attachment.html>


More information about the gerrit-log mailing list