aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-04-03 13:16:06 +0200
committerlaforge <laforge@osmocom.org>2023-04-05 19:06:32 +0000
commit90b83f919509f1c0e62cf4f46d3e97f52286e1b4 (patch)
treed8bb4206cd2788e56686e236a63af92d8b1ad4f6
parent143dc67c9955e065468ee8a19881c2c7a3b6a919 (diff)
ipaccess nm: Delay marking TS as usable until OML reports Enabled state
The BTS can immediatelly ACK the OPSTART, but that doesn't mean the TS is already usable. It should only be used when the BTS reports it is in Enabled state. Related: OS#5973 Change-Id: I712aa22252d29ceea152c25a5da75542e1691faf
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts.c1
-rw-r--r--src/osmo-bsc/nm_channel_fsm.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 1a57deb42..14d4d528c 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -254,7 +254,6 @@ static void nm_rx_opstart_ack_chan(struct msgb *oml_msg)
return;
}
osmo_fsm_inst_dispatch(ts->mo.fi, NM_EV_OPSTART_ACK, NULL);
- osmo_fsm_inst_dispatch(ts->fi, TS_EV_OML_READY, NULL);
}
static void nm_rx_opstart_ack(struct msgb *oml_msg)
diff --git a/src/osmo-bsc/nm_channel_fsm.c b/src/osmo-bsc/nm_channel_fsm.c
index 45e455a9a..f1bcbf063 100644
--- a/src/osmo-bsc/nm_channel_fsm.c
+++ b/src/osmo-bsc/nm_channel_fsm.c
@@ -35,6 +35,7 @@
#include <osmocom/bsc/ipaccess.h>
#include <osmocom/bsc/nm_common_fsm.h>
#include <osmocom/bsc/debug.h>
+#include <osmocom/bsc/timeslot_fsm.h>
#define X(s) (1 << (s))
@@ -239,6 +240,8 @@ static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state
ts->mo.adm_unlock_sent = false;
ts->mo.set_attr_ack_received = false;
ts->mo.set_attr_sent = false;
+
+ osmo_fsm_inst_dispatch(ts->fi, TS_EV_OML_READY, NULL);
}
static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data)