abis_nm: Only osmo-bts re-purposes the MANUF_ID for BTS feature flags
The Manufacturer ID IE is normally used to indicate the [name of] the manufacturer. In case of ip.access nanoBTS it is, for example, "com.ipaccess". Osmocom decided to re-pupose this IE to indicate bts-specific feature flags. Stop interpreting the string "com.ipaccess" as feature bitmap. In fact, nanoBTS doesn't support runtime reporting of features (at least not in this way), so let's mark features_get_reported = false, resulting in the copy of bts_model->features to bts->features at the time a BTS is initialized. Change-Id: I76cee190dc1f074464df570cdfc3d38559f04846 Closes: OS#5959changes/70/32070/5
parent
ba3fe2c908
commit
5d8ab13b34
|
@ -573,7 +573,7 @@ static int parse_attr_resp_info_attr(struct gsm_bts *bts, const struct gsm_bts_t
|
|||
struct abis_nm_sw_desc sw_descr[MAX_BTS_ATTR];
|
||||
|
||||
/* Parse Attribute Response Info content for 3GPP TS 52.021 §9.4.30 Manufacturer Id */
|
||||
if (TLVP_PRES_LEN(tp, NM_ATT_MANUF_ID, 2)) {
|
||||
if (bts->type == GSM_BTS_TYPE_OSMOBTS && TLVP_PRES_LEN(tp, NM_ATT_MANUF_ID, 2)) {
|
||||
len = TLVP_LEN(tp, NM_ATT_MANUF_ID);
|
||||
|
||||
/* log potential BTS feature vector overflow */
|
||||
|
@ -606,19 +606,6 @@ static int parse_attr_resp_info_attr(struct gsm_bts *bts, const struct gsm_bts_t
|
|||
" 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 */
|
||||
|
|
|
@ -131,7 +131,7 @@ struct gsm_bts_model bts_model_nanobts = {
|
|||
[NM_ATT_IPACC_REVOC_DATE] = { TLV_TYPE_TL16V },
|
||||
},
|
||||
},
|
||||
.features_get_reported = true,
|
||||
.features_get_reported = false,
|
||||
};
|
||||
|
||||
|
||||
|
@ -638,9 +638,11 @@ void ipaccess_drop_oml(struct gsm_bts *bts, const char *reason)
|
|||
|
||||
bts->ip_access.flags = 0;
|
||||
|
||||
/* Reset the feature vector */
|
||||
memset(bts->_features_data, 0, sizeof(bts->_features_data));
|
||||
bts->features_known = false;
|
||||
if (bts->model->features_get_reported) {
|
||||
/* Reset the feature vector */
|
||||
memset(bts->_features_data, 0, sizeof(bts->_features_data));
|
||||
bts->features_known = false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Go through the list and see if we are the depndency of a BTS
|
||||
|
|
|
@ -188,6 +188,7 @@ int bts_model_osmobts_init(void)
|
|||
model_osmobts = bts_model_nanobts;
|
||||
model_osmobts.name = "osmo-bts";
|
||||
model_osmobts.type = GSM_BTS_TYPE_OSMOBTS;
|
||||
model_osmobts.features_get_reported = true;
|
||||
|
||||
/* Unlike nanoBTS, osmo-bts does support SI2bis and SI2ter fine */
|
||||
model_osmobts.force_combined_si = false;
|
||||
|
|
Loading…
Reference in New Issue