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
This commit is contained in:
Pau Espin 2020-08-26 17:02:31 +02:00 committed by laforge
parent af4015cb91
commit c84b007efb
2 changed files with 9 additions and 2 deletions

View File

@ -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,

View File

@ -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)