diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/gsm_data.c | 2 | ||||
-rw-r--r-- | src/common/l1sap.c | 4 | ||||
-rw-r--r-- | src/common/oml.c | 2 | ||||
-rw-r--r-- | src/osmo-bts-lc15/oml.c | 6 | ||||
-rw-r--r-- | src/osmo-bts-oc2g/oml.c | 6 | ||||
-rw-r--r-- | src/osmo-bts-octphy/l1_oml.c | 2 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/oml.c | 6 |
7 files changed, 14 insertions, 14 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)); diff --git a/src/osmo-bts-lc15/oml.c b/src/osmo-bts-lc15/oml.c index 39d0e5e0..3010fe75 100644 --- a/src/osmo-bts-lc15/oml.c +++ b/src/osmo-bts-lc15/oml.c @@ -432,7 +432,7 @@ static int trx_init(struct gsm_bts_trx *trx) dev_par->freqBand = lc15_band; dev_par->u16Arfcn = trx->arfcn; dev_par->u16BcchArfcn = trx->bts->c0->arfcn; - dev_par->u8NbTsc = trx->bts->bsic & 7; + dev_par->u8NbTsc = BTS_TSC(trx->bts); if (!trx_ms_pwr_ctrl_is_osmo(trx)) { /* Target is in the middle between lower and upper RxLev thresholds */ @@ -1835,9 +1835,9 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type, * channels with a different TSC!! */ if (TLVP_PRESENT(new_attr, NM_ATT_TSC) && TLVP_LEN(new_attr, NM_ATT_TSC) >= 1 && - *TLVP_VAL(new_attr, NM_ATT_TSC) != (bts->bsic & 7)) { + *TLVP_VAL(new_attr, NM_ATT_TSC) != BTS_TSC(bts)) { LOGP(DOML, LOGL_ERROR, "Channel TSC %u != BSIC-TSC %u\n", - *TLVP_VAL(new_attr, NM_ATT_TSC), bts->bsic & 7); + *TLVP_VAL(new_attr, NM_ATT_TSC), BTS_TSC(bts)); return -NM_NACK_PARAM_RANGE; } break; diff --git a/src/osmo-bts-oc2g/oml.c b/src/osmo-bts-oc2g/oml.c index 8fd36882..151b92e1 100644 --- a/src/osmo-bts-oc2g/oml.c +++ b/src/osmo-bts-oc2g/oml.c @@ -447,7 +447,7 @@ static int trx_init(struct gsm_bts_trx *trx) dev_par->freqBand = oc2g_band; dev_par->u16Arfcn = trx->arfcn; dev_par->u16BcchArfcn = trx->bts->c0->arfcn; - dev_par->u8NbTsc = trx->bts->bsic & 7; + dev_par->u8NbTsc = BTS_TSC(trx->bts); if (!trx_ms_pwr_ctrl_is_osmo(trx)) { /* Target is in the middle between lower and upper RxLev thresholds */ @@ -1844,9 +1844,9 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type, * channels with a different TSC!! */ if (TLVP_PRESENT(new_attr, NM_ATT_TSC) && TLVP_LEN(new_attr, NM_ATT_TSC) >= 1 && - *TLVP_VAL(new_attr, NM_ATT_TSC) != (bts->bsic & 7)) { + *TLVP_VAL(new_attr, NM_ATT_TSC) != BTS_TSC(bts)) { LOGP(DOML, LOGL_ERROR, "Channel TSC %u != BSIC-TSC %u\n", - *TLVP_VAL(new_attr, NM_ATT_TSC), bts->bsic & 7); + *TLVP_VAL(new_attr, NM_ATT_TSC), BTS_TSC(bts)); return -NM_NACK_PARAM_RANGE; } break; diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index b7f49350..9bd01f4b 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -1352,7 +1352,7 @@ int l1if_trx_open(struct gsm_bts_trx *trx) } oc->Config.usBcchArfcn = trx->bts->c0->arfcn; #endif - oc->Config.usTsc = trx->bts->bsic & 0x7; + oc->Config.usTsc = BTS_TSC(trx->bts); oc->RfConfig.ulRxGainDb = plink->u.octphy.rx_gain_db; /* FIXME: compute this based on nominal transmit power, etc. */ if (plink->u.octphy.tx_atten_flag) { diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index ac3176c7..25c56519 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -427,7 +427,7 @@ static int trx_init(struct gsm_bts_trx *trx) dev_par->freqBand = femto_band; dev_par->u16Arfcn = trx->arfcn; dev_par->u16BcchArfcn = trx->bts->c0->arfcn; - dev_par->u8NbTsc = trx->bts->bsic & 7; + dev_par->u8NbTsc = BTS_TSC(trx->bts); if (!trx_ms_pwr_ctrl_is_osmo(trx)) { /* Target is in the middle between lower and upper RxLev thresholds */ @@ -1748,9 +1748,9 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type, * one one TRX, so we need to make sure not to activate * channels with a different TSC!! */ if (TLVP_PRES_LEN(new_attr, NM_ATT_TSC, 1) && - *TLVP_VAL(new_attr, NM_ATT_TSC) != (bts->bsic & 7)) { + *TLVP_VAL(new_attr, NM_ATT_TSC) != BTS_TSC(bts)) { LOGP(DOML, LOGL_ERROR, "Channel TSC %u != BSIC-TSC %u\n", - *TLVP_VAL(new_attr, NM_ATT_TSC), bts->bsic & 7); + *TLVP_VAL(new_attr, NM_ATT_TSC), BTS_TSC(bts)); return -NM_NACK_PARAM_RANGE; } break; |