aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--src/common/oml.c4
-rw-r--r--src/osmo-bts-sysmo/oml.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 92c7848..f4b0f15 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -548,12 +548,12 @@ static int conf_lchans_for_pchan(struct gsm_bts_trx_ts *ts)
switch (ts->pchan) {
case GSM_PCHAN_CCCH_SDCCH4:
for (i = 0; i < 4; i++) {
- lchan = &ts->lchan[i+1];
+ lchan = &ts->lchan[i];
lchan->type = GSM_LCHAN_SDCCH;
}
/* fallthrough */
case GSM_PCHAN_CCCH:
- lchan = &ts->lchan[0];
+ lchan = &ts->lchan[4];
lchan->type = GSM_LCHAN_CCCH;
break;
case GSM_PCHAN_TCH_F:
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index 5431eaf..9b59a84 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;