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

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Apr 17 18:24:13 UTC 2019


Harald Welte has submitted this change and it was merged. ( 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(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index 34ad6e8..05904e8 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: merged
Gerrit-Change-Id: I9ebe986ee3a15842a15853424ee98e9a2fa6a5df
Gerrit-Change-Number: 13667
Gerrit-PatchSet: 3
Gerrit-Owner: roh <jsteiger at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190417/8a312d2d/attachment.html>


More information about the gerrit-log mailing list