aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/oml.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-06-29 18:35:38 +0200
committerHarald Welte <laforge@gnumonks.org>2011-06-29 18:35:38 +0200
commitb9919bd2a68d7898d56faaa0d15e97fd89bcaec7 (patch)
treef3888236e1890b17087bb311b0b2639bd3057e27 /src/osmo-bts-sysmo/oml.c
parent8188e1949bdd485f1b25ef278fe54170165044b2 (diff)
Fix support of SDCCH4
In SDCCH4, we use lchan number 0...3 for the SDCCH/SACCH, and we statically use lchan[4] as the dummy for activating the CCCH L1 SAPIs. In order to make combined and non-combined CCCH orthogonal, we simply also use lchan[4] in that case. On a 'pure' CCCH, therefore lchan 0..3 are unused and 4 is the actual CCCH.
Diffstat (limited to 'src/osmo-bts-sysmo/oml.c')
-rw-r--r--src/osmo-bts-sysmo/oml.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index 5431eaf6..9b59a84d 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -180,7 +180,7 @@ static int opstart_compl_cb(struct msgb *l1_msg, void *data)
if (mo->obj_class == NM_OC_CHANNEL && mo->obj_inst.trx_nr == 0 &&
mo->obj_inst.ts_nr == 0) {
DEBUGP(DL1C, "====> trying to activate lchans of BCCH\n");
- lchan_activate(&mo->bts->c0->ts[0].lchan[0]);
+ lchan_activate(&mo->bts->c0->ts[0].lchan[4]);
}
/* Send OPSTART ack */
@@ -242,6 +242,9 @@ GsmL1_SubCh_t lchan_to_GsmL1_SubCh_t(const struct gsm_lchan *lchan)
{
switch (lchan->ts->pchan) {
case GSM_PCHAN_CCCH_SDCCH4:
+ if (lchan->type == GSM_LCHAN_CCCH)
+ return GsmL1_SubCh_NA;
+ /* fall-through */
case GSM_PCHAN_TCH_H:
case GSM_PCHAN_SDCCH8_SACCH8C:
return lchan->nr;