Change in osmo-trx[master]: lms: properly call close if set_antennas() fails, add some comments

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/.

roh gerrit-no-reply at lists.osmocom.org
Tue Apr 16 17:08:31 UTC 2019


roh has uploaded this change for review. ( https://gerrit.osmocom.org/13667


Change subject: lms: properly call close if set_antennas() fails, add some comments
......................................................................

lms: properly call close if set_antennas() fails, add some comments

Change-Id: I9ebe986ee3a15842a15853424ee98e9a2fa6a5df
---
M Transceiver52M/device/lms/LMSDevice.cpp
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/67/13667/1

diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index 15064e8..94160b4 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -222,6 +222,7 @@
 			goto out_close;
 	}
 
+	/* set samplerate */
 	if (LMS_GetSampleRateRange(m_lms_dev, LMS_CH_RX, &range_sr))
 		goto out_close;
 	print_range("Sample Rate", &range_sr);
@@ -237,9 +238,10 @@
 	/* FIXME: make this device/model dependent, like UHDDevice:dev_param_map! */
 	ts_offset = static_cast<TIMESTAMP>(8.9e-5 * GSMRATE * tx_sps); /* time * sample_rate */
 
+	/* configure antennas */
 	if (!set_antennas()) {
 		LOGC(DDEV, ALERT) << "LMS antenna setting failed";
-		return -1;
+		goto out_close;
 	}
 
 	samplesRead = 0;
@@ -281,6 +283,7 @@
 		if (!do_calib(i))
 			return false;
 
+		/* configure Streams */
 		m_lms_stream_rx[i] = {};
 		m_lms_stream_rx[i].isTx = false;
 		m_lms_stream_rx[i].channel = i;

-- 
To view, visit https://gerrit.osmocom.org/13667
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ebe986ee3a15842a15853424ee98e9a2fa6a5df
Gerrit-Change-Number: 13667
Gerrit-PatchSet: 1
Gerrit-Owner: roh <jsteiger at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190416/71252f60/attachment.htm>


More information about the gerrit-log mailing list