<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/16069">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bts-trx: loops.c: Avoid always clamping MS power to MS power class 1<br><br>The affirmation written there is not true, since actually it depends on<br>the band. For instance, for DCS1800 the maximum MS power is provided by<br>class 3. Let ms_pwr_ctl_lvl() take care of campling instead.<br><br>Change-Id: I744e7c315b818a1e7d3dd2579cd483c693d89b73<br>---<br>M src/osmo-bts-trx/loops.c<br>1 file changed, 1 insertion(+), 10 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/69/16069/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c</span><br><span>index 4b723a0..1f54fee 100644</span><br><span>--- a/src/osmo-bts-trx/loops.c</span><br><span>+++ b/src/osmo-bts-trx/loops.c</span><br><span>@@ -49,7 +49,7 @@</span><br><span>  struct gsm_bts_trx *trx = lchan->ts->trx;</span><br><span>      enum gsm_band band = trx->bts->band;</span><br><span>   int8_t new_power; /* TS 05.05 power level */</span><br><span style="color: hsl(0, 100%, 40%);">-    int8_t new_dbm, current_dbm, bsc_max_dbm, pwclass_max_dbm;</span><br><span style="color: hsl(120, 100%, 40%);">+    int8_t new_dbm, current_dbm, bsc_max_dbm;</span><br><span> </span><br><span>        /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */</span><br><span>       if (diff < 2 && diff > -2)</span><br><span>@@ -89,15 +89,6 @@</span><br><span>        if (new_dbm > bsc_max_dbm)</span><br><span>                new_dbm = bsc_max_dbm;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-      /* Make sure in no case the dBm value is higher than the one of ms</span><br><span style="color: hsl(0, 100%, 40%);">-         power class 1 (the one with more output power) for the given band.</span><br><span style="color: hsl(0, 100%, 40%);">-      Ideally we should catch the MS specific power class and apply it</span><br><span style="color: hsl(0, 100%, 40%);">-        here, but for now let's assume the BSC sent us one taking the power</span><br><span style="color: hsl(0, 100%, 40%);">-         class into account. */</span><br><span style="color: hsl(0, 100%, 40%);">-       pwclass_max_dbm = (int)ms_class_gmsk_dbm(band, 1);</span><br><span style="color: hsl(0, 100%, 40%);">-      if (pwclass_max_dbm >= 0 && new_dbm > pwclass_max_dbm)</span><br><span style="color: hsl(0, 100%, 40%);">-            new_dbm = pwclass_max_dbm;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>   new_power = ms_pwr_ctl_lvl(band, new_dbm);</span><br><span>   if (new_power < 0) {</span><br><span>              LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/16069">change 16069</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/+/16069"/><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: I744e7c315b818a1e7d3dd2579cd483c693d89b73 </div>
<div style="display:none"> Gerrit-Change-Number: 16069 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>