summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/layer1/mframe_sched.c
diff options
context:
space:
mode:
authorAlex Badea <vamposdecampos@gmail.com>2018-10-01 21:19:13 +0700
committerHarald Welte <laforge@gnumonks.org>2018-10-03 08:37:11 +0000
commitbd7e58f91421be130fca954c123693ab42bf01b5 (patch)
tree01ac9c962c0a750b1fe6a83df03433ff188b73ac /src/target/firmware/layer1/mframe_sched.c
parent087626042ecb5f13c73a57de0eeb804ff81b42f5 (diff)
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
Diffstat (limited to 'src/target/firmware/layer1/mframe_sched.c')
-rw-r--r--src/target/firmware/layer1/mframe_sched.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/target/firmware/layer1/mframe_sched.c b/src/target/firmware/layer1/mframe_sched.c
index 01ae1678..7fa38c13 100644
--- a/src/target/firmware/layer1/mframe_sched.c
+++ b/src/target/firmware/layer1/mframe_sched.c
@@ -198,6 +198,16 @@ static const struct mframe_sched_item mf_sdcch8_7[] = {
{ .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 @@ static const struct mframe_sched_item *sched_set_for_task[32] = {
[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 @@ uint8_t mframe_task2chan_nr(enum mframe_task mft, uint8_t ts)
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 "