diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-05-30 02:27:13 +0700 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2021-04-07 16:41:22 +0000 |
commit | 23c1c975c0596fddc241cfa94fd498e37ea74466 (patch) | |
tree | 11f0376019f617edc1033d044891b90a4f1a15e0 | |
parent | 2b076289495a3df1c345d4138057db3ea5eabb2e (diff) |
abis_nm: rework warnings about unknown / not supported features
The reported feature vector may contain new features the BSC is
not aware of. Report each of them individually as NOTICE.
It's normal when some BTS feature is considered as not supported
by the BSC, but a BTS reports that it is - do not log this.
Change-Id: I2f925bcdb010cb10d074bf7c82619e3ae1f8818b
-rw-r--r-- | src/osmo-bsc/abis_nm.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index b377c4a98..30d6fa360 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -594,11 +594,20 @@ static int parse_attr_resp_info_attr(struct gsm_bts *bts, const struct gsm_bts_t memcpy(bts->_features_data, TLVP_VAL(tp, NM_ATT_MANUF_ID), len); - for (i = 0; i < _NUM_BTS_FEAT; i++) { - if (osmo_bts_has_feature(&bts->features, i) != osmo_bts_has_feature(&bts->model->features, i)) { - LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Feature '%s' reported via OML does not match statically " - "set feature: %u != %u. Please fix.\n", get_value_string(osmo_bts_features_descs, i), - osmo_bts_has_feature(&bts->features, i), osmo_bts_has_feature(&bts->model->features, i)); + /* Check each BTS feature in the reported vector */ + for (i = 0; i < len * 8; i++) { + bool Frep = osmo_bts_has_feature(&bts->features, i); + if (i >= _NUM_BTS_FEAT && Frep) { + LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: " + "unknown feature 0x%02x. Consider upgrading osmo-bsc.\n", i); + continue; + } + + bool Fexp = osmo_bts_has_feature(&bts->model->features, i); + if (!Frep && Fexp) { + LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: " + "reported feature '%s' is not supported, while we thought it is.\n", + get_value_string(osmo_bts_features_descs, i)); } } } |