diff options
author | Max <msuraev@sysmocom.de> | 2017-06-09 18:37:33 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-06-15 12:55:16 +0000 |
commit | de9357251c53af4e5abee5724c098d1db6271bf9 (patch) | |
tree | e6b92914de5320a481276fbd62f4d2b61af6a934 | |
parent | b7793ed8fd29fb2c4092ed08abcf8c859cd18108 (diff) |
Set and report BTS features
Set (possibly incomplete) list of BTS model-specific features and report
them in response to attribute request via OML.
Change-Id: I5f8a6681c3562ec261441e84dde6e085b516d92f
Related: OS#1614
-rw-r--r-- | src/common/oml.c | 9 | ||||
-rw-r--r-- | src/osmo-bts-litecell15/main.c | 4 | ||||
-rw-r--r-- | src/osmo-bts-octphy/l1_if.c | 3 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/main.c | 5 | ||||
-rw-r--r-- | src/osmo-bts-trx/main.c | 3 |
5 files changed, 24 insertions, 0 deletions
diff --git a/src/common/oml.c b/src/common/oml.c index f97823d4..982713e6 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -163,6 +163,12 @@ static inline void add_bts_attrs(struct msgb *msg, const struct gsm_bts *bts) abis_nm_put_sw_file(msg, btsatttr2str(BTS_SUB_MODEL), bts->sub_model, true); } +/* Add BTS features as 3GPP TS 52.021 ยง9.4.30 Manufacturer Id */ +static inline void add_bts_feat(struct msgb *msg, const struct gsm_bts *bts) +{ + msgb_tl16v_put(msg, NM_ATT_MANUF_ID, _NUM_BTS_FEAT/8 + 1, bts->_features_data); +} + static inline void add_trx_attr(struct msgb *msg, struct gsm_bts_trx *trx) { const struct phy_instance *pinst = trx_phy_instance(trx); @@ -236,6 +242,9 @@ static inline int handle_attrs_bts(uint8_t *out, const struct gsm_bts *bts, cons case NM_ATT_SW_CONFIG: add_bts_attrs(attr_buf, bts); break; + case NM_ATT_MANUF_ID: + add_bts_feat(attr_buf, bts); + break; default: LOGP(DOML, LOGL_ERROR, "O&M Get Attributes [%u], %s is unsupported by BTS.\n", i, get_value_string(abis_nm_att_names, attr[i])); diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c index ab139811..97b53593 100644 --- a/src/osmo-bts-litecell15/main.c +++ b/src/osmo-bts-litecell15/main.c @@ -91,6 +91,10 @@ int bts_model_init(struct gsm_bts *bts) exit(23); } + gsm_bts_set_feature(bts, BTS_FEAT_GPRS); + gsm_bts_set_feature(bts, BTS_FEAT_OML_ALERTS); + gsm_bts_set_feature(bts, BTS_FEAT_AGCH_PCH_PROP); + bts_model_vty_init(bts); return 0; diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index 042ecc33..85b5a86f 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -782,6 +782,9 @@ int bts_model_init(struct gsm_bts *bts) /* FIXME: what is the nominal transmit power of the PHY/board? */ bts->c0->nominal_power = 15; + gsm_bts_set_feature(bts, BTS_FEAT_GPRS); + gsm_bts_set_feature(bts, BTS_FEAT_OML_ALERTS); + bts_model_vty_init(bts); return 0; diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index 547d084a..a8b7b504 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -78,6 +78,11 @@ int bts_model_init(struct gsm_bts *bts) exit(23); } + gsm_bts_set_feature(bts, BTS_FEAT_GPRS); + gsm_bts_set_feature(bts, BTS_FEAT_EGPRS); + gsm_bts_set_feature(bts, BTS_FEAT_OML_ALERTS); + gsm_bts_set_feature(bts, BTS_FEAT_AGCH_PCH_PROP); + bts_model_vty_init(bts); return 0; diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index b2cbb39e..da3dc608 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -106,6 +106,9 @@ int bts_model_init(struct gsm_bts *bts) * value */ bts->c0->nominal_power = 23; + gsm_bts_set_feature(bts, BTS_FEAT_GPRS); + gsm_bts_set_feature(bts, BTS_FEAT_OML_ALERTS); + bts_model_vty_init(bts); return 0; |