Change in osmocom-bb[master]: firmware/layer1: add scheduler tasks for CBCH

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Oct 3 08:37:12 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11181 )

Change subject: firmware/layer1: add scheduler tasks for CBCH
......................................................................

firmware/layer1: add scheduler tasks for CBCH

According to GSM TS 05.02, section 3.3.5, Cell Broadcast Channel
(CBCH) is a downlink only channel, which is used to carry the
short message service cell broadcast (SMSCB). CBCH is optional,
and uses the same physical channel as SDCCH. More precisely,
CBCH replaces sub-slot number 2 of SDCCH channels when enabled.

This change introduces the following CBCH related tasks:

  - MF_TASK_SDCCH4_CBCH (CBCH on C0/TS0 SDCCH/4),
  - MF_TASK_SDCCH8_CBCH (CBCH on SDCCH/8),

which are identified using the following Osmocom specific cbits:

  - MF_TASK_SDCCH4_CBCH - 0x18 (0b11000),
  - MF_TASK_SDCCH8_CBCH - 0x19 (0b11001).

The only way to enable these tasks at the moment is to send
L1CTL_DM_EST_REQ message with required cbits and tn.

Change-Id: I1d7f02cba1cd8f6527360589d2d2747b6426f78b
---
M src/target/firmware/include/layer1/mframe_sched.h
M src/target/firmware/include/layer1/sync.h
M src/target/firmware/layer1/l23_api.c
M src/target/firmware/layer1/mframe_sched.c
4 files changed, 36 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/target/firmware/include/layer1/mframe_sched.h b/src/target/firmware/include/layer1/mframe_sched.h
index ecdb1ec..74e2d27 100644
--- a/src/target/firmware/include/layer1/mframe_sched.h
+++ b/src/target/firmware/include/layer1/mframe_sched.h
@@ -23,6 +23,9 @@
 	MF_TASK_SDCCH8_6,
 	MF_TASK_SDCCH8_7,
 
+	MF_TASK_SDCCH4_CBCH,
+	MF_TASK_SDCCH8_CBCH,
+
 	MF_TASK_TCH_F_EVEN,
 	MF_TASK_TCH_F_ODD,
 	MF_TASK_TCH_H_0,
diff --git a/src/target/firmware/include/layer1/sync.h b/src/target/firmware/include/layer1/sync.h
index dae85a1..3565ee2 100644
--- a/src/target/firmware/include/layer1/sync.h
+++ b/src/target/firmware/include/layer1/sync.h
@@ -119,7 +119,9 @@
 		enum {
 			GSM_DCHAN_NONE = 0,
 			GSM_DCHAN_SDCCH_4,
+			GSM_DCHAN_SDCCH_4_CBCH,
 			GSM_DCHAN_SDCCH_8,
+			GSM_DCHAN_SDCCH_8_CBCH,
 			GSM_DCHAN_TCH_H,
 			GSM_DCHAN_TCH_F,
 			GSM_DCHAN_UNKNOWN,
diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c
index e46ca09..404a2f9 100644
--- a/src/target/firmware/layer1/l23_api.c
+++ b/src/target/firmware/layer1/l23_api.c
@@ -97,6 +97,11 @@
 		lch_idx = cbits & 0x7;
 		master_task = MF_TASK_SDCCH8_0 + lch_idx;
 		multiframe = MF51;
+	} else if ((cbits & 0x1e) == 0x18) {
+		/* Osmocom specific extension for CBCH */
+		master_task = (cbits & 0x01) ? /* 0b1100T */
+			MF_TASK_SDCCH4_CBCH : MF_TASK_SDCCH8_CBCH;
+		multiframe = MF51;
 #if 0
 	} else if (cbits == 0x10) {
 		/* FIXME: when to do extended BCCH? */
@@ -136,7 +141,12 @@
 		return GSM_DCHAN_SDCCH_4;
 	} else if ((cbits & 0x18) == 0x08) {
 		return GSM_DCHAN_SDCCH_8;
+	} else if ((cbits & 0x1e) == 0x18) {
+		/* Osmocom-specific extension for CBCH */
+		return (cbits & 0x01) ? /* 0b1100T */
+			GSM_DCHAN_SDCCH_8_CBCH : GSM_DCHAN_SDCCH_4_CBCH;
 	}
+
 	return GSM_DCHAN_UNKNOWN;
 }
 
diff --git a/src/target/firmware/layer1/mframe_sched.c b/src/target/firmware/layer1/mframe_sched.c
index 01ae167..7fa38c1 100644
--- a/src/target/firmware/layer1/mframe_sched.c
+++ b/src/target/firmware/layer1/mframe_sched.c
@@ -198,6 +198,16 @@
 	{ .sched_set = NULL }
 };
 
+/* CBCH replaces sub-slot 2 of SDCCH, see GSM 05.02, section 6.4 */
+static const struct mframe_sched_item mf_sdcch8_cbch[] = {
+	{ .sched_set = NB_QUAD_FH_DL, .modulo = 51, .frame_nr = 8 },
+	{ .sched_set = NULL }
+};
+static const struct mframe_sched_item mf_sdcch4_cbch[] = {
+	{ .sched_set = NB_QUAD_DL, .modulo = 51, .frame_nr = 32 },
+	{ .sched_set = NULL }
+};
+
 /* Measurement for MF 51 C0 */
 static const struct mframe_sched_item mf_neigh_pm51_c0t0[] = {
 	{ .sched_set = NEIGH_PM   , .modulo = 51, .frame_nr = 0 },
@@ -327,6 +337,9 @@
 	[MF_TASK_SDCCH8_6] = mf_sdcch8_6,
 	[MF_TASK_SDCCH8_7] = mf_sdcch8_7,
 
+	[MF_TASK_SDCCH4_CBCH] = mf_sdcch4_cbch,
+	[MF_TASK_SDCCH8_CBCH] = mf_sdcch8_cbch,
+
 	[MF_TASK_TCH_F_EVEN] = mf_tch_f_even,
 	[MF_TASK_TCH_F_ODD]  = mf_tch_f_odd,
 	[MF_TASK_TCH_H_0]    = mf_tch_h_0,
@@ -401,6 +414,14 @@
 		cbits = 0x02 + 1;
 		break;
 
+	/* Osmocom specific extensions */
+	case MF_TASK_SDCCH4_CBCH:
+		cbits = 0x18;
+		break;
+	case MF_TASK_SDCCH8_CBCH:
+		cbits = 0x19;
+		break;
+
 	case MF_TASK_UL_ALL_NB:
 	default:
 		printd("ERROR: cannot express mf_task=%d as "

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1d7f02cba1cd8f6527360589d2d2747b6426f78b
Gerrit-Change-Number: 11181
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181003/e73b8a1e/attachment.htm>


More information about the gerrit-log mailing list