aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/bts_ericsson_rbs2000.c6
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts.c6
-rw-r--r--src/osmo-bsc/timeslot_fsm.c10
3 files changed, 6 insertions, 16 deletions
diff --git a/src/osmo-bsc/bts_ericsson_rbs2000.c b/src/osmo-bsc/bts_ericsson_rbs2000.c
index c2975f4c6..ed3db939a 100644
--- a/src/osmo-bsc/bts_ericsson_rbs2000.c
+++ b/src/osmo-bsc/bts_ericsson_rbs2000.c
@@ -175,17 +175,11 @@ static void bts_model_rbs2k_e1line_bind_ops(struct e1inp_line *line)
e1inp_line_bind_ops(line, &bts_isdn_e1inp_line_ops);
}
-static bool bts_model_rbs2k_is_ts_ready(const struct gsm_bts_trx_ts *ts)
-{
- return ts && ts->mo.nm_state.operational == NM_OPSTATE_ENABLED;
-}
-
static struct gsm_bts_model model_rbs2k = {
.type = GSM_BTS_TYPE_RBS2000,
.name = "rbs2000",
.start = bts_model_rbs2k_start,
.oml_rcvmsg = &abis_om2k_rcvmsg,
- .oml_is_ts_ready = bts_model_rbs2k_is_ts_ready,
.config_write_bts = &config_write_bts,
.e1line_bind_ops = &bts_model_rbs2k_e1line_bind_ops,
};
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 6b6e26550..80f7c9c6d 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -55,18 +55,12 @@ static char *get_oml_status(const struct gsm_bts *bts)
return "disconnected";
}
-static bool oml_is_ts_ready(const struct gsm_bts_trx_ts *ts)
-{
- return ts && ts->mo.nm_state.operational == NM_OPSTATE_ENABLED;
-}
-
struct gsm_bts_model bts_model_nanobts = {
.type = GSM_BTS_TYPE_NANOBTS,
.name = "nanobts",
.start = bts_model_nanobts_start,
.oml_rcvmsg = &abis_nm_rcvmsg,
.oml_status = &get_oml_status,
- .oml_is_ts_ready = oml_is_ts_ready,
.e1line_bind_ops = bts_model_nanobts_e1line_bind_ops,
.nm_att_tlvdef = {
.def = {
diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c
index 84d80f8f8..245ce76f7 100644
--- a/src/osmo-bsc/timeslot_fsm.c
+++ b/src/osmo-bsc/timeslot_fsm.c
@@ -220,13 +220,13 @@ static void ts_setup_lchans(struct gsm_bts_trx_ts *ts)
static void ts_fsm_not_initialized(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct gsm_bts_trx_ts *ts = ts_fi_ts(fi);
- struct gsm_bts *bts = ts->trx->bts;
switch (event) {
case TS_EV_OML_READY:
ts->pdch_act_allowed = true;
+ ts->is_oml_ready = true;
ts_setup_lchans(ts);
- if (!ts->trx->rsl_link) {
+ if (!ts->is_rsl_ready) {
LOG_TS(ts, LOGL_DEBUG, "No RSL link yet\n");
return;
}
@@ -235,8 +235,8 @@ static void ts_fsm_not_initialized(struct osmo_fsm_inst *fi, uint32_t event, voi
case TS_EV_RSL_READY:
ts->pdch_act_allowed = true;
- if (bts->model->oml_is_ts_ready
- && !bts->model->oml_is_ts_ready(ts)) {
+ ts->is_rsl_ready = true;
+ if (!ts->is_oml_ready) {
LOG_TS(ts, LOGL_DEBUG, "OML not ready yet\n");
return;
}
@@ -680,6 +680,7 @@ static void ts_fsm_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data
struct gsm_bts_trx_ts *ts = ts_fi_ts(fi);
switch (event) {
case TS_EV_OML_DOWN:
+ ts->is_oml_ready = false;
if (fi->state != TS_ST_NOT_INITIALIZED)
osmo_fsm_inst_state_chg(fi, TS_ST_NOT_INITIALIZED, 0, 0);
OSMO_ASSERT(fi->state == TS_ST_NOT_INITIALIZED);
@@ -689,6 +690,7 @@ static void ts_fsm_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data
break;
case TS_EV_RSL_DOWN:
+ ts->is_rsl_ready = false;
if (fi->state != TS_ST_NOT_INITIALIZED)
osmo_fsm_inst_state_chg(fi, TS_ST_NOT_INITIALIZED, 0, 0);
OSMO_ASSERT(fi->state == TS_ST_NOT_INITIALIZED);