Harald Welte has submitted this change and it was merged.

Change subject: Add helper to get BCC from BSIC
......................................................................


Add helper to get BCC from BSIC

Change-Id: Ib539a8739d53ab60d8fadffcef38152b82a28498
Related: OS#1854
---
M include/osmo-bts/gsm_data_shared.h
M src/common/oml.c
2 files changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmo-bts/gsm_data_shared.h 
b/include/osmo-bts/gsm_data_shared.h
index f694114..6c1383f 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -890,6 +890,8 @@
 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 465c416..00b85f1 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -976,7 +976,7 @@
                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);

-- 
To view, visit https://gerrit.osmocom.org/6317
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib539a8739d53ab60d8fadffcef38152b82a28498
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msur...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to