diff options
-rw-r--r-- | include/osmo-bts/gsm_data_shared.h | 61 | ||||
-rw-r--r-- | src/common/bts.c | 8 | ||||
-rw-r--r-- | src/common/gsm_data_shared.c | 21 | ||||
-rw-r--r-- | src/common/l1sap.c | 8 | ||||
-rw-r--r-- | src/common/vty.c | 24 | ||||
-rw-r--r-- | src/osmo-bts-litecell15/main.c | 21 | ||||
-rw-r--r-- | src/osmo-bts-oc2g/main.c | 21 | ||||
-rw-r--r-- | src/osmo-bts-octphy/l1_if.c | 10 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/main.c | 25 | ||||
-rw-r--r-- | src/osmo-bts-trx/main.c | 21 | ||||
-rw-r--r-- | src/osmo-bts-virtual/main.c | 14 | ||||
-rw-r--r-- | tests/misc/misc_test.c | 8 |
12 files changed, 110 insertions, 132 deletions
diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index f3855f7b..7cfbfeb2 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 @@ enum bts_attribute { 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 + +/* 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 gsm_bts_features_descs[]; +extern const struct value_string bts_impl_flag_desc[]; struct gsm_bts_gprs_nsvc { struct gsm_bts *bts; @@ -522,8 +507,10 @@ struct gsm_bts { 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 @@ static inline char *gsm_lchan_name(const struct gsm_lchan *lchan) 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 9710a2ce..d8a6ff28 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -194,7 +194,7 @@ int bts_init(struct gsm_bts *bts) 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 @@ int bts_trx_init(struct gsm_bts_trx *trx) 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 @@ struct gsm_time *get_time(struct gsm_bts *bts) 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 @@ int bts_supports_cm(struct gsm_bts *bts, enum gsm_phys_chan_config pchan, } /* 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 e23b04b3..c6800016 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -92,24 +92,9 @@ const char *btsvariant2str(enum gsm_bts_type_variant v) 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 84d4859d..dad1b494 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -757,8 +757,8 @@ static int l1sap_mph_info_ind(struct gsm_bts_trx *trx, 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 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx, /* 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 @@ static int l1sap_tch_ind(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap, /* 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 1d74b367..3dfd3878 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -766,7 +766,7 @@ DEFUN(cfg_trx_ms_power_control, cfg_trx_ms_power_control_cmd, 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 net_dump_nmstate(struct vty *vty, struct gsm_nm_state *nms) 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", 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(gsm_bts_features_descs, i), VTY_NEWLINE); + 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 ef021352..b48d3ecc 100644 --- a/src/osmo-bts-litecell15/main.c +++ b/src/osmo-bts-litecell15/main.c @@ -110,16 +110,17 @@ 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); - 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 f9bb0cb1..a0f4d4a8 100644 --- a/src/osmo-bts-oc2g/main.c +++ b/src/osmo-bts-oc2g/main.c @@ -111,16 +111,17 @@ 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); - 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 fb62f8b7..0adc8fee 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -779,13 +779,13 @@ 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); + 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 44c6d5d4..51a14c7d 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -76,18 +76,19 @@ int bts_model_init(struct gsm_bts *bts) 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 3ccd5976..bd3d0cb4 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -110,16 +110,17 @@ int bts_model_init(struct gsm_bts *bts) * 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 a6fc290f..fb5d3573 100644 --- a/src/osmo-bts-virtual/main.c +++ b/src/osmo-bts-virtual/main.c @@ -62,13 +62,13 @@ int bts_model_init(struct gsm_bts *bts) 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 c4d3a595..439d6b33 100644 --- a/tests/misc/misc_test.c +++ b/tests/misc/misc_test.c @@ -166,10 +166,10 @@ static void test_bts_supports_cm(void) 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); |