diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-07 04:18:42 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-07 04:54:04 +0200 |
commit | 2915bbf4c551468ae911de61eda8520bd2f8f422 (patch) | |
tree | 9ce8bebeb5b52876662e1554821cedcb9feb7189 | |
parent | 1adcc27eb9835f290e4f152ef5931e6d4c766c91 (diff) |
l1sap: check BTS_FEAT_MULTI_TSC in l1sap_chan_act()
Instead of blindly assuming what the PHY does support, and what
it does not, let's check the related feature vector.
Change-Id: I699cdddbfab111855998853548d9cfe956f7c60c
Related: SYS#4895, OS#4941
-rw-r--r-- | src/common/l1sap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 3ebe8e19..b8bfa310 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1973,11 +1973,11 @@ int l1sap_chan_act(struct gsm_bts_trx *trx, uint8_t chan_nr, struct tlv_parsed * cd = (struct gsm48_chan_desc *) TLVP_VAL(tp, GSM48_IE_CHANDESC_2); - /* our L1 only supports one global TSC for all channels - * one one TRX, so we need to make sure not to activate - * channels with a different TSC!! */ - if (cd->h0.tsc != (trx->bts->bsic & 7)) { - LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "lchan TSC %u != BSIC-TSC %u\n", + /* 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)) { + 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); return -RSL_ERR_SERV_OPT_UNIMPL; } |