summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-25 15:15:59 +0200
committerHarald Welte <laforge@gnumonks.org>2016-09-28 00:28:01 +0000
commit23c3aa37acd9eadcb7d7c740e1413ebf153dcc64 (patch)
tree277a6d39505dfd7f65734fd2ed657ae260338285 /openbsc
parentc3f72f63afde926dfc46827d6880055597515fb6 (diff)
dyn TS: fix: abis_om2000: also handle dyn TS as TCH
Add ts2comb() to switch on dyn TS so that dyn TS in TCH mode are also treated like normal TCH/H or TCH/F pchans. Use ts2comb() instead of pchan2comb(). Change-Id: Iddc51a4409488d91db59228ca66aaab73ce3f1df
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/libbsc/abis_om2000.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index 2e5a79a5b..1745a72e0 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -1123,13 +1123,27 @@ static uint8_t pchan2comb(enum gsm_phys_chan_config pchan)
case GSM_PCHAN_TCH_F:
case GSM_PCHAN_TCH_H:
case GSM_PCHAN_PDCH:
- case GSM_PCHAN_TCH_F_PDCH:
return 8;
default:
return 0;
}
}
+static uint8_t ts2comb(struct gsm_bts_trx_ts *ts)
+{
+ switch (ts->pchan) {
+ case GSM_PCHAN_TCH_F_PDCH:
+ if (ts->flags & TS_F_PDCH_ACTIVE)
+ return pchan2comb(GSM_PCHAN_PDCH);
+ else
+ return pchan2comb(GSM_PCHAN_TCH_F);
+ case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+ return pchan2comb(ts->dyn.pchan_is);
+ default:
+ return pchan2comb(ts->pchan);
+ }
+}
+
static int put_freq_list(uint8_t *buf, uint16_t arfcn)
{
buf[0] = 0x00; /* TX/RX address */
@@ -1179,7 +1193,7 @@ int abis_om2k_tx_ts_conf_req(struct gsm_bts_trx_ts *ts)
o2k = (struct abis_om2k_hdr *) msgb_put(msg, sizeof(*o2k));
fill_om2k_hdr(o2k, &mo, OM2K_MSGT_TS_CONF_REQ);
- msgb_tv_put(msg, OM2K_DEI_COMBINATION, pchan2comb(ts->pchan));
+ msgb_tv_put(msg, OM2K_DEI_COMBINATION, ts2comb(ts));
msgb_tv_put(msg, OM2K_DEI_TS_NR, ts->nr);
msgb_tlv_put(msg, OM2K_DEI_FREQ_LIST, freq_list_len, freq_list);
msgb_tv_put(msg, OM2K_DEI_HSN, ts->hopping.hsn);