aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libcommon
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2016-07-23 17:57:53 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2016-07-28 11:56:51 +0200
commitf58852d117c157db28a52f9ce2e058de1822eb98 (patch)
tree1cffd7fe3614fb6d8d520c145fe5fe75074faab4 /openbsc/src/libcommon
parent9518ffc299e3dd3fd5ff854af047e4d88815dd8b (diff)
dyn TS: rsl_lchan_lookup(): add dyn PCHAN
Accept GSM_PCHAN_TCH_F_TCH_H_PDCH for TCH/F and TCH/H if in matching pchan mode or switching to matching pchan. Accept RSL_CHAN_OSMO_PDCH chan_nr cbits for GSM_PCHAN_TCH_F_TCH_H_PDCH pchan. Change-Id: If8f7c118f69e5a9f370bfe25f82f3d5a8de75b51
Diffstat (limited to 'openbsc/src/libcommon')
-rw-r--r--openbsc/src/libcommon/gsm_data_shared.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c
index b5e7e029d..8d99ea42d 100644
--- a/openbsc/src/libcommon/gsm_data_shared.c
+++ b/openbsc/src/libcommon/gsm_data_shared.c
@@ -658,11 +658,17 @@ struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr,
lch_idx = 0; /* TCH/F */
if (ts->pchan != GSM_PCHAN_TCH_F &&
ts->pchan != GSM_PCHAN_PDCH &&
- ts->pchan != GSM_PCHAN_TCH_F_PDCH)
+ ts->pchan != GSM_PCHAN_TCH_F_PDCH
+ && !(ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH
+ && (ts->dyn.pchan_is == GSM_PCHAN_TCH_F
+ || ts->dyn.pchan_want == GSM_PCHAN_TCH_F)))
ok = false;
} else if ((cbits & 0x1e) == 0x02) {
lch_idx = cbits & 0x1; /* TCH/H */
- if (ts->pchan != GSM_PCHAN_TCH_H)
+ if (ts->pchan != GSM_PCHAN_TCH_H
+ && !(ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH
+ && (ts->dyn.pchan_is == GSM_PCHAN_TCH_H
+ || ts->dyn.pchan_want == GSM_PCHAN_TCH_H)))
ok = false;
} else if ((cbits & 0x1c) == 0x04) {
lch_idx = cbits & 0x3; /* SDCCH/4 */
@@ -681,6 +687,10 @@ struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr,
ts->pchan != GSM_PCHAN_CCCH_SDCCH4_CBCH)
ok = false;
/* FIXME: we should not return first sdcch4 !!! */
+ } else if ((chan_nr & RSL_CHAN_NR_MASK) == RSL_CHAN_OSMO_PDCH) {
+ lch_idx = 0;
+ if (ts->pchan != GSM_PCHAN_TCH_F_TCH_H_PDCH)
+ ok = false;
} else
return NULL;