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


Change subject: Avoid tx RF Resource Ind for disabled TRX
......................................................................

Avoid tx RF Resource Ind for disabled TRX

Related: SYS#6370
Change-Id: I887e0cb03b2a5654accccf7a55fac51319981bfb
(cherry picked from commit 767f690f058b6888109dd8b49e9116a20f2744c1)
---
M src/common/bts_trx.c
M src/common/l1sap.c
2 files changed, 21 insertions(+), 4 deletions(-)



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

diff --git a/src/common/bts_trx.c b/src/common/bts_trx.c
index fce1d02..280880f 100644
--- a/src/common/bts_trx.c
+++ b/src/common/bts_trx.c
@@ -227,10 +227,13 @@
        osmo_fsm_inst_dispatch(trx->mo.fi, NM_EV_RSL_UP, NULL);
        osmo_fsm_inst_dispatch(trx->bb_transc.mo.fi, NM_EV_RSL_UP, NULL);
 
-       if ((rc = rsl_tx_rf_res(trx)) < 0)
-               oml_tx_failure_event_rep(&trx->bb_transc.mo, NM_SEVER_MAJOR, 
OSMO_EVT_MAJ_RSL_FAIL,
-                                        "Failed to establish RSL link (%d)", 
rc);
-
+       if (trx->mo.nm_state.operational == NM_OPSTATE_ENABLED ||
+           trx->bb_transc.mo.nm_state.operational == NM_OPSTATE_ENABLED) {
+               rc = rsl_tx_rf_res(trx);
+               if (rc < 0)
+                       oml_tx_failure_event_rep(&trx->bb_transc.mo, 
NM_SEVER_MAJOR, OSMO_EVT_MAJ_RSL_FAIL,
+                                                "Failed to establish RSL link 
(%d)", rc);
+       }
        if (trx == trx->bts->c0)
                load_timer_start(trx->bts);

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 22b5e8c..efde406 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -615,6 +615,9 @@
                return;

        llist_for_each_entry(trx, &bts->trx_list, list) {
+               if (trx->mo.nm_state.operational != NM_OPSTATE_ENABLED ||
+                   trx->bb_transc.mo.nm_state.operational != 
NM_OPSTATE_ENABLED)
+                       continue;
                /* Calculate the average of all received samples */
                l1sap_interf_meas_calc_avg(trx);
                /* Report to the BSC over the A-bis/RSL */

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

Gerrit-Project: osmo-bts
Gerrit-Branch: 2023q1
Gerrit-Change-Id: I887e0cb03b2a5654accccf7a55fac51319981bfb
Gerrit-Change-Number: 32053
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to