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 submitted this change. ( 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 definition of the "public" features, - use libosmocore's API for the "public" features, - separate both "internal" and "public" features: - the "public" features continue to live in bitvec, - the "internal" features become flags, - s/BTS_FEAT/BTS_INTERNAL_FLAG/g. 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/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 12 files changed, 110 insertions(+), 132 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index f3855f7..7cfbfeb 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -14,6 +14,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> @@ -38,8 +39,6 @@ #define MAX_VERSION_LENGTH 64 -#define MAX_BTS_FEATURES 128 - struct gsm_lchan; struct osmo_rtp_socket; struct pcu_sock_state; @@ -402,35 +401,21 @@ TRX_PHY_VERSION, }; -/* 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, - /* 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 implementation flags (internal use, not exposed via OML) */ +#define bts_internal_flag_get(bts, flag) \ + ((bts->flags & (typeof(bts->flags)) flag) != 0) +#define bts_internal_flag_set(bts, flag) \ + bts->flags |= (typeof(bts->flags)) flag -extern const struct value_string gsm_bts_features_descs[]; +/* TODO: add a brief description of this flag */ +#define BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP (1 << 0) +/* When this flag 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) */ +#define BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB (1 << 1) + +extern const struct value_string bts_impl_flag_desc[]; struct gsm_bts_gprs_nsvc { struct gsm_bts *bts; @@ -522,8 +507,10 @@ char version[MAX_VERSION_LENGTH]; char sub_model[MAX_VERSION_LENGTH]; - /* features of a given BTS set/reported via OML */ + /* public features of a given BTS (set/reported via OML) */ struct bitvec *features; + /* implementation flags of a given BTS (not exposed via OML) */ + uint16_t flags; /* Connected PCU version (if any) */ char pcu_version[MAX_VERSION_LENGTH]; @@ -740,18 +727,6 @@ return lchan->name; } -static inline int gsm_bts_set_feature(struct gsm_bts *bts, enum gsm_bts_features feat) -{ - OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES); - return bitvec_set_bit_pos(bts->features, feat, 1); -} - -static inline bool gsm_bts_has_feature(const struct gsm_bts *bts, enum gsm_bts_features feat) -{ - OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES); - return bitvec_get_bit_pos(bts->features, feat); -} - void gsm_abis_mo_reset(struct gsm_abis_mo *mo); struct gsm_abis_mo * diff --git a/src/common/bts.c b/src/common/bts.c index 9710a2c..d8a6ff2 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_internal_flag_get(trx->bts, BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP)) trx->ms_pwr_ctl_soft = true; rc = bts_model_trx_init(trx); @@ -797,7 +797,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. */ @@ -845,7 +845,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 e23b04b..c680001 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_impl_flag_desc[] = { + { BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP, "DSP/HW based MS Power Control Loop" }, + { BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB, "Measurement and Payload data combined" }, { 0, NULL } }; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 84d4859..dad1b49 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_INTERNAL_FLAG_MEAS_PAYLOAD_COMB is set */ + if (bts_internal_flag_get(trx->bts, BTS_INTERNAL_FLAG_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_internal_flag_get(trx->bts, BTS_INTERNAL_FLAG_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_internal_flag_get(trx->bts, BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB)) process_l1sap_meas_data(trx, l1sap, PRIM_TCH); msgb_pull_to_l2(msg); diff --git a/src/common/vty.c b/src/common/vty.c index 1d74b36..3dfd387 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -766,7 +766,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_internal_flag_get(trx->bts, BTS_INTERNAL_FLAG_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'. */ @@ -827,13 +827,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, " BTS model specific (internal) flags:%s", VTY_NEWLINE); + + for (i = 0, no_features = true; i < sizeof(bts->flags) * 8; i++) { + if (bts_internal_flag_get(bts, i)) { + vty_out(vty, " %03u ", i); + vty_out(vty, "%-40s%s", get_value_string(bts_impl_flag_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..b48d3ec 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_internal_flag_set(bts, BTS_INTERNAL_FLAG_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..a0f4d4a 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_internal_flag_set(bts, BTS_INTERNAL_FLAG_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..51a14c7 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_internal_flag_set(bts, BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP); + bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_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 3ccd597..bd3d0cb 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -110,16 +110,17 @@ * through TRXC. */ bts->c0->nominal_power = 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_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_EGPRS); + 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_internal_flag_set(bts, BTS_INTERNAL_FLAG_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: 8 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200610/4fd9de1a/attachment.htm>