<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/25734">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm_lchan_interf_meas_calc_avg(): adapt to the ordering of boundaries<br><br>Change-Id: I88d841d8d835bde8392c7b606b28c9070b7adc6e<br>Related: SYS#5313<br>---<br>M src/common/lchan.c<br>1 file changed, 12 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/34/25734/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/common/lchan.c b/src/common/lchan.c</span><br><span>index f7ee33b..af408a5 100644</span><br><span>--- a/src/common/lchan.c</span><br><span>+++ b/src/common/lchan.c</span><br><span>@@ -366,10 +366,18 @@</span><br><span>        /* Calculate the average of all collected samples */</span><br><span>         meas_avg = meas_sum / (int) meas_num;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       /* Determine the band using interference boundaries from BSC */</span><br><span style="color: hsl(0, 100%, 40%);">- for (b = 0; b < ARRAY_SIZE(bts->interference.boundary); b++) {</span><br><span style="color: hsl(0, 100%, 40%);">-            if (meas_avg >= bts->interference.boundary[b])</span><br><span style="color: hsl(0, 100%, 40%);">-                    break; /* Current 'b' is the band value */</span><br><span style="color: hsl(120, 100%, 40%);">+    /* Determine the band using interference boundaries from BSC</span><br><span style="color: hsl(120, 100%, 40%);">+   * FIXME: maybe rather inverse bts->interference.boundary in oml.c? */</span><br><span style="color: hsl(120, 100%, 40%);">+     if (bts->interference.boundary[0] >= bts->interference.boundary[1]) {</span><br><span style="color: hsl(120, 100%, 40%);">+                for (b = 0; b < ARRAY_SIZE(bts->interference.boundary); b++) {</span><br><span style="color: hsl(120, 100%, 40%);">+                  if (meas_avg >= bts->interference.boundary[b])</span><br><span style="color: hsl(120, 100%, 40%);">+                          break; /* Current 'b' is the band value */</span><br><span style="color: hsl(120, 100%, 40%);">+            }</span><br><span style="color: hsl(120, 100%, 40%);">+     } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              for (b = 0; b < ARRAY_SIZE(bts->interference.boundary); b++) {</span><br><span style="color: hsl(120, 100%, 40%);">+                  if (meas_avg >= bts->interference.boundary[b])</span><br><span style="color: hsl(120, 100%, 40%);">+                          break; /* Current 'b' is the band value */</span><br><span style="color: hsl(120, 100%, 40%);">+            }</span><br><span>    }</span><br><span> </span><br><span>        LOGPLCHAN(lchan, DL1C, LOGL_DEBUG,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/25734">change 25734</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/c/osmo-bts/+/25734"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I88d841d8d835bde8392c7b606b28c9070b7adc6e </div>
<div style="display:none"> Gerrit-Change-Number: 25734 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>