summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-03-13 09:39:08 +0100
committerAlexander Couzens <lynxis@fe80.eu>2017-03-13 09:47:42 +0100
commit62e06a89a0074159383e1e8cc60d6ab89a87487d (patch)
tree2d00da0bb328ad3572b1af96925422eaca80cbc0
parent93f584aa8ad1c88879c495190799f97295f5db46 (diff)
OM2000: Change the order of MO initialization
So far: CF-IS-CON-TF Now: CF-TF-CON-IS Change-Id: I8efd9bafdcf9504d2e5fc85c44c708fa53f4dff8
-rw-r--r--openbsc/src/libbsc/abis_om2000.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index 62e8f6a..1fb7689 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -2157,18 +2157,19 @@ static void om2k_bts_s_wait_cf(struct osmo_fsm_inst *fi, uint32_t event, void *d
struct gsm_bts *bts = obfp->bts;
OSMO_ASSERT(event == OM2K_BTS_EVT_CF_DONE);
- osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_IS,
- BTS_FSM_TIMEOUT, 0);
- om2k_mo_fsm_start(fi, OM2K_BTS_EVT_IS_DONE, bts->c0,
- &bts->rbs2000.is.om2k_mo);
+ /* TF can take a long time to initialize, wait for 10min */
+ osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_TF, 600, 0);
+ om2k_mo_fsm_start(fi, OM2K_BTS_EVT_TF_DONE, bts->c0,
+ &bts->rbs2000.tf.om2k_mo);
}
-static void om2k_bts_s_wait_is(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+static void om2k_bts_s_wait_tf(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct om2k_bts_fsm_priv *obfp = fi->priv;
struct gsm_bts *bts = obfp->bts;
- OSMO_ASSERT(event == OM2K_BTS_EVT_IS_DONE);
+ OSMO_ASSERT(event == OM2K_BTS_EVT_TF_DONE);
+
osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_CON,
BTS_FSM_TIMEOUT, 0);
om2k_mo_fsm_start(fi, OM2K_BTS_EVT_CON_DONE, bts->c0,
@@ -2181,18 +2182,19 @@ static void om2k_bts_s_wait_con(struct osmo_fsm_inst *fi, uint32_t event, void *
struct gsm_bts *bts = obfp->bts;
OSMO_ASSERT(event == OM2K_BTS_EVT_CON_DONE);
- /* TF can take a long time to initialize, wait for 10min */
- osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_TF, 600, 0);
- om2k_mo_fsm_start(fi, OM2K_BTS_EVT_TF_DONE, bts->c0,
- &bts->rbs2000.tf.om2k_mo);
+
+ osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_IS,
+ BTS_FSM_TIMEOUT, 0);
+ om2k_mo_fsm_start(fi, OM2K_BTS_EVT_IS_DONE, bts->c0,
+ &bts->rbs2000.is.om2k_mo);
}
-static void om2k_bts_s_wait_tf(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+static void om2k_bts_s_wait_is(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct om2k_bts_fsm_priv *obfp = fi->priv;
struct gsm_bts_trx *trx;
- OSMO_ASSERT(event == OM2K_BTS_EVT_TF_DONE);
+ OSMO_ASSERT(event == OM2K_BTS_EVT_IS_DONE);
osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_TRX,
BTS_FSM_TIMEOUT, 0);
@@ -2231,30 +2233,30 @@ static const struct osmo_fsm_state om2k_bts_states[] = {
[OM2K_BTS_S_WAIT_CF] = {
.in_event_mask = S(OM2K_BTS_EVT_CF_DONE),
.out_state_mask = S(OM2K_BTS_S_ERROR) |
- S(OM2K_BTS_S_WAIT_IS),
+ S(OM2K_BTS_S_WAIT_TF),
.name = "WAIT-CF",
.action = om2k_bts_s_wait_cf,
},
- [OM2K_BTS_S_WAIT_IS] = {
- .in_event_mask = S(OM2K_BTS_EVT_IS_DONE),
+ [OM2K_BTS_S_WAIT_TF] = {
+ .in_event_mask = S(OM2K_BTS_EVT_TF_DONE),
.out_state_mask = S(OM2K_BTS_S_ERROR) |
S(OM2K_BTS_S_WAIT_CON),
- .name = "WAIT-IS",
- .action = om2k_bts_s_wait_is,
+ .name = "WAIT-TF",
+ .action = om2k_bts_s_wait_tf,
},
[OM2K_BTS_S_WAIT_CON] = {
.in_event_mask = S(OM2K_BTS_EVT_CON_DONE),
.out_state_mask = S(OM2K_BTS_S_ERROR) |
- S(OM2K_BTS_S_WAIT_TF),
+ S(OM2K_BTS_S_WAIT_IS),
.name = "WAIT-CON",
.action = om2k_bts_s_wait_con,
},
- [OM2K_BTS_S_WAIT_TF] = {
- .in_event_mask = S(OM2K_BTS_EVT_TF_DONE),
+ [OM2K_BTS_S_WAIT_IS] = {
+ .in_event_mask = S(OM2K_BTS_EVT_IS_DONE),
.out_state_mask = S(OM2K_BTS_S_ERROR) |
S(OM2K_BTS_S_WAIT_TRX),
- .name = "WAIT-TF",
- .action = om2k_bts_s_wait_tf,
+ .name = "WAIT-IS",
+ .action = om2k_bts_s_wait_is,
},
[OM2K_BTS_S_WAIT_TRX] = {
.in_event_mask = S(OM2K_BTS_EVT_TRX_DONE),