diff options
author | Oliver Smith <osmith@sysmocom.de> | 2022-04-28 12:04:36 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2022-05-02 15:14:05 +0200 |
commit | aa6404f3f82fb05111d92b57d4db1546002ebca2 (patch) | |
tree | 5f9e2912cdc2a939a6fd1cb4edba9046e3982aa1 /src/osmo-bsc | |
parent | ad1f436512670b5b54cee7de1b6b93209998d1ba (diff) |
abis_nm: add bts model features to reported ones
As pointed out in code review, for nanobts we need to be able to combine
the reported features with a list of features we assume that the bts
model supports. This is because the enum of features is based on what
nanobts is able to report, but was extended for osmo-bts.
Related: SYS#5922, OS#5538
Change-Id: I7bdbf28c148877275048e070dce7f503ca5e6226
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r-- | src/osmo-bsc/abis_nm.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 62f62b6a6..b7009940f 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -613,6 +613,20 @@ static int parse_attr_resp_info_attr(struct gsm_bts *bts, const struct gsm_bts_t LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: feature '%s' is" " supported\n", osmo_bts_features_name(i)); } + + /* Add features from the BTS model: nanobts may support more + * features than it reports, since we extend the enum of + * features for osmo-bts. */ + if (bts->type == GSM_BTS_TYPE_NANOBTS) { + for (i = 0; i < _NUM_BTS_FEAT; i++) { + if (osmo_bts_has_feature(&bts->model->features, i) /* intentional check against bts model */ + && !osmo_bts_has_feature(&bts->features, i)) { + LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: feature '%s' is" + " assumed to be supported\n", osmo_bts_features_name(i)); + osmo_bts_set_feature(&bts->features, i); + } + } + } } /* Parse Attribute Response Info content for 3GPP TS 52.021 ยง9.4.28 Manufacturer Dependent State */ |