This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/18591 ) Change subject: Do not mix public and private BTS features, use libosmocore's API ...................................................................... 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 definitions of the "public" features, - use libosmocore's API for the "public" features, - keep the "internal" features in a local header, - raname the "internal" features to reflect their nature, - separate both "public" and "local" feature vectors. As a bonus, let's allocate the feature vectors using libosmocore's bitvec API instead of doing this manually in gsm_bts_alloc(). Change-Id: Icf792d02323bb73e3b8d46384c7890cb1eb4731e --- M include/osmo-bts/gsm_data_shared.h M src/common/bts.c M src/common/gsm_data_shared.c M src/common/l1sap.c M src/common/oml.c M src/common/vty.c M src/osmo-bts-litecell15/main.c M src/osmo-bts-oc2g/main.c M src/osmo-bts-octphy/l1_if.c M src/osmo-bts-sysmo/main.c M src/osmo-bts-trx/main.c M src/osmo-bts-virtual/main.c M tests/misc/misc_test.c 13 files changed, 116 insertions(+), 124 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/91/18591/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 53a6d7a..b7215b5 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -15,6 +15,7 @@ #include <osmocom/gsm/rxlev_stat.h> #include <osmocom/gsm/sysinfo.h> #include <osmocom/gsm/meas_rep.h> +#include <osmocom/gsm/bts_features.h> #include <osmocom/gsm/gsm48_rest_octets.h> #include <osmocom/gsm/protocol/gsm_04_08.h> #include <osmocom/gsm/protocol/gsm_08_58.h> @@ -57,8 +58,6 @@ #define MAX_VERSION_LENGTH 64 -#define MAX_BTS_FEATURES 128 - enum gsm_hooks { GSM_HOOK_NM_SWLOAD, GSM_HOOK_RR_PAGING, @@ -459,35 +458,18 @@ struct vty; -/* N. B: always add new features to the end of the list (right before _NUM_BTS_FEAT) to avoid breaking compatibility - with BTS compiled against earlier version of this header. Also make sure that the description strings - gsm_bts_features_descs[] in gsm_data_shared.c are also updated accordingly! */ -enum gsm_bts_features { - BTS_FEAT_HSCSD, - BTS_FEAT_GPRS, - BTS_FEAT_EGPRS, - BTS_FEAT_ECSD, - BTS_FEAT_HOPPING, - BTS_FEAT_MULTI_TSC, - BTS_FEAT_OML_ALERTS, - BTS_FEAT_AGCH_PCH_PROP, - BTS_FEAT_CBCH, - BTS_FEAT_SPEECH_F_V1, - BTS_FEAT_SPEECH_H_V1, - BTS_FEAT_SPEECH_F_EFR, - BTS_FEAT_SPEECH_F_AMR, - BTS_FEAT_SPEECH_H_AMR, - BTS_FEAT_ETWS_PN, - BTS_FEAT_MS_PWR_CTRL_DSP, +/* Private BTS features (internal use, not exposed via OML) */ +enum bts_priv_feat { + BTS_PRIV_FEAT_MS_PWR_CTRL_DSP, /* When the feature is set then the measurement data is included in * (PRIM_PH_DATA) and struct ph_tch_param (PRIM_TCH). Otherwise the * measurement data is passed using a separate MPH INFO MEAS IND. * (See also ticket: OS#2977) */ - BTS_FEAT_MEAS_PAYLOAD_COMB, - _NUM_BTS_FEAT + BTS_PRIV_FEAT_MEAS_PAYLOAD_COMB, + _NUM_BTS_PRIV_FEAT }; -extern const struct value_string gsm_bts_features_descs[]; +extern const struct value_string bts_priv_feat_desc[]; struct gsm_bts_gprs_nsvc { struct gsm_bts *bts; @@ -580,8 +562,9 @@ char sub_model[MAX_VERSION_LENGTH]; /* features of a given BTS set/reported via OML */ - struct bitvec features; - uint8_t _features_data[MAX_BTS_FEATURES/8]; + struct bitvec *features; + /* private features of a given BTS (not exposed via OML) */ + struct bitvec *priv_features; /* Connected PCU version (if any) */ char pcu_version[MAX_VERSION_LENGTH]; @@ -816,16 +799,16 @@ return lchan->name; } -static inline int gsm_bts_set_feature(struct gsm_bts *bts, enum gsm_bts_features feat) +static inline int bts_set_priv_feature(struct gsm_bts *bts, enum bts_priv_feat feat) { - OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES); - return bitvec_set_bit_pos(&bts->features, feat, 1); + OSMO_ASSERT(_NUM_BTS_PRIV_FEAT < MAX_BTS_FEATURES); + return bitvec_set_bit_pos(bts->priv_features, feat, 1); } -static inline bool gsm_bts_has_feature(const struct gsm_bts *bts, enum gsm_bts_features feat) +static inline bool bts_has_priv_feature(const struct gsm_bts *bts, enum bts_priv_feat feat) { - OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES); - return bitvec_get_bit_pos(&bts->features, feat); + OSMO_ASSERT(_NUM_BTS_PRIV_FEAT < MAX_BTS_FEATURES); + return bitvec_get_bit_pos(bts->priv_features, feat); } void gsm_abis_mo_reset(struct gsm_abis_mo *mo); diff --git a/src/common/bts.c b/src/common/bts.c index 2200615..fcc4573 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -194,7 +194,7 @@ 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 @@ 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_has_priv_feature(trx->bts, BTS_PRIV_FEAT_MS_PWR_CTRL_DSP)) trx->ms_pwr_ctl_soft = true; rc = bts_model_trx_init(trx); @@ -796,7 +796,7 @@ 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. */ @@ -844,7 +844,7 @@ } /* 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; diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c index c4a60b5..767b5fa 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -92,24 +92,9 @@ return get_value_string(osmo_bts_variant_names, v); } -const struct value_string gsm_bts_features_descs[] = { - { BTS_FEAT_HSCSD, "HSCSD" }, - { BTS_FEAT_GPRS, "GPRS" }, - { BTS_FEAT_EGPRS, "EGPRS" }, - { BTS_FEAT_ECSD, "ECSD" }, - { BTS_FEAT_HOPPING, "Frequency Hopping" }, - { BTS_FEAT_MULTI_TSC, "Multi-TSC" }, - { BTS_FEAT_OML_ALERTS, "OML Alerts" }, - { BTS_FEAT_AGCH_PCH_PROP, "AGCH/PCH proportional allocation" }, - { BTS_FEAT_CBCH, "CBCH" }, - { BTS_FEAT_SPEECH_F_V1, "Fullrate speech V1" }, - { BTS_FEAT_SPEECH_H_V1, "Halfrate speech V1" }, - { BTS_FEAT_SPEECH_F_EFR, "Fullrate speech EFR" }, - { BTS_FEAT_SPEECH_F_AMR, "Fullrate speech AMR" }, - { BTS_FEAT_SPEECH_H_AMR, "Halfrate speech AMR" }, - { BTS_FEAT_ETWS_PN, "ETWS Primary Notification on PCH" }, - { BTS_FEAT_MS_PWR_CTRL_DSP, "DSP/HW based MS Power Control Loop" }, - { BTS_FEAT_MEAS_PAYLOAD_COMB, "Measurement and Payload data combined"}, +const struct value_string bts_priv_feat_desc[] = { + { BTS_PRIV_FEAT_MS_PWR_CTRL_DSP, "DSP/HW based MS Power Control Loop" }, + { BTS_PRIV_FEAT_MEAS_PAYLOAD_COMB, "Measurement and Payload data combined" }, { 0, NULL } }; @@ -348,8 +333,14 @@ bts->rach_b_thresh = -1; bts->rach_ldavg_slots = -1; - bts->features.data = &bts->_features_data[0]; - bts->features.data_len = sizeof(bts->_features_data); + + /* public features (exposed via OML) */ + bts->features = bitvec_alloc(MAX_BTS_FEATURES / 8, bts); + OSMO_ASSERT(bts->features != NULL); + + /* private features (internal use) */ + bts->priv_features = bitvec_alloc(MAX_BTS_FEATURES / 8, bts); + OSMO_ASSERT(bts->priv_features != NULL); /* si handling */ bts->bcch_change_mark = 1; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 99aa11b..32a53bc 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -757,8 +757,8 @@ break; case PRIM_INFO_MEAS: /* We should never get an INFO_IND with PRIM_INFO_MEAS - * when BTS_FEAT_MEAS_PAYLOAD_COMB is enabled */ - if (gsm_bts_has_feature(trx->bts, BTS_FEAT_MEAS_PAYLOAD_COMB)) + * when BTS_PRIV_FEAT_MEAS_PAYLOAD_COMB is enabled */ + if (bts_has_priv_feature(trx->bts, BTS_PRIV_FEAT_MEAS_PAYLOAD_COMB)) OSMO_ASSERT(false); process_l1sap_meas_data(trx, l1sap, PRIM_MPH_INFO); @@ -1279,7 +1279,7 @@ /* The ph_data_param contained in the l1sap primitive may contain * measurement data. If this data is present, forward it for * processing */ - if (gsm_bts_has_feature(trx->bts, BTS_FEAT_MEAS_PAYLOAD_COMB)) + if (bts_has_priv_feature(trx->bts, BTS_PRIV_FEAT_MEAS_PAYLOAD_COMB)) process_l1sap_meas_data(trx, l1sap, PRIM_PH_DATA); if (ts_is_pdch(&trx->ts[tn])) { @@ -1399,7 +1399,7 @@ /* The ph_tch_param contained in the l1sap primitive may contain * measurement data. If this data is present, forward it for * processing */ - if (gsm_bts_has_feature(trx->bts, BTS_FEAT_MEAS_PAYLOAD_COMB)) + if (bts_has_priv_feature(trx->bts, BTS_PRIV_FEAT_MEAS_PAYLOAD_COMB)) process_l1sap_meas_data(trx, l1sap, PRIM_TCH); msgb_pull_to_l2(msg); diff --git a/src/common/oml.c b/src/common/oml.c index 7e3b834..077ef09 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -173,7 +173,7 @@ /* 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); + 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, const struct gsm_bts_trx *trx) diff --git a/src/common/vty.c b/src/common/vty.c index c2cbeb5..ee711b9 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -764,7 +764,7 @@ struct gsm_bts_trx *trx = vty->index; bool soft = !strcmp(argv[0], "osmo"); - if (!soft && !gsm_bts_has_feature(trx->bts, BTS_FEAT_MS_PWR_CTRL_DSP)) { + if (!soft && !bts_has_priv_feature(trx->bts, BTS_PRIV_FEAT_MS_PWR_CTRL_DSP)) { /* NOTE: osmo-bts-trx used to have its own (low-level) MS Power Control loop, which * has been ripped out in favour of the common implementation. Configuration files * may still contain 'dsp', so let's be tolerant and override 'dsp' by 'osmo'. */ @@ -825,13 +825,27 @@ static void bts_dump_vty_features(struct vty *vty, struct gsm_bts *bts) { unsigned int i; - bool no_features = true; + bool no_features; + vty_out(vty, " Features:%s", VTY_NEWLINE); - for (i = 0; i < _NUM_BTS_FEAT; i++) { - if (gsm_bts_has_feature(bts, i)) { + for (i = 0, no_features = true; i < _NUM_BTS_FEAT; i++) { + if (osmo_bts_has_feature(bts->features, i)) { vty_out(vty, " %03u ", i); - vty_out(vty, "%-40s%s", get_value_string(gsm_bts_features_descs, i), VTY_NEWLINE); + vty_out(vty, "%-40s%s", osmo_bts_feature_name(i), VTY_NEWLINE); + no_features = false; + } + } + + if (no_features) + vty_out(vty, " (not available)%s", VTY_NEWLINE); + + vty_out(vty, " Internal features:%s", VTY_NEWLINE); + + for (i = 0, no_features = true; i < _NUM_BTS_PRIV_FEAT; i++) { + if (bts_has_priv_feature(bts, i)) { + vty_out(vty, " %03u ", i); + vty_out(vty, "%-40s%s", get_value_string(bts_priv_feat_desc, i), VTY_NEWLINE); no_features = false; } } diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c index ef02135..33cbee9 100644 --- a/src/osmo-bts-litecell15/main.c +++ b/src/osmo-bts-litecell15/main.c @@ -110,16 +110,17 @@ 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); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); + osmo_bts_set_feature(bts->features, BTS_FEAT_GPRS); + osmo_bts_set_feature(bts->features, BTS_FEAT_EGPRS); + osmo_bts_set_feature(bts->features, BTS_FEAT_OML_ALERTS); + osmo_bts_set_feature(bts->features, BTS_FEAT_AGCH_PCH_PROP); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_EFR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_AMR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_AMR); + + bts_set_priv_feature(bts, BTS_PRIV_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c index f9bb0cb..849f262 100644 --- a/src/osmo-bts-oc2g/main.c +++ b/src/osmo-bts-oc2g/main.c @@ -111,16 +111,17 @@ 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); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); + osmo_bts_set_feature(bts->features, BTS_FEAT_GPRS); + osmo_bts_set_feature(bts->features, BTS_FEAT_EGPRS); + osmo_bts_set_feature(bts->features, BTS_FEAT_OML_ALERTS); + osmo_bts_set_feature(bts->features, BTS_FEAT_AGCH_PCH_PROP); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_EFR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_AMR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_AMR); + + bts_set_priv_feature(bts, BTS_PRIV_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index fb62f8b..0adc8fe 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -779,13 +779,13 @@ /* 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); + osmo_bts_set_feature(bts->features, BTS_FEAT_GPRS); + osmo_bts_set_feature(bts->features, BTS_FEAT_OML_ALERTS); #if defined(cOCTVC1_GSM_LOGICAL_CHANNEL_COMBINATION_ENUM_FCCH_SCH_BCCH_CCCH_SDCCH4_CBCH_SACCHC4) && defined(cOCTVC1_GSM_LOGICAL_CHANNEL_COMBINATION_ENUM_SDCCH8_CBCH_SACCHC8) - gsm_bts_set_feature(bts, BTS_FEAT_CBCH); + osmo_bts_set_feature(bts->features, BTS_FEAT_CBCH); #endif - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_V1); bts_model_vty_init(bts); diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index 44c6d5d..06891a2 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -76,18 +76,19 @@ exit(23); } - gsm_bts_set_feature(bts, BTS_FEAT_CBCH); - 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); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); - gsm_bts_set_feature(bts, BTS_FEAT_MEAS_PAYLOAD_COMB); + osmo_bts_set_feature(bts->features, BTS_FEAT_CBCH); + osmo_bts_set_feature(bts->features, BTS_FEAT_GPRS); + osmo_bts_set_feature(bts->features, BTS_FEAT_EGPRS); + osmo_bts_set_feature(bts->features, BTS_FEAT_OML_ALERTS); + osmo_bts_set_feature(bts->features, BTS_FEAT_AGCH_PCH_PROP); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_EFR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_AMR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_AMR); + + bts_set_priv_feature(bts, BTS_PRIV_FEAT_MS_PWR_CTRL_DSP); + bts_set_priv_feature(bts, BTS_PRIV_FEAT_MEAS_PAYLOAD_COMB); bts_model_vty_init(bts); diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index ab0472e..112f405 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -108,15 +108,16 @@ * value */ bts->c0->nominal_power = 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_SPEECH_F_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_CBCH); - gsm_bts_set_feature(bts, BTS_FEAT_MEAS_PAYLOAD_COMB); + osmo_bts_set_feature(bts->features, BTS_FEAT_GPRS); + osmo_bts_set_feature(bts->features, BTS_FEAT_OML_ALERTS); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_EFR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_AMR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_AMR); + osmo_bts_set_feature(bts->features, BTS_FEAT_CBCH); + + bts_set_priv_feature(bts, BTS_PRIV_FEAT_MEAS_PAYLOAD_COMB); bts_model_vty_init(bts); diff --git a/src/osmo-bts-virtual/main.c b/src/osmo-bts-virtual/main.c index a6fc290..fb5d357 100644 --- a/src/osmo-bts-virtual/main.c +++ b/src/osmo-bts-virtual/main.c @@ -62,13 +62,13 @@ bts->variant = BTS_OSMO_VIRTUAL; bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3); - gsm_bts_set_feature(bts, BTS_FEAT_OML_ALERTS); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_CBCH); + osmo_bts_set_feature(bts->features, BTS_FEAT_OML_ALERTS); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_EFR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_AMR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_AMR); + osmo_bts_set_feature(bts->features, BTS_FEAT_CBCH); bts_model_vty_init(bts); diff --git a/tests/misc/misc_test.c b/tests/misc/misc_test.c index c4d3a59..439d6b3 100644 --- a/tests/misc/misc_test.c +++ b/tests/misc/misc_test.c @@ -166,10 +166,10 @@ bts = gsm_bts_alloc(ctx, 0); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_V1); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); - gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_V1); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_AMR); + osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_AMR); OSMO_ASSERT(bts_supports_cm (bts, GSM_PCHAN_TCH_F, GSM48_CMODE_SPEECH_V1) == 1); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18591 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Icf792d02323bb73e3b8d46384c7890cb1eb4731e Gerrit-Change-Number: 18591 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <axilirator at gmail.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200529/f5769c74/attachment.htm>