<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9625">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">usrp1: Fail in case of unsupported configuration<br><br>There might be some configuration that's not supported by osmo-bts-usrp1,<br>and we should reject that properly.<br><br>Change-Id: Ic7308ce0c57439fe97668bd31801c4bf76b797ad<br>Closes: OS#3348<br>---<br>M Transceiver52M/device/usrp1/USRPDevice.cpp<br>1 file changed, 12 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/25/9625/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Transceiver52M/device/usrp1/USRPDevice.cpp b/Transceiver52M/device/usrp1/USRPDevice.cpp</span><br><span>index 7a31c97..5705e22 100644</span><br><span>--- a/Transceiver52M/device/usrp1/USRPDevice.cpp</span><br><span>+++ b/Transceiver52M/device/usrp1/USRPDevice.cpp</span><br><span>@@ -655,5 +655,17 @@</span><br><span>                           const std::vector<std::string>& tx_paths,</span><br><span>                          const std::vector<std::string>& rx_paths)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+       if (tx_sps != rx_sps) {</span><br><span style="color: hsl(120, 100%, 40%);">+               LOG(ERROR) << "USRP1 requires tx_sps == rx_sps";</span><br><span style="color: hsl(120, 100%, 40%);">+              return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (chans != 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+             LOG(ERROR) << "USRP1 supports only 1 channel";</span><br><span style="color: hsl(120, 100%, 40%);">+                return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (lo_offset != 0.0) {</span><br><span style="color: hsl(120, 100%, 40%);">+               LOG(ERROR) << "USRP1 doesn't support lo_offset";</span><br><span style="color: hsl(120, 100%, 40%);">+          return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span>    return new USRPDevice(tx_sps, rx_sps, iface, chans, lo_offset, tx_paths, rx_paths);</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9625">change 9625</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/9625"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-trx </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic7308ce0c57439fe97668bd31801c4bf76b797ad </div>
<div style="display:none"> Gerrit-Change-Number: 9625 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>