From d4abdd80fecefba8becd879dddfbc9a2f369364a Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sat, 22 May 2021 03:22:09 +0200 Subject: [VAMOS] gsm_data.h: introduce and use BTS_TSC macro Change-Id: I0cf915d2d3a640aa1442cf6abe9a314261b4a64e Related: SYS#5315, OS#4940 --- src/common/gsm_data.c | 2 +- src/common/l1sap.c | 4 ++-- src/common/oml.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/gsm_data.c b/src/common/gsm_data.c index f1097225..f014acff 100644 --- a/src/common/gsm_data.c +++ b/src/common/gsm_data.c @@ -277,7 +277,7 @@ uint8_t gsm_ts_tsc(const struct gsm_bts_trx_ts *ts) if (ts->tsc != -1) return ts->tsc; else - return ts->trx->bts->bsic & 7; + return BTS_TSC(ts->trx->bts); } /* determine logical channel based on TRX and channel number IE */ diff --git a/src/common/l1sap.c b/src/common/l1sap.c index b74e0d32..45abe4e2 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1975,10 +1975,10 @@ int l1sap_chan_act(struct gsm_bts_trx *trx, uint8_t chan_nr, struct tlv_parsed * /* The PHY may not support using different TSCs */ if (!osmo_bts_has_feature(trx->bts->features, BTS_FEAT_MULTI_TSC) - && cd->h0.tsc != (trx->bts->bsic & 7)) { + && cd->h0.tsc != BTS_TSC(trx->bts)) { LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "This PHY does not support " "lchan TSC %u != BSIC-TSC %u, sending NACK\n", - cd->h0.tsc, trx->bts->bsic & 7); + cd->h0.tsc, BTS_TSC(trx->bts)); return -RSL_ERR_SERV_OPT_UNIMPL; } } diff --git a/src/common/oml.c b/src/common/oml.c index c32260bd..0bbe0a62 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -964,7 +964,7 @@ static int oml_rx_set_chan_attr(struct gsm_bts_trx_ts *ts, struct msgb *msg) ts->tsc = *TLVP_VAL(&tp, NM_ATT_TSC); } else { /* If there is no TSC specified, use the BCC */ - ts->tsc = BSIC2BCC(bts->bsic); + ts->tsc = BTS_TSC(bts); } LOGPFOH(DOML, LOGL_INFO, foh, "SET CHAN ATTR (TSC=%u pchan=%s", ts->tsc, gsm_pchan_name(ts->pchan)); -- cgit v1.2.3