aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-05-10 04:54:40 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-05-10 05:16:31 +0200
commit6a9a799c9c89bf3b7d987ead1b7f75639b0cb8d0 (patch)
tree0f3732ebbd218a77c25affdf409f384d84c23101
parente152fd2614a2159f2918d2ac721793856ca4d873 (diff)
dyn TS: be less strict on chan_nr, to allow arbitrary pchan switches
To allow switching a dyn TS also between TCH/H <-> TCH/F and anything else, don't thwart RSL messages just because their chan_nr doesn't reflect the current pchan mode. For dyn TS, leave that to message handling. In particular, a TS switch is invoked by a Chan Activ message, in which case the current pchan by definition mismatches the incoming chan_nr's reflected channel type. With this patch, I have tested successful direct TCH/H<->TCH/F switchover on sysmoBTS, with osmo-bsc patch I72d5d833b186b1e1925d513885b405d8c19aa496 (and 'msc'/'codec-list' vty config to change TCH kinds while gprs mode was none). Change-Id: I19e5e509101ec91204de9baff04582d99bc8dcb8
-rw-r--r--src/common/gsm_data_shared.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c
index 328b57e2..2a1f9c8b 100644
--- a/src/common/gsm_data_shared.c
+++ b/src/common/gsm_data_shared.c
@@ -716,19 +716,13 @@ 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_TCH_H_PDCH
- && (ts->dyn.pchan_is == GSM_PCHAN_TCH_F
- || ts->dyn.pchan_is == GSM_PCHAN_NONE
- || ts->dyn.pchan_want == GSM_PCHAN_TCH_F)))
+ ts->pchan != GSM_PCHAN_TCH_F_PDCH &&
+ ts->pchan != GSM_PCHAN_TCH_F_TCH_H_PDCH)
ok = false;
} else if ((cbits & 0x1e) == 0x02) {
lch_idx = cbits & 0x1; /* 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_is == GSM_PCHAN_NONE
- || ts->dyn.pchan_want == GSM_PCHAN_TCH_H)))
+ if (ts->pchan != GSM_PCHAN_TCH_H &&
+ ts->pchan != GSM_PCHAN_TCH_F_TCH_H_PDCH)
ok = false;
} else if ((cbits & 0x1c) == 0x04) {
lch_idx = cbits & 0x3; /* SDCCH/4 */