aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/bts.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-05-30 00:14:03 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-11 00:36:21 +0700
commit578156b815530fbaf14037217197b77edca3fee0 (patch)
tree6664af7d8bae19643a56e362a42f84c824db4c99 /src/common/bts.c
parentba0e5c7d5091a1c334e23a52b5903bdcecf9798a (diff)
Do not mix public and private BTS features, use libosmocore's API
It was a very bad idea to mix "public" BTS features, that are reported to the BSC via OML, and those features, that are used locally (and exclusively) in osmo-bts. Why? At least because we already have the BTS feature manipulation API in libosmocore, that is used by osmo-bsc, but for some reason not by osmo-bts. New features added to libosmocore would clash with the existing "internal" ones like BTS_FEAT_MS_PWR_CTRL_DSP. So what this change does can be described as follows: - remove duplicate definition of the "public" features, - use libosmocore's API for the "public" features, - separate both "internal" and "public" features: - the "public" features continue to live in bitvec, - the "internal" features become flags, - s/BTS_FEAT/BTS_INTERNAL_FLAG/g. Change-Id: Icf792d02323bb73e3b8d46384c7890cb1eb4731e
Diffstat (limited to 'src/common/bts.c')
-rw-r--r--src/common/bts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/bts.c b/src/common/bts.c
index 9710a2ce..d8a6ff28 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -194,7 +194,7 @@ int bts_init(struct gsm_bts *bts)
osmo_rtp_init(tall_rtp_ctx);
/* features implemented in 'common', available for all models */
- gsm_bts_set_feature(bts, BTS_FEAT_ETWS_PN);
+ osmo_bts_set_feature(bts->features, BTS_FEAT_ETWS_PN);
rc = bts_model_init(bts);
if (rc < 0) {
@@ -258,7 +258,7 @@ int bts_trx_init(struct gsm_bts_trx *trx)
tpp->ramp.step_interval_sec = 1;
/* IF BTS model doesn't DSP/HW support MS Power Control Loop, enable osmo algo by default: */
- if (!gsm_bts_has_feature(trx->bts, BTS_FEAT_MS_PWR_CTRL_DSP))
+ if (!bts_internal_flag_get(trx->bts, BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP))
trx->ms_pwr_ctl_soft = true;
rc = bts_model_trx_init(trx);
@@ -797,7 +797,7 @@ struct gsm_time *get_time(struct gsm_bts *bts)
int bts_supports_cm(struct gsm_bts *bts, enum gsm_phys_chan_config pchan,
enum gsm48_chan_mode cm)
{
- enum gsm_bts_features feature = _NUM_BTS_FEAT;
+ enum osmo_bts_features feature = _NUM_BTS_FEAT;
/* We assume that signalling support is mandatory,
* there is no BTS_FEAT_* definition to check that. */
@@ -845,7 +845,7 @@ int bts_supports_cm(struct gsm_bts *bts, enum gsm_phys_chan_config pchan,
}
/* Check if the feature is supported by this BTS */
- if (gsm_bts_has_feature(bts, feature))
+ if (osmo_bts_has_feature(bts->features, feature))
return 1;
return 0;