From patchwork Fri Feb 5 11:41:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Welte X-Patchwork-Id: 579451 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id 58ED71409C4 for ; Fri, 5 Feb 2016 22:43:21 +1100 (AEDT) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 9266A143C0; Fri, 5 Feb 2016 11:43:18 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [213.95.27.120]) by lists.osmocom.org (Postfix) with ESMTP id 3247B143AF for ; Fri, 5 Feb 2016 11:43:17 +0000 (UTC) Received: from uucp by ganesha.gnumonks.org with local-bsmtp (Exim 4.72) (envelope-from ) id 1aRenE-00012h-OV for openbsc@lists.osmocom.org; Fri, 05 Feb 2016 12:43:16 +0100 Received: from laforge by localhost.localdomain with local (Exim 4.86) (envelope-from ) id 1aRelP-0003x4-Pe for openbsc@lists.osmocom.org; Fri, 05 Feb 2016 12:41:23 +0100 From: Harald Welte To: openbsc@lists.osmocom.org Subject: [PATCH 2/3] don't touch OML MO when PHY link is established Date: Fri, 5 Feb 2016 12:41:22 +0100 Message-Id: <1454672483-15150-2-git-send-email-laforge@gnumonks.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454672483-15150-1-git-send-email-laforge@gnumonks.org> References: <1454672483-15150-1-git-send-email-laforge@gnumonks.org> X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" 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 2d0ad8e..222a82c 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -266,19 +266,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 4103ede..0a77fec 100644 --- a/src/common/phy_link.c +++ b/src/common/phy_link.c @@ -67,7 +67,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;