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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26186 ) Change subject: osmo_bsc_main: move inp_sig_cb() below check_bts and bootstrap_bts ...................................................................... osmo_bsc_main: move inp_sig_cb() below check_bts and bootstrap_bts In order to be able to call check_bts() and bootstrap_bts() from inp_sig_cb(), we must move it below bootstrap_bts. Change-Id: I1a365bc2278368ec1f5c0db3f3e466b124b16e83 Related: SYS#5369 --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 47 insertions(+), 47 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 11db260..fae2ef2 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -389,53 +389,6 @@ osmo_timer_schedule(&update_connection_stats_timer, 1, 0); } -/* Callback function to be called every time we receive a signal from INPUT */ -static int inp_sig_cb(unsigned int subsys, unsigned int signal, - void *handler_data, void *signal_data) -{ - struct input_signal_data *isd = signal_data; - struct gsm_bts_trx *trx = isd->trx; - - if (subsys != SS_L_INPUT) - return -EINVAL; - - LOGP(DLMI, LOGL_DEBUG, "%s(): Input signal '%s' received\n", __func__, - get_value_string(e1inp_signal_names, signal)); - switch (signal) { - case S_L_INP_TEI_UP: - if (isd->link_type == E1INP_SIGN_OML) { - /* Generate Mobile Allocation bit-masks for all timeslots. - * This needs to be done here, because it's used for TS configuration. */ - generate_ma_for_bts(trx->bts); - } - if (isd->link_type == E1INP_SIGN_RSL) - bootstrap_rsl(trx); - break; - case S_L_INP_TEI_DN: - LOG_TRX(trx, DLMI, LOGL_ERROR, "Lost E1 %s link\n", e1inp_signtype_name(isd->link_type)); - - if (isd->link_type == E1INP_SIGN_OML) { - rate_ctr_inc(rate_ctr_group_get_ctr(trx->bts->bts_ctrs, BTS_CTR_BTS_OML_FAIL)); - all_ts_dispatch_event(trx, TS_EV_OML_DOWN); - } else if (isd->link_type == E1INP_SIGN_RSL) { - rate_ctr_inc(rate_ctr_group_get_ctr(trx->bts->bts_ctrs, BTS_CTR_BTS_RSL_FAIL)); - acc_ramp_abort(&trx->bts->acc_ramp); - all_ts_dispatch_event(trx, TS_EV_RSL_DOWN); - if (trx->nr == 0) - osmo_timer_del(&trx->bts->cbch_timer); - } - - gsm_bts_sm_mo_reset(trx->bts->site_mgr); - - abis_nm_clear_queue(trx->bts); - break; - default: - break; - } - - return 0; -} - static int check_bts(struct gsm_bts *bts) { struct gsm_bts_trx *trx; @@ -518,6 +471,53 @@ gsm_bts_sm_mo_reset(bts->site_mgr); } +/* Callback function to be called every time we receive a signal from INPUT */ +static int inp_sig_cb(unsigned int subsys, unsigned int signal, + void *handler_data, void *signal_data) +{ + struct input_signal_data *isd = signal_data; + struct gsm_bts_trx *trx = isd->trx; + + if (subsys != SS_L_INPUT) + return -EINVAL; + + LOGP(DLMI, LOGL_DEBUG, "%s(): Input signal '%s' received\n", __func__, + get_value_string(e1inp_signal_names, signal)); + switch (signal) { + case S_L_INP_TEI_UP: + if (isd->link_type == E1INP_SIGN_OML) { + /* Generate Mobile Allocation bit-masks for all timeslots. + * This needs to be done here, because it's used for TS configuration. */ + generate_ma_for_bts(trx->bts); + } + if (isd->link_type == E1INP_SIGN_RSL) + bootstrap_rsl(trx); + break; + case S_L_INP_TEI_DN: + LOG_TRX(trx, DLMI, LOGL_ERROR, "Lost E1 %s link\n", e1inp_signtype_name(isd->link_type)); + + if (isd->link_type == E1INP_SIGN_OML) { + rate_ctr_inc(rate_ctr_group_get_ctr(trx->bts->bts_ctrs, BTS_CTR_BTS_OML_FAIL)); + all_ts_dispatch_event(trx, TS_EV_OML_DOWN); + } else if (isd->link_type == E1INP_SIGN_RSL) { + rate_ctr_inc(rate_ctr_group_get_ctr(trx->bts->bts_ctrs, BTS_CTR_BTS_RSL_FAIL)); + acc_ramp_abort(&trx->bts->acc_ramp); + all_ts_dispatch_event(trx, TS_EV_RSL_DOWN); + if (trx->nr == 0) + osmo_timer_del(&trx->bts->cbch_timer); + } + + gsm_bts_sm_mo_reset(trx->bts->site_mgr); + + abis_nm_clear_queue(trx->bts); + break; + default: + break; + } + + return 0; +} + static int bsc_network_configure(const char *config_file) { struct gsm_bts *bts; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I1a365bc2278368ec1f5c0db3f3e466b124b16e83 Gerrit-Change-Number: 26186 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy 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/20211110/7b3bcd56/attachment.htm>