pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/32242 )


Change subject: nm: Document current state of SW_ACT in TRX related objects
......................................................................

nm: Document current state of SW_ACT in TRX related objects

Change-Id: Ie24503b25b9c8042edae696d5b002933c73d00fb
---
M src/common/bts.c
M src/common/nm_bts_fsm.c
2 files changed, 23 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/42/32242/1

diff --git a/src/common/bts.c b/src/common/bts.c
index 0dd830a..1154c6a 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -414,10 +414,17 @@

        LOGP(DOML, LOGL_INFO, "Main link established, sending NM Status.\n");

-       /* BTS SITE MGR becomes Offline (tx SW ACT Report), BTS, NSE, etc. is 
DEPENDENCY */
+       /* BTS SITE MGR becomes Offline (tx SW ACT Report) and dispatches same
+        * event to its children objects (except TRX level and below, see 
comment
+        * below)
+        */
        osmo_fsm_inst_dispatch(bts->site_mgr->mo.fi, NM_EV_SW_ACT, NULL);

-       /* All other objects start off-line until the BTS Model code says 
otherwise */
+       /* TRX objects are SW_ACTed by the lower layers (bts_model) when they
+        * become available. Since that may happen before the OML link becomes
+        * established, we need to manually trigger tx of state reports to the 
BSC
+        * so it learns current state and can go on bringing them up.
+        */
        for (i = 0; i < bts->num_trx; i++) {
                struct gsm_bts_trx *trx = gsm_bts_trx_num(bts, i);

diff --git a/src/common/nm_bts_fsm.c b/src/common/nm_bts_fsm.c
index 13a4727..451530f 100644
--- a/src/common/nm_bts_fsm.c
+++ b/src/common/nm_bts_fsm.c
@@ -93,6 +93,11 @@
                }

                nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_OFFLINE);
+
+               /* Avoid submitting NM_EV_SW_ACT to children NM objects
+                * (RCARRIER, BBTRANSC), the lower layers (bts_model) are in 
charge
+                * of submitting them once the TRX becomes available
+                */
                return;
        default:
                OSMO_ASSERT(0);

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32242
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ie24503b25b9c8042edae696d5b002933c73d00fb
Gerrit-Change-Number: 32242
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to