osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27952 )
Change subject: bts_model_*_start: move set_feature calls to _init ......................................................................
bts_model_*_start: move set_feature calls to _init
With previous patch Idf2d933aa8b03b1f708e56a08707fe6c620a97aa, the features get copied from the BTS model to the BTS. For rbs2000, bs11 and nokia_site, an empty feature set was copied because the features weren't set at this point. Fix this by moving the set_feature calls to _init().
Notably the set_feature calls had been moved for osmo-bts and nanobts from _start to _init already in 2013 in the patch e84dd98d ("sysmobts: Avoid a crash when trying to look-up a BTS").
Fixes: 2d818b9f ("Always use reported features if available") Related: SYS#5922, OS#5538 Change-Id: I43389ae48d5e0f01381602751f6bad902011b158 --- M src/osmo-bsc/bts_ericsson_rbs2000.c M src/osmo-bsc/bts_nokia_site.c M src/osmo-bsc/bts_siemens_bs11.c 3 files changed, 22 insertions(+), 23 deletions(-)
Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/src/osmo-bsc/bts_ericsson_rbs2000.c b/src/osmo-bsc/bts_ericsson_rbs2000.c index b3d79b4..36b3783 100644 --- a/src/osmo-bsc/bts_ericsson_rbs2000.c +++ b/src/osmo-bsc/bts_ericsson_rbs2000.c @@ -213,6 +213,14 @@
static int bts_model_rbs2k_start(struct gsm_network *net) { + osmo_signal_register_handler(SS_L_INPUT, inp_sig_cb, NULL); + osmo_signal_register_handler(SS_L_GLOBAL, gbl_sig_cb, NULL); + + return 0; +} + +int bts_model_rbs2k_init(void) +{ model_rbs2k.features.data = &model_rbs2k._features_data[0]; model_rbs2k.features.data_len = sizeof(model_rbs2k._features_data);
@@ -222,13 +230,5 @@ osmo_bts_set_feature(&model_rbs2k.features, BTS_FEAT_HSCSD); osmo_bts_set_feature(&model_rbs2k.features, BTS_FEAT_MULTI_TSC);
- osmo_signal_register_handler(SS_L_INPUT, inp_sig_cb, NULL); - osmo_signal_register_handler(SS_L_GLOBAL, gbl_sig_cb, NULL); - - return 0; -} - -int bts_model_rbs2k_init(void) -{ return gsm_bts_model_register(&model_rbs2k); } diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c index 75ffa95..e20519a 100644 --- a/src/osmo-bsc/bts_nokia_site.c +++ b/src/osmo-bsc/bts_nokia_site.c @@ -1759,14 +1759,6 @@
static int bts_model_nokia_site_start(struct gsm_network *net) { - model_nokia_site.features.data = &model_nokia_site._features_data[0]; - model_nokia_site.features.data_len = - sizeof(model_nokia_site._features_data); - - osmo_bts_set_feature(&model_nokia_site.features, BTS_FEAT_HOPPING); - osmo_bts_set_feature(&model_nokia_site.features, BTS_FEAT_HSCSD); - osmo_bts_set_feature(&model_nokia_site.features, BTS_FEAT_MULTI_TSC); - osmo_signal_register_handler(SS_L_INPUT, inp_sig_cb, NULL); osmo_signal_register_handler(SS_L_GLOBAL, gbl_sig_cb, NULL); osmo_signal_register_handler(SS_NM, nm_sig_cb, NULL); @@ -1778,5 +1770,12 @@
int bts_model_nokia_site_init(void) { + model_nokia_site.features.data = &model_nokia_site._features_data[0]; + model_nokia_site.features.data_len = sizeof(model_nokia_site._features_data); + + osmo_bts_set_feature(&model_nokia_site.features, BTS_FEAT_HOPPING); + osmo_bts_set_feature(&model_nokia_site.features, BTS_FEAT_HSCSD); + osmo_bts_set_feature(&model_nokia_site.features, BTS_FEAT_MULTI_TSC); + return gsm_bts_model_register(&model_nokia_site); } diff --git a/src/osmo-bsc/bts_siemens_bs11.c b/src/osmo-bsc/bts_siemens_bs11.c index 818d84a..ed2c4c3 100644 --- a/src/osmo-bsc/bts_siemens_bs11.c +++ b/src/osmo-bsc/bts_siemens_bs11.c @@ -604,13 +604,6 @@
static int bts_model_bs11_start(struct gsm_network *net) { - model_bs11.features.data = &model_bs11._features_data[0]; - model_bs11.features.data_len = sizeof(model_bs11._features_data); - - osmo_bts_set_feature(&model_bs11.features, BTS_FEAT_HOPPING); - osmo_bts_set_feature(&model_bs11.features, BTS_FEAT_HSCSD); - osmo_bts_set_feature(&model_bs11.features, BTS_FEAT_MULTI_TSC); - osmo_signal_register_handler(SS_L_INPUT, inp_sig_cb, NULL); osmo_signal_register_handler(SS_L_GLOBAL, gbl_sig_cb, NULL);
@@ -619,5 +612,12 @@
int bts_model_bs11_init(void) { + model_bs11.features.data = &model_bs11._features_data[0]; + model_bs11.features.data_len = sizeof(model_bs11._features_data); + + osmo_bts_set_feature(&model_bs11.features, BTS_FEAT_HOPPING); + osmo_bts_set_feature(&model_bs11.features, BTS_FEAT_HSCSD); + osmo_bts_set_feature(&model_bs11.features, BTS_FEAT_MULTI_TSC); + return gsm_bts_model_register(&model_bs11); }
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.