diff options
author | Max <msuraev@sysmocom.de> | 2016-06-16 12:36:20 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2016-06-16 12:43:44 +0200 |
commit | 7cc3c3156ef23500612724f8a38c3db95c05702b (patch) | |
tree | e992b0514dccbb8bd84c9b6913e7e1bec38ded22 /src/osmo-bts-trx/l1_if.c | |
parent | 58e4e18206501c3bffa65f0b876bbc5ebe175d6e (diff) |
Fix OML activation
Previously software activation could have been reported multiple times
which broke proper BTS init. Introduce guard variable to ensure
reporting happens only once.
Note: this is just minimal workaround - ideally proper OML state machine
should be implemented.
Change-Id: Ifffbdb756bc5d2864f985c01a3299b839c4de7af
Related: OS#1648
Diffstat (limited to 'src/osmo-bts-trx/l1_if.c')
-rw-r--r-- | src/osmo-bts-trx/l1_if.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index befaffd2..8ccba90e 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -23,10 +23,12 @@ #include <stdint.h> #include <unistd.h> #include <stdlib.h> +#include <stdbool.h> #include <errno.h> #include <osmocom/core/talloc.h> #include <osmocom/core/bits.h> +#include <osmocom/gsm/abis_nm.h> #include <osmo-bts/logging.h> #include <osmo-bts/bts.h> @@ -106,9 +108,12 @@ static void check_transceiver_availability_trx(struct trx_l1h *l1h, int avail) if (avail) { /* signal availability */ oml_mo_state_chg(&trx->mo, NM_OPSTATE_DISABLED, NM_AVSTATE_OK); - oml_mo_tx_sw_act_rep(&trx->mo); oml_mo_state_chg(&trx->bb_transc.mo, -1, NM_AVSTATE_OK); - oml_mo_tx_sw_act_rep(&trx->bb_transc.mo); + if (!pinst->u.osmotrx.sw_act_reported) { + oml_mo_tx_sw_act_rep(&trx->mo); + oml_mo_tx_sw_act_rep(&trx->bb_transc.mo); + pinst->u.osmotrx.sw_act_reported = true; + } for (tn = 0; tn < TRX_NR_TS; tn++) oml_mo_state_chg(&trx->ts[tn].mo, NM_OPSTATE_DISABLED, @@ -685,7 +690,8 @@ int bts_model_opstart(struct gsm_bts *bts, struct gsm_abis_mo *mo, void *obj) { int rc; - + LOGP(DOML, LOGL_DEBUG, "bts_model_opstart: %s received\n", + get_value_string(abis_nm_obj_class_names, mo->obj_class)); switch (mo->obj_class) { case NM_OC_RADIO_CARRIER: /* activate transceiver */ |