[PATCH 2/3] don't touch OML MO when PHY link is established

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/OpenBSC@lists.osmocom.org/.

laforge at gnumonks.org laforge at gnumonks.org
Wed Feb 3 18:37:20 UTC 2016


From: Harald Welte <laforge at gnumonks.org>

It seems the right thing to do: Once we know a PHY link is established,
the associated OML managed objects should change their state
accordingly.  However, given all the hackery we do with MO states, this
actually breaks things, rather than helping.  So I'm disabling that part
for now, but this needs to be re-visited at some point.
---
 src/common/bts.c      | 16 ++++++++--------
 src/common/phy_link.c |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/common/bts.c b/src/common/bts.c
index a775329..1dd518c 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -267,19 +267,19 @@ int trx_set_available(struct gsm_bts_trx *trx, int avail)
 	LOGP(DSUM, LOGL_INFO, "TRX(%d): Setting available = %d\n",
 		trx->nr, avail);
 	if (avail) {
-		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);
-
+		/* FIXME: This needs to be sorted out */
+#if 0
+		oml_mo_state_chg(&trx->mo,  NM_OPSTATE_DISABLED, NM_AVSTATE_OFF_LINE);
+		oml_mo_state_chg(&trx->bb_transc.mo, -1, NM_AVSTATE_OFF_LINE);
 		for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++)
 			oml_mo_state_chg(&trx->ts[tn].mo, NM_OPSTATE_DISABLED, NM_AVSTATE_DEPENDENCY);
+#endif
 	} else {
-		oml_mo_state_chg(&trx->mo,  NM_OPSTATE_DISABLED, NM_AVSTATE_OFF_LINE);
-		oml_mo_state_chg(&trx->bb_transc.mo, -1, NM_AVSTATE_OFF_LINE);
+		oml_mo_state_chg(&trx->mo,  NM_OPSTATE_DISABLED, NM_AVSTATE_NOT_INSTALLED);
+		oml_mo_state_chg(&trx->bb_transc.mo, -1, NM_AVSTATE_NOT_INSTALLED);
 
 		for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++)
-			oml_mo_state_chg(&trx->ts[tn].mo, NM_OPSTATE_DISABLED, NM_AVSTATE_OFF_LINE);
+			oml_mo_state_chg(&trx->ts[tn].mo, NM_OPSTATE_DISABLED, NM_AVSTATE_NOT_INSTALLED);
 	}
 	return 0;
 }
diff --git a/src/common/phy_link.c b/src/common/phy_link.c
index 9442349..816d3c0 100644
--- a/src/common/phy_link.c
+++ b/src/common/phy_link.c
@@ -65,7 +65,7 @@ void phy_link_state_set(struct phy_link *plink, enum phy_link_state state)
 			LOGP(DL1C, LOGL_INFO, "trx_set_avail(1)\n");
 			trx_set_available(trx, 1);
 			break;
-		default:
+		case PHY_LINK_SHUTDOWN:
 			LOGP(DL1C, LOGL_INFO, "trx_set_avail(0)\n");
 			trx_set_available(trx, 0);
 			break;
-- 
2.7.0




More information about the OpenBSC mailing list