From 9b97b007dfe96b8a74932ab101d5e341b5796f75 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 2 Jun 2017 10:58:26 +0200 Subject: Move SI-related defines * move SI2quater related defines to shared header * add define from OsmoBTS which checks for presence of a given SI message in gsm_bts struct. Rename it to avoid conflicts with OsmoBTS code and to match naming conventions of similar macros. Change-Id: I11432c93c772d1ead6d45a7bb0f1d13d492c82f1 Related: OS#1660 --- openbsc/src/libbsc/bsc_init.c | 2 +- openbsc/src/libbsc/system_information.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'openbsc/src/libbsc') diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index e5226a9c1..25f3fdcee 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -186,7 +186,7 @@ int gsm_bts_trx_set_system_infos(struct gsm_bts_trx *trx) for (n = 0; n < n_si; n++) { i = gen_si[n]; - if (!(bts->si_valid & (1 << i))) + if (!GSM_BTS_HAS_SI(bts, i)) continue; rc = rsl_si(trx, i, si_len[i]); if (rc < 0) diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 644bebdf4..a074a783a 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -774,13 +774,13 @@ static int generate_si3(enum osmo_sysinfo_type t, struct gsm_bts *bts) /* allow/disallow DTXu */ gsm48_set_dtx(&si3->cell_options, bts->dtxu, bts->dtxu, true); - if ((bts->si_valid & (1 << SYSINFO_TYPE_2ter))) { + if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2ter)) { LOGP(DRR, LOGL_INFO, "SI 2ter is included.\n"); si_info.si2ter_indicator = 1; } else { si_info.si2ter_indicator = 0; } - if ((bts->si_valid & (1 << SYSINFO_TYPE_2quater))) { + if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2quater)) { LOGP(DRR, LOGL_INFO, "SI 2quater is included, based on %zu EARFCNs and %zu UARFCNs.\n", si2q_earfcn_count(&bts->si_common.si2quater_neigh_list), bts->si_common.uarfcn_length); si_info.si2quater_indicator = 1; -- cgit v1.2.3