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
This commit is contained in:
Neels Hofmeyr 2016-06-16 17:19:36 +02:00 committed by Harald Welte
parent 9375aa9a68
commit e6cc04827a
1 changed files with 8 additions and 3 deletions

View File

@ -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 {