aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-05-22 03:22:09 +0200
committerlaforge <laforge@osmocom.org>2021-05-23 10:09:27 +0000
commitd4abdd80fecefba8becd879dddfbc9a2f369364a (patch)
treee29cb798c9b6afaeb3dea946d4ee2724f6e974f1 /src/common
parenta344db979f6951e313feb086369ec3c95745792b (diff)
[VAMOS] gsm_data.h: introduce and use BTS_TSC macro
Diffstat (limited to 'src/common')
-rw-r--r--src/common/gsm_data.c2
-rw-r--r--src/common/l1sap.c4
-rw-r--r--src/common/oml.c2
3 files changed, 4 insertions, 4 deletions
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));