Change in osmo-bts[master]: bts-trx: Split part of bts_model_trx_close() steps into bts_model_dea...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Jun 23 14:16:57 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18910 )

Change subject: bts-trx: Split part of bts_model_trx_close() steps into bts_model_deact_rf
......................................................................

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
---
M src/osmo-bts-trx/l1_if.c
1 file changed, 17 insertions(+), 7 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  neels: Looks good to me, but someone else must approve



diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index ea3dcfa..2aa27a7 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -396,8 +396,8 @@
 	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 @@
 	    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 @@
 	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;

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id4eae743da81773a04b82e7b454071b0cc66677a
Gerrit-Change-Number: 18910
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200623/63ded95e/attachment.htm>


More information about the gerrit-log mailing list