aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-07-27 16:04:20 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-07-28 12:18:23 +0200
commit459113d810b24b36c8d3af74fd77b61f71aa27d7 (patch)
tree6bf0fa903e476a31d36b2d948020e10570c642a8 /src/osmo-bsc
parentbcdbfb740610bea2f1b51c5c331af5386a841393 (diff)
fix: dispatch TS_EV_RSL_DOWN when losing RSL
Noticed by ttcn3-bsc-test: after TC_ms_rel_ind_does_not_cause_bssmap_reset the test TC_dyn_pdch_ipa_act_deact would fail because RSL was still indicated as available, and only OML was properly signalled as down. Before recent commit I4843d03b3237cdcca0ad2041ef6895ff253d8419 to fix nanobts and use only flags for RSL and OML presence, the timeslot FSM actually checked RSL link presence and the lacking RSL DOWN event was not noticed. Change-Id: I66c7fc5fcc676f4960f3d089b8c2ae5bce37ed99
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r--src/osmo-bsc/osmo_bsc_main.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 218ea15a2..8dc90986e 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -309,13 +309,22 @@ static void bootstrap_rsl(struct gsm_bts_trx *trx)
}
}
+static void all_ts_dispatch_event(struct gsm_bts_trx *trx, uint32_t event)
+{
+ int ts_i;
+ for (ts_i = 0; ts_i < ARRAY_SIZE(trx->ts); ts_i++) {
+ struct gsm_bts_trx_ts *ts = &trx->ts[ts_i];
+ if (ts->fi)
+ osmo_fsm_inst_dispatch(ts->fi, event, 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;
- int ts_no;
/* N. B: we rely on attribute order when parsing response in abis_nm_rx_get_attr_resp() */
const uint8_t bts_attr[] = { NM_ATT_MANUF_ID, NM_ATT_SW_CONFIG, };
const uint8_t trx_attr[] = { NM_ATT_MANUF_STATE, NM_ATT_SW_CONFIG, };
@@ -360,22 +369,13 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal,
case S_L_INP_TEI_DN:
LOGP(DLMI, LOGL_ERROR, "Lost some E1 TEI link: %d %p\n", isd->link_type, trx);
- if (isd->link_type == E1INP_SIGN_OML)
+ if (isd->link_type == E1INP_SIGN_OML) {
rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_OML_FAIL]);
- else if (isd->link_type == E1INP_SIGN_RSL) {
+ all_ts_dispatch_event(trx, TS_EV_OML_DOWN);
+ } else if (isd->link_type == E1INP_SIGN_RSL) {
rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL]);
acc_ramp_abort(&trx->bts->acc_ramp);
- }
-
- /*
- * free all allocated channels. change the nm_state so the
- * trx and trx_ts becomes unusable and chan_alloc.c can not
- * allocate from it.
- */
- for (ts_no = 0; ts_no < ARRAY_SIZE(trx->ts); ++ts_no) {
- struct gsm_bts_trx_ts *ts = &trx->ts[ts_no];
- if (ts->fi)
- osmo_fsm_inst_dispatch(ts->fi, TS_EV_OML_DOWN, 0);
+ all_ts_dispatch_event(trx, TS_EV_RSL_DOWN);
}
gsm_bts_mo_reset(trx->bts);