aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2016-06-16 17:19:36 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-17 15:50:47 +0000
commite6cc04827a5591cf70ac9ed724140158876cb645 (patch)
treeb494a28870a4e697eb9642c31f4dc5f10fed3f15
parent9375aa9a68fd101997c88669d7bf7bb70aa51178 (diff)
dyn PDCH: conf_lchans_for_pchan(): handle TCH/F_PDCH
Depending on the PDCH active flag, handle a TCH/F_PDCH like TCH/F or PDCH. Change-Id: Ifc5561f8e2db172bb692ba26bdeae2fd675d6ec5
-rw-r--r--src/common/oml.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index bee2f84..9d3c454 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -689,14 +689,19 @@ static int conf_lchans_for_pchan(struct gsm_bts_trx_ts *ts)
{
struct gsm_lchan *lchan;
unsigned int i;
+ enum gsm_phys_chan_config pchan = ts->pchan;
- switch (ts->pchan) {
+ if (pchan == GSM_PCHAN_TCH_F_PDCH)
+ pchan = ts->flags & TS_F_PDCH_ACTIVE? GSM_PCHAN_PDCH
+ : GSM_PCHAN_TCH_F;
+
+ switch (pchan) {
case GSM_PCHAN_CCCH_SDCCH4_CBCH:
/* fallthrough */
case GSM_PCHAN_CCCH_SDCCH4:
for (i = 0; i < 4; i++) {
lchan = &ts->lchan[i];
- if (ts->pchan == GSM_PCHAN_CCCH_SDCCH4_CBCH
+ if (pchan == GSM_PCHAN_CCCH_SDCCH4_CBCH
&& i == 2) {
lchan->type = GSM_LCHAN_CBCH;
} else {
@@ -723,7 +728,7 @@ static int conf_lchans_for_pchan(struct gsm_bts_trx_ts *ts)
case GSM_PCHAN_SDCCH8_SACCH8C:
for (i = 0; i < 8; i++) {
lchan = &ts->lchan[i];
- if (ts->pchan == GSM_PCHAN_SDCCH8_SACCH8C_CBCH
+ if (pchan == GSM_PCHAN_SDCCH8_SACCH8C_CBCH
&& i == 2) {
lchan->type = GSM_LCHAN_CBCH;
} else {