aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/l1_if.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bts-trx/l1_if.c')
-rw-r--r--src/osmo-bts-trx/l1_if.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index 4d6dc3fc..b89a3594 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -398,9 +398,10 @@ static uint8_t trx_set_ts_as_pchan(struct gsm_bts_trx_ts *ts,
if (!(l1h->config.slotmask & (1 << tn)))
return NM_NACK_RES_NOTAVAIL;
- /* set physical channel. For dynamic TCH/F_PDCH, the caller should have
+ /* set physical channel. For dynamic timeslots, the caller should have
* decided on a more specific PCHAN type already. */
OSMO_ASSERT(pchan != GSM_PCHAN_TCH_F_PDCH);
+ OSMO_ASSERT(pchan != GSM_PCHAN_TCH_F_TCH_H_PDCH);
rc = trx_sched_set_pchan(&l1h->l1s, tn, pchan);
if (rc)
return NM_NACK_RES_NOTAVAIL;
@@ -426,15 +427,25 @@ static uint8_t trx_set_ts_as_pchan(struct gsm_bts_trx_ts *ts,
static uint8_t trx_set_ts(struct gsm_bts_trx_ts *ts)
{
- enum gsm_phys_chan_config pchan = ts->pchan;
-
- /* For dynamic TCH/F_PDCH, pick the pchan type that should currently be
- * active according to TS flags. This should only be called during
- * init, PDCH transitions will call trx_set_ts_as_pchan() directly. */
- OSMO_ASSERT((ts->flags & TS_F_PDCH_PENDING_MASK) == 0);
- if (pchan == GSM_PCHAN_TCH_F_PDCH)
+ enum gsm_phys_chan_config pchan;
+
+ /* For dynamic timeslots, pick the pchan type that should currently be
+ * active. This should only be called during init, PDCH transitions
+ * will call trx_set_ts_as_pchan() directly. */
+ switch (ts->pchan) {
+ case GSM_PCHAN_TCH_F_PDCH:
+ OSMO_ASSERT((ts->flags & TS_F_PDCH_PENDING_MASK) == 0);
pchan = (ts->flags & TS_F_PDCH_ACTIVE)? GSM_PCHAN_PDCH
: GSM_PCHAN_TCH_F;
+ break;
+ case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+ OSMO_ASSERT(ts->dyn.pchan_is == ts->dyn.pchan_want);
+ pchan = ts->dyn.pchan_is;
+ break;
+ default:
+ pchan = ts->pchan;
+ break;
+ }
return trx_set_ts_as_pchan(ts, pchan);
}