From 090a41f897091f3386b1517d33e12eca4ef5a528 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sun, 24 Jul 2016 15:24:56 +0200 Subject: dyn TS: implement SysmoBTS specifics For chan_nr_by_sapi(), add GSM_PCHAN_TCH_F_TCH_H_PDCH to pick_pchan(). Add GSM_PCHAN_TCH_F_TCH_H_PDCH to pchan_to_logChComb[] for first pchan initialization. In ts_connect_as(), make sure that callers pass proper "real world" pchan types, i.e. reject the "meta" GSM_PCHAN_TCH_F_TCH_H_PDCH pchan constant. In ts_opstart(), connect as PCHAN_NONE since we will only know the desired pchan when the first RSL chan activ is received. Add GSM_PCHAN_TCH_F_TCH_H_PDCH to lchan_to_GsmL1_SubCh_t(), by using its current "real" pchan mode. Call cb_ts_[dis]connected() unconditionally, i.e. not only for TCH_F_PDCH when a pending flag is set. The cb_ts_[dis]connected() will be a no-op if the pchan type is not dynamic. Change-Id: Iaffd2fc0aa9fc6c4a2acbc534ce6384392e0635b --- src/osmo-bts-sysmo/l1_if.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/osmo-bts-sysmo/l1_if.c') diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 355507d9..2dcd87e0 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -607,11 +607,16 @@ static int handle_mph_time_ind(struct femtol1_hdl *fl1, static enum gsm_phys_chan_config pick_pchan(struct gsm_bts_trx_ts *ts) { - if (ts->pchan != GSM_PCHAN_TCH_F_PDCH) + switch (ts->pchan) { + case GSM_PCHAN_TCH_F_PDCH: + if (ts->flags & TS_F_PDCH_ACTIVE) + return GSM_PCHAN_PDCH; + return GSM_PCHAN_TCH_F; + case GSM_PCHAN_TCH_F_TCH_H_PDCH: + return ts->dyn.pchan_is; + default: return ts->pchan; - if (ts->flags & TS_F_PDCH_ACTIVE) - return GSM_PCHAN_PDCH; - return GSM_PCHAN_TCH_F; + } } static uint8_t chan_nr_by_sapi(struct gsm_bts_trx_ts *ts, -- cgit v1.2.3