aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-09-30 14:43:09 +0200
committerlaforge <laforge@osmocom.org>2020-10-15 05:55:36 +0000
commitd9d105c1f73713b1363849554d5d87d36d4ae7b6 (patch)
treed0681eb7183221c939015a3cce6b5a1be8663351
parent95486f248a37e66d6ae0baa1fd33e44317cce3ba (diff)
Introduce NM RadioCarrier FSM
-rw-r--r--include/osmocom/bsc/gsm_data.h1
-rw-r--r--include/osmocom/bsc/nm_common_fsm.h10
-rw-r--r--src/ipaccess/Makefile.am2
-rw-r--r--src/osmo-bsc/Makefile.am1
-rw-r--r--src/osmo-bsc/bsc_vty.c2
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts.c40
-rw-r--r--src/osmo-bsc/bts_trx.c16
-rw-r--r--src/osmo-bsc/nm_common_fsm.c1
-rw-r--r--src/osmo-bsc/nm_rcarrier_fsm.c355
-rw-r--r--src/utils/Makefile.am2
-rw-r--r--tests/abis/Makefile.am1
-rw-r--r--tests/acc/Makefile.am1
-rw-r--r--tests/acc/acc_test.ok58
-rw-r--r--tests/bsc/Makefile.am1
-rwxr-xr-xtests/ctrl_test_runner.py2
-rw-r--r--tests/gsm0408/Makefile.am1
-rw-r--r--tests/handover/Makefile.am1
-rw-r--r--tests/nanobts_omlattr/Makefile.am1
18 files changed, 466 insertions, 30 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 428fe87ae..ed40e360f 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -398,6 +398,7 @@ struct gsm_abis_mo {
bool adm_unlock_sent;
bool set_attr_sent;
bool set_attr_ack_received;
+ bool force_rf_lock;
};
/* Ericsson OM2000 Managed Object */
diff --git a/include/osmocom/bsc/nm_common_fsm.h b/include/osmocom/bsc/nm_common_fsm.h
index 2ffb59f67..217de820d 100644
--- a/include/osmocom/bsc/nm_common_fsm.h
+++ b/include/osmocom/bsc/nm_common_fsm.h
@@ -34,6 +34,7 @@ enum nm_fsm_events {
NM_EV_OPSTART_ACK,
NM_EV_OPSTART_NACK,
NM_EV_OML_DOWN,
+ NM_EV_FORCE_LOCK, /* Only supported by RadioCarrier so far */
};
extern const struct value_string nm_fsm_event_names[];
@@ -63,3 +64,12 @@ enum nm_bb_transc_op_fsm_states {
NM_BB_TRANSC_ST_OP_ENABLED,
};
extern struct osmo_fsm nm_bb_transc_fsm;
+
+/* Radio Carrier */
+enum nm_rcarrier_op_fsm_states {
+ NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED,
+ NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY,
+ NM_RCARRIER_ST_OP_DISABLED_OFFLINE,
+ NM_RCARRIER_ST_OP_ENABLED,
+};
+extern struct osmo_fsm nm_rcarrier_fsm;
diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am
index 28d024aa6..e57ca03b5 100644
--- a/src/ipaccess/Makefile.am
+++ b/src/ipaccess/Makefile.am
@@ -58,6 +58,7 @@ ipaccess_config_LDADD = \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
$(OSMO_LIBS) \
$(NULL)
@@ -77,5 +78,6 @@ ipaccess_proxy_LDADD = \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
$(OSMO_LIBS) \
$(NULL)
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index e6c98d138..af9c53e4a 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -80,6 +80,7 @@ osmo_bsc_SOURCES = \
nm_bb_transc_fsm.c \
nm_bts_sm_fsm.c \
nm_bts_fsm.c \
+ nm_rcarrier_fsm.c \
gsm_08_08.c \
osmo_bsc_bssap.c \
osmo_bsc_ctrl.c \
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index f4baefbf1..bdabe88ab 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -722,7 +722,7 @@ static void config_write_trx_single(struct vty *vty, struct gsm_bts_trx *trx)
vty_out(vty, " description %s%s", trx->description,
VTY_NEWLINE);
vty_out(vty, " rf_locked %u%s",
- trx->mo.nm_state.administrative == NM_STATE_LOCKED ? 1 : 0,
+ trx->mo.force_rf_lock ? 1 : 0,
VTY_NEWLINE);
vty_out(vty, " arfcn %u%s", trx->arfcn, VTY_NEWLINE);
vty_out(vty, " nominal power %u%s", trx->nominal_power, VTY_NEWLINE);
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index a93183a96..850e4772e 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -146,6 +146,7 @@ static int nm_statechg_event(int evt, struct nm_statechg_signal_data *nsd)
* endless loop */
if (obj_class != NM_OC_BTS &&
obj_class != NM_OC_BASEB_TRANSC &&
+ obj_class != NM_OC_RADIO_CARRIER &&
evt != S_NM_STATECHG_OPER)
return 0;
@@ -181,7 +182,8 @@ static int nm_statechg_event(int evt, struct nm_statechg_signal_data *nsd)
}
break;
case NM_OC_RADIO_CARRIER:
- /* OPSTART done after Set Radio Carrier Attributes ACK is received */
+ trx = obj;
+ osmo_fsm_inst_dispatch(trx->mo.fi, NM_EV_STATE_CHG_REP, nsd);
break;
case NM_OC_GPRS_NSE:
bts = container_of(obj, struct gsm_bts, gprs.nse);
@@ -271,27 +273,11 @@ static int sw_activ_rep(struct msgb *mb)
return -EINVAL;
osmo_fsm_inst_dispatch(trx->bb_transc.mo.fi, NM_EV_SW_ACT_REP, NULL);
break;
- case NM_OC_RADIO_CARRIER: {
+ case NM_OC_RADIO_CARRIER:
if (!(trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr)))
return -EINVAL;
- /*
- * Locking the radio carrier will make it go
- * offline again and we would come here. The
- * framework should determine that there was
- * no change and avoid recursion.
- *
- * This code is here to make sure that on start
- * a TRX remains locked.
- */
- /* Patch ARFCN into radio attribute */
- struct msgb *msgb = nanobts_attr_radio_get(trx->bts, trx);
- abis_nm_set_radio_attr(trx, msgb->data, msgb->len);
- msgb_free(msgb);
- abis_nm_chg_adm_state(trx->bts, foh->obj_class,
- trx->bts->bts_nr, trx->nr, 0xff,
- trx->mo.nm_state.administrative);
+ osmo_fsm_inst_dispatch(trx->mo.fi, NM_EV_SW_ACT_REP, NULL);
break;
- }
}
return 0;
}
@@ -325,6 +311,11 @@ static void nm_rx_opstart_ack(struct msgb *oml_msg)
case NM_OC_BTS:
osmo_fsm_inst_dispatch(bts->mo.fi, NM_EV_OPSTART_ACK, NULL);
break;
+ case NM_OC_RADIO_CARRIER:
+ if (!(trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr)))
+ return;
+ osmo_fsm_inst_dispatch(trx->mo.fi, NM_EV_OPSTART_ACK, NULL);
+ break;
case NM_OC_BASEB_TRANSC:
if (!(trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr)))
return;
@@ -352,6 +343,11 @@ static void nm_rx_opstart_nack(struct msgb *oml_msg)
case NM_OC_BTS:
osmo_fsm_inst_dispatch(bts->mo.fi, NM_EV_OPSTART_ACK, NULL);
break;
+ case NM_OC_RADIO_CARRIER:
+ if (!(trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr)))
+ return;
+ osmo_fsm_inst_dispatch(trx->mo.fi, NM_EV_OPSTART_NACK, NULL);
+ break;
case NM_OC_BASEB_TRANSC:
if (!(trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr)))
return;
@@ -383,12 +379,11 @@ static void nm_rx_set_radio_attr_ack(struct msgb *oml_msg)
struct gsm_bts *bts = sign_link->trx->bts;
struct gsm_bts_trx *trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr);
- if (foh->obj_class != NM_OC_RADIO_CARRIER) {
+ if (!trx || foh->obj_class != NM_OC_RADIO_CARRIER) {
LOG_TRX(trx, DNM, LOGL_ERROR, "Set Radio Carrier Attr Ack received on non Radio Carrier object!\n");
return;
}
- abis_nm_opstart(trx->bts, foh->obj_class, trx->bts->bts_nr,
- trx->nr, 0xff);
+ osmo_fsm_inst_dispatch(trx->mo.fi, NM_EV_SET_ATTR_ACK, NULL);
}
/* Callback function to be called every time we receive a signal from NM */
@@ -497,6 +492,7 @@ void ipaccess_drop_oml(struct gsm_bts *bts, const char *reason)
llist_for_each_entry(trx, &bts->trx_list, list) {
ipaccess_drop_rsl(trx, "OML link drop");
osmo_fsm_inst_dispatch(trx->bb_transc.mo.fi, NM_EV_OML_DOWN, NULL);
+ osmo_fsm_inst_dispatch(trx->mo.fi, NM_EV_OML_DOWN, NULL);
}
osmo_fsm_inst_dispatch(bts->site_mgr.mo.fi, NM_EV_OML_DOWN, NULL);
diff --git a/src/osmo-bsc/bts_trx.c b/src/osmo-bsc/bts_trx.c
index c01444a0c..5f21b497c 100644
--- a/src/osmo-bsc/bts_trx.c
+++ b/src/osmo-bsc/bts_trx.c
@@ -38,6 +38,10 @@ static int gsm_bts_trx_talloc_destructor(struct gsm_bts_trx *trx)
osmo_fsm_inst_free(trx->bb_transc.mo.fi);
trx->bb_transc.mo.fi = NULL;
}
+ if (trx->mo.fi) {
+ osmo_fsm_inst_free(trx->mo.fi);
+ trx->mo.fi = NULL;
+ }
return 0;
}
@@ -54,6 +58,9 @@ struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts)
trx->bts = bts;
trx->nr = bts->num_trx++;
+ trx->mo.fi = osmo_fsm_inst_alloc(&nm_rcarrier_fsm, trx, trx,
+ LOGL_INFO, NULL);
+ osmo_fsm_inst_update_id_f(trx->mo.fi, "bts%d-trx%d", bts->nr, trx->nr);
gsm_mo_init(&trx->mo, bts, NM_OC_RADIO_CARRIER,
bts->nr, trx->nr, 0xff);
@@ -164,10 +171,9 @@ void gsm_trx_lock_rf(struct gsm_bts_trx *trx, bool locked, const char *reason)
{
uint8_t new_state = locked ? NM_STATE_LOCKED : NM_STATE_UNLOCKED;
-
+ /* State will be sent when BTS connects. */
if (!trx->bts || !trx->bts->oml_link) {
- /* Set initial state which will be sent when BTS connects. */
- trx->mo.nm_state.administrative = new_state;
+ trx->mo.force_rf_lock = locked;
return;
}
@@ -175,9 +181,7 @@ void gsm_trx_lock_rf(struct gsm_bts_trx *trx, bool locked, const char *reason)
get_value_string(abis_nm_adm_state_names, trx->mo.nm_state.administrative),
get_value_string(abis_nm_adm_state_names, new_state), reason);
- abis_nm_chg_adm_state(trx->bts, NM_OC_RADIO_CARRIER,
- trx->bts->bts_nr, trx->nr, 0xff,
- new_state);
+ osmo_fsm_inst_dispatch(trx->mo.fi, NM_EV_FORCE_LOCK, (void*)(intptr_t)locked);
}
bool trx_is_usable(const struct gsm_bts_trx *trx)
diff --git a/src/osmo-bsc/nm_common_fsm.c b/src/osmo-bsc/nm_common_fsm.c
index f8aa779cc..42c01e0b1 100644
--- a/src/osmo-bsc/nm_common_fsm.c
+++ b/src/osmo-bsc/nm_common_fsm.c
@@ -29,5 +29,6 @@ const struct value_string nm_fsm_event_names[] = {
{ NM_EV_OPSTART_ACK, "OPSTART_ACK" },
{ NM_EV_OPSTART_NACK, "OPSTART_NACK" },
{ NM_EV_OML_DOWN, "OML_DOWN" },
+ { NM_EV_FORCE_LOCK, "FORCE_LOCK_CHG" },
{ 0, NULL }
};
diff --git a/src/osmo-bsc/nm_rcarrier_fsm.c b/src/osmo-bsc/nm_rcarrier_fsm.c
new file mode 100644
index 000000000..5a9546133
--- /dev/null
+++ b/src/osmo-bsc/nm_rcarrier_fsm.c
@@ -0,0 +1,355 @@
+/* NM Radio Carrier FSM */
+
+/* (C) 2020 by sysmocom - s.m.f.c. GmbH <info@sysmocom.de>
+ * Author: Pau Espin Pedrol <pespin@sysmocom.de>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <errno.h>
+#include <unistd.h>
+#include <inttypes.h>
+
+#include <osmocom/core/fsm.h>
+#include <osmocom/core/tdef.h>
+#include <osmocom/gsm/protocol/gsm_12_21.h>
+
+#include <osmocom/bsc/bts.h>
+#include <osmocom/bsc/signal.h>
+#include <osmocom/bsc/abis_nm.h>
+#include <osmocom/bsc/bts_ipaccess_nanobts_omlattr.h>
+#include <osmocom/bsc/nm_common_fsm.h>
+#include <osmocom/bsc/debug.h>
+
+#define X(s) (1 << (s))
+
+#define nm_rcarrier_fsm_state_chg(fi, NEXT_STATE) \
+ osmo_fsm_inst_state_chg(fi, NEXT_STATE, 0, 0)
+
+//////////////////////////
+// FSM STATE ACTIONS
+//////////////////////////
+
+static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv;
+
+ trx->mo.set_attr_sent = false;
+ trx->mo.set_attr_ack_received = false;
+ trx->mo.adm_unlock_sent = false;
+ trx->mo.opstart_sent = false;
+}
+
+static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+ struct nm_statechg_signal_data *nsd;
+ struct gsm_nm_state *new_state;
+
+ switch (event) {
+ case NM_EV_SW_ACT_REP:
+ break;
+ case NM_EV_STATE_CHG_REP:
+ nsd = (struct nm_statechg_signal_data *)data;
+ new_state = nsd->new_state;
+ if (new_state->operational == NM_OPSTATE_ENABLED) {
+ /*should not happen... */
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_ENABLED);
+ return;
+ }
+ switch (new_state->availability) { /* operational = DISABLED */
+ case NM_AVSTATE_DEPENDENCY:
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY);
+ return;
+ case NM_AVSTATE_OFF_LINE:
+ case NM_AVSTATE_OK:
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_OFFLINE);
+ return;
+ default:
+ return;
+ }
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
+static void configure_loop(struct gsm_bts_trx *trx, struct gsm_nm_state *state, bool allow_opstart)
+{
+ struct msgb *msgb;
+
+ if (!trx->mo.set_attr_sent && !trx->mo.set_attr_ack_received) {
+ trx->mo.set_attr_sent = true;
+ msgb = nanobts_attr_radio_get(trx->bts, trx);
+ abis_nm_set_radio_attr(trx, msgb->data, msgb->len);
+ msgb_free(msgb);
+ }
+
+ if (!trx->mo.force_rf_lock && state->administrative != NM_STATE_UNLOCKED &&
+ !trx->mo.adm_unlock_sent) {
+ trx->mo.adm_unlock_sent = true;
+ abis_nm_chg_adm_state(trx->bts, NM_OC_RADIO_CARRIER,
+ trx->bts->bts_nr, trx->nr, 0xff,
+ NM_STATE_UNLOCKED);
+ }
+
+ if (allow_opstart && state->administrative == NM_STATE_UNLOCKED &&
+ trx->mo.set_attr_ack_received && !trx->mo.opstart_sent) {
+ trx->mo.opstart_sent = true;
+ abis_nm_opstart(trx->bts, NM_OC_RADIO_CARRIER, trx->bts->bts_nr, trx->nr, 0xff);
+ }
+}
+
+static void st_op_disabled_dependency_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv;
+
+ /* In general nanoBTS is broken, doesn't follow TS 12.21. Opstart MUST
+ * be sent during Dependency, so we simply move to OFFLINE state here to
+ * avoid duplicating code. However, RadioCarrier seems to be implemented
+ * correctly and goes to Offline state during startup. If some HW
+ * version is found with the aboev estated bug, this code needs to be
+ * enabled, similar to what we do in nm_bb_transc_fsm:
+ */
+ /*if (trx->bts->type == GSM_BTS_TYPE_NANOBTS) {
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_OFFLINE);
+ return;
+ }*/
+ configure_loop(trx, &trx->mo.nm_state, false);
+}
+
+static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+ struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv;
+ struct nm_statechg_signal_data *nsd;
+ struct gsm_nm_state *new_state;
+
+ switch (event) {
+ case NM_EV_SET_ATTR_ACK:
+ trx->mo.set_attr_ack_received = true;
+ trx->mo.set_attr_sent = false;
+ configure_loop(trx, &trx->mo.nm_state, false);
+ return;
+ case NM_EV_STATE_CHG_REP:
+ nsd = (struct nm_statechg_signal_data *)data;
+ new_state = nsd->new_state;
+ if (new_state->operational == NM_OPSTATE_ENABLED) {
+ /* should not happen... */
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_ENABLED);
+ return;
+ }
+ switch (new_state->availability) { /* operational = DISABLED */
+ case NM_AVSTATE_NOT_INSTALLED:
+ case NM_AVSTATE_POWER_OFF:
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED);
+ return;
+ case NM_AVSTATE_OFF_LINE:
+ case NM_AVSTATE_OK:
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_OFFLINE);
+ return;
+ case NM_AVSTATE_DEPENDENCY:
+ configure_loop(trx, new_state, false);
+ return;
+ default:
+ return;
+ }
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
+static void st_op_disabled_offline_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv;
+
+ /* Warning: In here we may be acessing an state older than new_state
+ from prev (syncrhonous) FSM state */
+ configure_loop(trx, &trx->mo.nm_state, true);
+}
+
+static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+ struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv;
+ struct nm_statechg_signal_data *nsd;
+ struct gsm_nm_state *new_state;
+
+ switch (event) {
+ case NM_EV_SET_ATTR_ACK:
+ trx->mo.set_attr_ack_received = true;
+ trx->mo.set_attr_sent = false;
+ configure_loop(trx, &trx->mo.nm_state, true);
+ return;
+ case NM_EV_STATE_CHG_REP:
+ nsd = (struct nm_statechg_signal_data *)data;
+ new_state = nsd->new_state;
+ if (new_state->operational == NM_OPSTATE_ENABLED) {
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_ENABLED);
+ return;
+ }
+ switch (new_state->availability) { /* operational = DISABLED */
+ case NM_AVSTATE_NOT_INSTALLED:
+ case NM_AVSTATE_POWER_OFF:
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED);
+ return;
+ case NM_AVSTATE_DEPENDENCY:
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY);
+ return;
+ case NM_AVSTATE_OFF_LINE:
+ case NM_AVSTATE_OK:
+ configure_loop(trx, new_state, true);
+ return;
+ default:
+ return;
+ }
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
+static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv;
+
+ /* Reset state, we don't need it in this state and it will need to be
+ reused as soon as we move back to Disabled */
+ trx->mo.opstart_sent = false;
+ trx->mo.adm_unlock_sent = false;
+ trx->mo.set_attr_ack_received = false;
+ trx->mo.set_attr_sent = false;
+}
+
+static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+ struct nm_statechg_signal_data *nsd;
+ struct gsm_nm_state *new_state;
+
+ switch (event) {
+ case NM_EV_STATE_CHG_REP:
+ nsd = (struct nm_statechg_signal_data *)data;
+ new_state = nsd->new_state;
+ if (new_state->operational == NM_OPSTATE_ENABLED)
+ return;
+ switch (new_state->availability) { /* operational = DISABLED */
+ case NM_AVSTATE_NOT_INSTALLED:
+ case NM_AVSTATE_POWER_OFF:
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED);
+ return;
+ case NM_AVSTATE_DEPENDENCY:
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY);
+ return;
+ case NM_AVSTATE_OFF_LINE:
+ case NM_AVSTATE_OK:
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_OFFLINE);
+ return;
+ default:
+ return;
+ }
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
+static void st_op_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+ struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv;
+
+ switch (event) {
+ case NM_EV_OPSTART_ACK:
+ case NM_EV_OPSTART_NACK:
+ /* TODO: if on state OFFLINE and rx NACK, try again? */
+ trx->mo.opstart_sent = false;
+ break;
+ case NM_EV_FORCE_LOCK:
+ trx->mo.force_rf_lock = (bool)(intptr_t)data;
+ abis_nm_chg_adm_state(trx->bts, NM_OC_RADIO_CARRIER,
+ trx->bts->bts_nr, trx->nr, 0xff,
+ trx->mo.force_rf_lock ? NM_STATE_LOCKED : NM_STATE_UNLOCKED);
+ break;
+ case NM_EV_OML_DOWN:
+ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED);
+ break;
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
+static struct osmo_fsm_state nm_rcarrier_fsm_states[] = {
+ [NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED] = {
+ .in_event_mask =
+ X(NM_EV_SW_ACT_REP) |
+ X(NM_EV_STATE_CHG_REP),
+ .out_state_mask =
+ X(NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY) |
+ X(NM_RCARRIER_ST_OP_DISABLED_OFFLINE) |
+ X(NM_RCARRIER_ST_OP_ENABLED),
+ .name = "DISABLED_NOTINSTALLED",
+ .onenter = st_op_disabled_notinstalled_on_enter,
+ .action = st_op_disabled_notinstalled,
+ },
+ [NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY] = {
+ .in_event_mask =
+ X(NM_EV_STATE_CHG_REP) |
+ X(NM_EV_SET_ATTR_ACK),
+ .out_state_mask =
+ X(NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED) |
+ X(NM_RCARRIER_ST_OP_DISABLED_OFFLINE) |
+ X(NM_RCARRIER_ST_OP_ENABLED),
+ .name = "DISABLED_DEPENDENCY",
+ .onenter = st_op_disabled_dependency_on_enter,
+ .action = st_op_disabled_dependency,
+ },
+ [NM_RCARRIER_ST_OP_DISABLED_OFFLINE] = {
+ .in_event_mask =
+ X(NM_EV_STATE_CHG_REP) |
+ X(NM_EV_SET_ATTR_ACK),
+ .out_state_mask =
+ X(NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED) |
+ X(NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY) |
+ X(NM_RCARRIER_ST_OP_ENABLED),
+ .name = "DISABLED_OFFLINE",
+ .onenter = st_op_disabled_offline_on_enter,
+ .action = st_op_disabled_offline,
+ },
+ [NM_RCARRIER_ST_OP_ENABLED] = {
+ .in_event_mask =
+ X(NM_EV_STATE_CHG_REP),
+ .out_state_mask =
+ X(NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED) |
+ X(NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY) |
+ X(NM_RCARRIER_ST_OP_DISABLED_OFFLINE),
+ .name = "ENABLED",
+ .onenter = st_op_enabled_on_enter,
+ .action = st_op_enabled,
+ },
+};
+
+struct osmo_fsm nm_rcarrier_fsm = {
+ .name = "NM_RCARRIER_OP",
+ .states = nm_rcarrier_fsm_states,
+ .num_states = ARRAY_SIZE(nm_rcarrier_fsm_states),
+ .allstate_event_mask =
+ X(NM_EV_OPSTART_ACK) |
+ X(NM_EV_OPSTART_NACK) |
+ X(NM_EV_FORCE_LOCK) |
+ X(NM_EV_OML_DOWN),
+ .allstate_action = st_op_allstate,
+ .event_names = nm_fsm_event_names,
+ .log_subsys = DNM,
+};
+
+static __attribute__((constructor)) void nm_rcarrier_fsm_init(void)
+{
+ OSMO_ASSERT(osmo_fsm_register(&nm_rcarrier_fsm) == 0);
+}
diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am
index 12a7d45ef..90fe7f128 100644
--- a/src/utils/Makefile.am
+++ b/src/utils/Makefile.am
@@ -60,6 +60,7 @@ bs11_config_LDADD = \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
@@ -135,6 +136,7 @@ meas_json_LDADD = \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am
index cee3d6f05..756d9f50f 100644
--- a/tests/abis/Makefile.am
+++ b/tests/abis/Makefile.am
@@ -36,6 +36,7 @@ abis_test_LDADD = \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOABIS_LIBS) \
$(LIBOSMOGSM_LIBS) \
diff --git a/tests/acc/Makefile.am b/tests/acc/Makefile.am
index d8ce5eaa6..1b3b095e7 100644
--- a/tests/acc/Makefile.am
+++ b/tests/acc/Makefile.am
@@ -36,6 +36,7 @@ acc_test_LDADD = \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOABIS_LIBS) \
$(LIBOSMOGSM_LIBS) \
diff --git a/tests/acc/acc_test.ok b/tests/acc/acc_test.ok
index 7d79ee6fc..76b823b56 100644
--- a/tests/acc/acc_test.ok
+++ b/tests/acc/acc_test.ok
@@ -1,6 +1,7 @@
===test_acc_mgr_no_ramp===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_no_ramp()
@@ -111,10 +112,12 @@ pcu_info_update(): t2=0x00 t3=0x00, allowed: 0 1 2 3 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_no_ramp()
===test_acc_mgr_manual_ramp===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_manual_ramp()
@@ -355,10 +358,12 @@ pcu_info_update(): t2=0x01 t3=0xb3, allowed: 2 3 6 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_manual_ramp()
===test_acc_mgr_rotate(true, 1)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -430,10 +435,12 @@ pcu_info_update(): t2=0x03 t3=0xfd, allowed: 1
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 1)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -502,10 +509,12 @@ pcu_info_update(): t2=0x01 t3=0xff, allowed: 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 2)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -577,10 +586,12 @@ pcu_info_update(): t2=0x03 t3=0xfc, allowed: 0 1
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 2)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -649,10 +660,12 @@ pcu_info_update(): t2=0x00 t3=0xff, allowed: 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 3)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -724,10 +737,12 @@ pcu_info_update(): t2=0x02 t3=0xfc, allowed: 0 1 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 3)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -796,10 +811,12 @@ pcu_info_update(): t2=0x00 t3=0x7f, allowed: 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 4)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -871,10 +888,12 @@ pcu_info_update(): t2=0x02 t3=0x7c, allowed: 0 1 7 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 4)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -943,10 +962,12 @@ pcu_info_update(): t2=0x00 t3=0x3f, allowed: 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 5)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -1018,10 +1039,12 @@ pcu_info_update(): t2=0x02 t3=0x3c, allowed: 0 1 6 7 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 5)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -1090,10 +1113,12 @@ pcu_info_update(): t2=0x00 t3=0x1f, allowed: 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 6)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -1165,10 +1190,12 @@ pcu_info_update(): t2=0x02 t3=0x1c, allowed: 0 1 5 6 7 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 6)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -1237,10 +1264,12 @@ pcu_info_update(): t2=0x00 t3=0x0f, allowed: 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 7)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -1312,10 +1341,12 @@ pcu_info_update(): t2=0x02 t3=0x0c, allowed: 0 1 4 5 6 7 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 7)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -1384,10 +1415,12 @@ pcu_info_update(): t2=0x00 t3=0x07, allowed: 3 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 8)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -1459,10 +1492,12 @@ pcu_info_update(): t2=0x02 t3=0x04, allowed: 0 1 3 4 5 6 7 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 8)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -1531,10 +1566,12 @@ pcu_info_update(): t2=0x00 t3=0x03, allowed: 2 3 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 9)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
@@ -1603,10 +1640,12 @@ pcu_info_update(): t2=0x00 t3=0x01, allowed: 1 2 3 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_ramp===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp()
@@ -1644,10 +1683,12 @@ pcu_info_update(): t2=0x00 t3=0x00, allowed: 0 1 2 3 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp()
===test_acc_ramp2===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp2()
@@ -1667,10 +1708,12 @@ sys={15.000000}: select()
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp2()
===test_acc_ramp3===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp3()
@@ -1706,10 +1749,12 @@ sys={45.000000}: select()
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp3()
===test_acc_ramp_up_rotate(0, 100, 100)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_up_rotate()
@@ -1801,10 +1846,12 @@ sys={3250.000000}: select()
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_up_rotate()
===test_acc_ramp_up_rotate(0, 20, 50)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_up_rotate()
@@ -1896,10 +1943,12 @@ sys={3250.000000}: select()
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_up_rotate()
===test_acc_ramp_up_rotate(70, 80, 90)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_up_rotate()
@@ -1991,10 +2040,12 @@ sys={3250.000000}: select()
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_up_rotate()
===test_acc_ramp_updown_rotate(80, 90, 0, 100, 15)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_updown_rotate()
@@ -2116,10 +2167,12 @@ sys={7500.000000}: select(49): chan_load_avg=100
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_updown_rotate()
===test_acc_ramp_updown_rotate(30, 50, 10, 100, 15)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_updown_rotate()
@@ -2265,10 +2318,12 @@ pcu_info_update(): t2=0x03 t3=0xf9, allowed: 1 2
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_updown_rotate()
===test_acc_ramp_updown_rotate(50, 49, 0, 100, 10)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_updown_rotate()
@@ -2424,10 +2479,12 @@ pcu_info_update(): t2=0x03 t3=0xc7, allowed: 3 4 5
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_updown_rotate()
===test_acc_ramp_updown_rotate(30, 80, 30, 80, 5)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_updown_rotate()
@@ -2489,4 +2546,5 @@ sys={12500.000000}: select(49): chan_load_avg=75
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_updown_rotate()
diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am
index ff2d48fcc..ea7e91672 100644
--- a/tests/bsc/Makefile.am
+++ b/tests/bsc/Makefile.am
@@ -50,6 +50,7 @@ bsc_test_LDADD = \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOVTY_LIBS) \
diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py
index 55a4ca68c..e1c11b9dc 100755
--- a/tests/ctrl_test_runner.py
+++ b/tests/ctrl_test_runner.py
@@ -321,7 +321,7 @@ class TestCtrlBSC(TestCtrlBase):
r = self.do_get('bts.0.rf_state')
self.assertEqual(r['mtype'], 'GET_REPLY')
self.assertEqual(r['var'], 'bts.0.rf_state')
- self.assertEqual(r['value'], 'inoperational,unlocked,on')
+ self.assertEqual(r['value'], 'inoperational,locked,on')
r = self.do_get('rf_locked')
self.assertEqual(r['mtype'], 'GET_REPLY')
diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am
index bc8e558e7..b7d7c4c70 100644
--- a/tests/gsm0408/Makefile.am
+++ b/tests/gsm0408/Makefile.am
@@ -39,6 +39,7 @@ gsm0408_test_LDADD = \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 1309380f9..930a5bbbb 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -84,6 +84,7 @@ handover_test_LDADD = \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
$(top_builddir)/src/osmo-bsc/osmo_bsc_ctrl.o \
$(top_builddir)/src/osmo-bsc/osmo_bsc_lcls.o \
$(top_builddir)/src/osmo-bsc/osmo_bsc_mgcp.o \
diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am
index d30be3376..85d09c732 100644
--- a/tests/nanobts_omlattr/Makefile.am
+++ b/tests/nanobts_omlattr/Makefile.am
@@ -33,6 +33,7 @@ nanobts_omlattr_test_LDADD = \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \