diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-06-18 17:40:27 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-06-23 14:53:37 +0200 |
commit | 0211bd6e79a9a20b25b429422f86b7ca9de742c5 (patch) | |
tree | c57f0040aeee83377ab40d5882cdb3bf04671c58 | |
parent | 69299114f82215e964d8e10c7b84c0fe51cf9c33 (diff) |
bts-trx: Split part of bts_model_trx_close() steps into bts_model_deact_rf
bts_model_trx_close is only called during bts_shutdown immediately after
bts_model_deact_rf, so its logic keeps being essentially the same after
this code movement.
On the other hand, bts_model_deact_rf is also called during RSL link
establishment if it failed for whatever reason in
bts.c:trx_link_estab(). In that case, we want to make sure the TRX is
not used so we need to implement bts_model_deact_rf.
Change-Id: Id4eae743da81773a04b82e7b454071b0cc66677a
-rw-r--r-- | src/osmo-bts-trx/l1_if.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index ea3dcfa7..2aa27a74 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -396,8 +396,8 @@ static int trx_init(struct gsm_bts_trx *trx) return oml_mo_opstart_ack(&trx->mo); } -/* deactivate transceiver */ -int bts_model_trx_close(struct gsm_bts_trx *trx) +/* Deact RF on transceiver */ +int bts_model_trx_deact_rf(struct gsm_bts_trx *trx) { struct phy_instance *pinst = trx_phy_instance(trx); struct trx_l1h *l1h = pinst->u.osmotrx.hdl; @@ -411,6 +411,21 @@ int bts_model_trx_close(struct gsm_bts_trx *trx) pchan == GSM_PCHAN_CCCH_SDCCH4_CBCH) { lchan_set_state(&trx->ts[0].lchan[CCCH_LCHAN], LCHAN_S_INACTIVE); } + /* FIXME: There's currently no way to communicate to osmo-trx through + * TRXC that a specific TRX processing shall be paused. Let's simply + * make sure that at least we don't transmit with power on it by setting + * a rather low value: + */ + power_ramp_start(trx, to_mdB(-10), 1, NULL); + + return 0; +} + +/* deactivate transceiver */ +int bts_model_trx_close(struct gsm_bts_trx *trx) +{ + struct phy_instance *pinst = trx_phy_instance(trx); + struct trx_l1h *l1h = pinst->u.osmotrx.hdl; /* power off transceiver, if not already */ if (l1h->config.enabled) { @@ -846,11 +861,6 @@ int bts_model_chg_adm_state(struct gsm_bts *bts, struct gsm_abis_mo *mo, return oml_mo_statechg_ack(mo); } -int bts_model_trx_deact_rf(struct gsm_bts_trx *trx) -{ - return 0; -} - int bts_model_oml_estab(struct gsm_bts *bts) { return 0; |