This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: Fix OML activation
......................................................................
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
---
M include/osmo-bts/phy_link.h
M src/osmo-bts-trx/l1_if.c
M src/osmo-bts-trx/trx_if.c
3 files changed, 14 insertions(+), 4 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index b3db4ce..82e73c8 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -1,6 +1,7 @@
#pragma once
#include <stdint.h>
+#include <stdbool.h>
#include <osmocom/core/linuxlist.h>
#include <osmo-bts/scheduler.h>
@@ -94,6 +95,7 @@
} sysmobts;
struct {
struct trx_l1h *hdl;
+ bool sw_act_reported;
} osmotrx;
struct {
/* logical transceiver number within one PHY */
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index befaffd..8ccba90 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 @@
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 @@
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 */
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index a4c16dc..c448006 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -518,7 +518,9 @@
if (!pinst->u.osmotrx.hdl)
goto cleanup;
}
-
+ /* FIXME: is there better way to check/report TRX availability? */
+ transceiver_available = 1;
+ phy_link_state_set(plink, PHY_LINK_CONNECTED);
return 0;
cleanup:
--
To view, visit https://gerrit.osmocom.org/296
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifffbdb756bc5d2864f985c01a3299b839c4de7af
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder