diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-08-26 17:02:31 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-09-07 08:08:09 +0000 |
commit | c84b007efbbdb43d270dff071b1b5cf1191e37ea (patch) | |
tree | 6f2c275ef9649f6b680d6118339b7817b572a450 /src | |
parent | af4015cb91190de38b63dba3f91662eac6b724cf (diff) |
bts-trx: Ensure RFMUTE state is set properly at startup
In general, it is always set to 1 (Locked) in
st_open_poweroff_on_enter() right after initial POWEROFF, and once the
BSC unlocks it (based on VTY cfg "rf_locked (0|1)") by sending an OML
message, the bts_model_chg_adm_state() call will update it sending
RFMUTE.
This basically fixes the case where osmo-bsc.cfg is configured with
"rf_locked 1" to start with a TRX locked until manually unlocked.
Related: SYS#4920
Change-Id: I96b64cdc901d6f216df628d7be57a67af4a21e25
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bts-trx/l1_if.c | 8 | ||||
-rw-r--r-- | src/osmo-bts-trx/trx_provision_fsm.c | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index bc0df2b2..9893f455 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -651,9 +651,13 @@ int bts_model_chg_adm_state(struct gsm_bts *bts, struct gsm_abis_mo *mo, l1h = pinst->u.osmotrx.hdl; /* Begin to ramp the power if TRX is already running. Otherwise - * skip, power ramping will be started after TRX is running */ - if (!pinst->phy_link->u.osmotrx.powered) + * skip, power ramping will be started after TRX is running. + * We still want to make sure to update RFMUTE status on the + * other side. */ + if (!pinst->phy_link->u.osmotrx.powered) { + trx_if_cmd_rfmute(l1h, adm_state != NM_STATE_UNLOCKED); break; + } if (mo->procedure_pending) { LOGPTRX(trx, DL1C, LOGL_INFO, diff --git a/src/osmo-bts-trx/trx_provision_fsm.c b/src/osmo-bts-trx/trx_provision_fsm.c index 2e3115a7..33a37b3f 100644 --- a/src/osmo-bts-trx/trx_provision_fsm.c +++ b/src/osmo-bts-trx/trx_provision_fsm.c @@ -277,6 +277,9 @@ static void st_open_poweroff_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_st struct phy_instance *pinst = l1h->phy_inst; l1h->config.trxd_hdr_ver_req = pinst->phy_link->u.osmotrx.trxd_hdr_ver_max; + + /* Apply initial RFMUTE state */ + trx_if_cmd_rfmute(l1h, pinst->trx->mo.nm_state.administrative != NM_STATE_UNLOCKED); } static void st_open_poweroff(struct osmo_fsm_inst *fi, uint32_t event, void *data) |