This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/6317
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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/17/6317/1
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: newchange
Gerrit-Change-Id: Ib539a8739d53ab60d8fadffcef38152b82a28498
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>