aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-12-28 15:18:09 +0100
committerHarald Welte <laforge@gnumonks.org>2014-12-30 00:28:31 +0100
commitb15d2c9d2f8ebe56672ab2191a4dc39d22fa0ab8 (patch)
treeda13c97da8e99f5012c5eb7f4ead00a59398c026 /src/common
parent50dc96507caba9480938eb3d9d0db9236f877b49 (diff)
Initial CBCH support
This should handle OML channel combinations with CBCH and activate the CBCH SAPI towards the DSP correspondingly. What is still missing is sending any actual information over the CBCH in respons to the PH-RTS.ind coming up from L1.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Makefile.am3
-rw-r--r--src/common/cbch.c8
-rw-r--r--src/common/measurement.c4
-rw-r--r--src/common/oml.c18
-rw-r--r--src/common/rsl.c6
-rw-r--r--src/common/support.c4
6 files changed, 38 insertions, 5 deletions
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 10627e2a..e45e2c1d 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -7,4 +7,5 @@ libbts_a_SOURCES = gsm_data_shared.c sysinfo.c logging.c abis.c oml.c bts.c \
rsl.c vty.c paging.c measurement.c amr.c lchan.c \
load_indication.c pcu_sock.c handover.c msg_utils.c \
load_indication.c pcu_sock.c handover.c msg_utils.c \
- tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c
+ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \
+ cbch.c
diff --git a/src/common/cbch.c b/src/common/cbch.c
new file mode 100644
index 00000000..e3ce8975
--- /dev/null
+++ b/src/common/cbch.c
@@ -0,0 +1,8 @@
+
+#include <osmo-bts/bts.h>
+
+int bts_cbch_get(struct gsm_bts *bts, uint8_t *outbuf, struct gsm_time *g_time)
+{
+ /* FIXME: Actaully schedule + return CBCH messages */
+ return 0;
+}
diff --git a/src/common/measurement.c b/src/common/measurement.c
index f497e40e..41a01708 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -70,11 +70,13 @@ static int is_meas_complete(enum gsm_phys_chan_config pchan, unsigned int ts,
rc = 1;
break;
case GSM_PCHAN_SDCCH8_SACCH8C:
+ case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
fn_mod = fn % 102;
if (fn_mod == 11)
rc = 1;
break;
case GSM_PCHAN_CCCH_SDCCH4:
+ case GSM_PCHAN_CCCH_SDCCH4_CBCH:
fn_mod = fn % 102;
if (fn_mod == 36)
rc = 1;
@@ -214,9 +216,11 @@ static const uint8_t subslots_per_pchan[_GSM_PCHAN_MAX] = {
[GSM_PCHAN_NONE] = 0,
[GSM_PCHAN_CCCH] = 0,
[GSM_PCHAN_CCCH_SDCCH4] = 4,
+ [GSM_PCHAN_CCCH_SDCCH4_CBCH] = 4,
[GSM_PCHAN_TCH_F] = 1,
[GSM_PCHAN_TCH_H] = 2,
[GSM_PCHAN_SDCCH8_SACCH8C] = 8,
+ [GSM_PCHAN_SDCCH8_SACCH8C_CBCH] = 8,
/* FIXME: what about dynamic TCH_F_TCH_H ? */
[GSM_PCHAN_TCH_F_PDCH] = 1,
};
diff --git a/src/common/oml.c b/src/common/oml.c
index 65152953..5f9c0a2b 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -601,10 +601,17 @@ static int conf_lchans_for_pchan(struct gsm_bts_trx_ts *ts)
unsigned int i;
switch (ts->pchan) {
+ case GSM_PCHAN_CCCH_SDCCH4_CBCH:
+ /* fallthrough */
case GSM_PCHAN_CCCH_SDCCH4:
for (i = 0; i < 4; i++) {
lchan = &ts->lchan[i];
- lchan->type = GSM_LCHAN_SDCCH;
+ if (ts->pchan == GSM_PCHAN_CCCH_SDCCH4_CBCH
+ && i == 2) {
+ lchan->type = GSM_LCHAN_CBCH;
+ } else {
+ lchan->type = GSM_LCHAN_SDCCH;
+ }
}
/* fallthrough */
case GSM_PCHAN_CCCH:
@@ -621,10 +628,17 @@ static int conf_lchans_for_pchan(struct gsm_bts_trx_ts *ts)
lchan->type = GSM_LCHAN_TCH_H;
}
break;
+ case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
+ /* fallthrough */
case GSM_PCHAN_SDCCH8_SACCH8C:
for (i = 0; i < 8; i++) {
lchan = &ts->lchan[i];
- lchan->type = GSM_LCHAN_SDCCH;
+ if (ts->pchan == GSM_PCHAN_SDCCH8_SACCH8C_CBCH
+ && i == 2) {
+ lchan->type = GSM_LCHAN_CBCH;
+ } else {
+ lchan->type = GSM_LCHAN_SDCCH;
+ }
}
break;
case GSM_PCHAN_PDCH:
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 11c7c715..000c1797 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -162,12 +162,14 @@ struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr)
chan_nr, ts->pchan);
} else if ((cbits & 0x1c) == 0x04) {
lch_idx = cbits & 0x3; /* SDCCH/4 */
- if (ts->pchan != GSM_PCHAN_CCCH_SDCCH4)
+ if (ts->pchan != GSM_PCHAN_CCCH_SDCCH4 &&
+ ts->pchan != GSM_PCHAN_CCCH_SDCCH4_CBCH)
LOGP(DRSL, LOGL_ERROR, "chan_nr=0x%02x but pchan=%u\n",
chan_nr, ts->pchan);
} else if ((cbits & 0x18) == 0x08) {
lch_idx = cbits & 0x7; /* SDCCH/8 */
- if (ts->pchan != GSM_PCHAN_SDCCH8_SACCH8C)
+ if (ts->pchan != GSM_PCHAN_SDCCH8_SACCH8C &&
+ ts->pchan != GSM_PCHAN_SDCCH8_SACCH8C_CBCH)
LOGP(DRSL, LOGL_ERROR, "chan_nr=0x%02x but pchan=%u\n",
chan_nr, ts->pchan);
} else if (cbits == 0x10 || cbits == 0x11 || cbits == 0x12) {
diff --git a/src/common/support.c b/src/common/support.c
index e271b957..d47a6a99 100644
--- a/src/common/support.c
+++ b/src/common/support.c
@@ -70,8 +70,12 @@ char *bts_support_comb_name(uint8_t chan_comb)
return("BCCH");
if (chan_comb == NM_CHANC_BCCHComb)
return("BCCH+SDCCH/4");
+ if (chan_comb == NM_CHANC_BCCH_CBCH)
+ return("BCCH+CBCH+SDCCH/4");
if (chan_comb == NM_CHANC_SDCCH)
return("SDCCH/8");
+ if (chan_comb == NM_CHANC_SDCCH_CBCH)
+ return("SDCCH/8+CBCH");
if (chan_comb == NM_CHANC_TCHFull)
return("TCH/F");
if (chan_comb == NM_CHANC_TCHHalf)