aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmo-bts/gsm_data_shared.h2
-rw-r--r--src/common/oml.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h
index f694114a..6c1383fc 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -890,6 +890,8 @@ struct gsm_lchan *gsm_bts_get_cbch(struct gsm_bts *bts);
int gsm_parse_reg(void *ctx, regex_t *reg, char **str,
int argc, const char **argv) __attribute__ ((warn_unused_result));
+#define BSIC2BCC(bsic) ((bsic) & 0x3)
+
static inline uint8_t gsm_ts_tsc(const struct gsm_bts_trx_ts *ts)
{
if (ts->tsc != -1)
diff --git a/src/common/oml.c b/src/common/oml.c
index 465c4169..00b85f1c 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -976,7 +976,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 = bts->bsic & 0x3;
+ ts->tsc = BSIC2BCC(bts->bsic);
}
LOGP(DOML, LOGL_INFO, "%s SET CHAN ATTR (TSC = %u)\n",
gsm_abis_mo_name(&ts->mo), ts->tsc);