Change in osmo-bts[master]: trx_provision_fsm: Properly reset FSM state upon starting listening f...

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
Thu Sep 23 10:00:25 UTC 2021


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

Change subject: trx_provision_fsm: Properly reset FSM state upon starting listening for events
......................................................................

trx_provision_fsm: Properly reset FSM state upon starting listening for events

Change-Id: If0d078bc0170091efbca351c44ee412dad1e944a
---
M src/osmo-bts-trx/trx_provision_fsm.c
1 file changed, 52 insertions(+), 1 deletion(-)

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



diff --git a/src/osmo-bts-trx/trx_provision_fsm.c b/src/osmo-bts-trx/trx_provision_fsm.c
index 19cbc8b..660360d 100644
--- a/src/osmo-bts-trx/trx_provision_fsm.c
+++ b/src/osmo-bts-trx/trx_provision_fsm.c
@@ -92,6 +92,57 @@
 /*
  * transceiver provisioning
  */
+
+static void trx_provision_reset(struct trx_l1h *l1h)
+{
+	struct phy_instance *pinst = l1h->phy_inst;
+	uint8_t tn;
+
+	l1h->config.trxd_pdu_ver_req = pinst->phy_link->u.osmotrx.trxd_pdu_ver_max;
+	l1h->config.trxd_pdu_ver_use = 0;
+	l1h->config.setformat_sent = false;
+	l1h->config.setformat_acked = false;
+
+	l1h->config.enabled = false;
+	l1h->config.arfcn_valid = false;
+	l1h->config.arfcn = 0;
+	l1h->config.rxtune_sent = false;
+	l1h->config.rxtune_acked = false;
+	l1h->config.txtune_sent = false;
+	l1h->config.txtune_acked = false;
+
+	l1h->config.tsc_valid = false;
+	l1h->config.tsc = 0;
+	l1h->config.tsc_sent = false;
+	l1h->config.tsc_acked = false;
+
+	l1h->config.bsic_valid = false;
+	l1h->config.bsic = 0;
+	l1h->config.bsic_sent = false;
+	l1h->config.bsic_acked = false;
+
+	l1h->config.rxgain_valid = false;
+	l1h->config.rxgain = 0;
+	l1h->config.rxgain_sent = false;
+
+	l1h->config.nomtxpower_sent = false;
+	l1h->config.nomtxpower_acked = false;
+
+	l1h->config.maxdly_valid = false;
+	l1h->config.maxdly_sent = false;
+
+	l1h->config.maxdlynb_valid = false;
+	l1h->config.maxdlynb_sent = false;
+
+	for (tn = 0; tn < TRX_NR_TS; tn++) {
+		l1h->config.setslot_valid[tn] = false;
+		l1h->config.setslot_sent[tn] = false;
+		l1h->config.setslot[tn].slottype = 0;
+		l1h->config.setslot[tn].tsc_set = 0;
+		l1h->config.setslot[tn].tsc_val = 0;
+		l1h->config.setslot[tn].tsc_valid = 0;
+	}
+}
 int l1if_provision_transceiver_trx(struct trx_l1h *l1h)
 {
 	struct phy_instance *pinst = l1h->phy_inst;
@@ -274,7 +325,7 @@
 	struct trx_l1h *l1h = (struct trx_l1h *)fi->priv;
 	struct phy_instance *pinst = l1h->phy_inst;
 
-	l1h->config.trxd_pdu_ver_req = pinst->phy_link->u.osmotrx.trxd_pdu_ver_max;
+	trx_provision_reset(l1h);
 
 	/* Apply initial RFMUTE state */
 	if (pinst->trx != NULL)

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If0d078bc0170091efbca351c44ee412dad1e944a
Gerrit-Change-Number: 25519
Gerrit-PatchSet: 4
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: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210923/e26ec9f2/attachment.htm>


More information about the gerrit-log mailing list