<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/15934">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  fixeria: Verified
  pespin: Looks good to me, but someone else must approve
  mqng2: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config<br><br>As can be seen from include/osmocom/bsc/gsm_data.h:<br><br>  - pchan_from_config - channel configuration from the VTY/config<br>    (can be changed from the VTY at runtime, should not affect<br>    the existing RSL/OML connections);<br>  - pchan_on_init - channel configuration after the OML link is<br>    established (pchan_from_config is copied here);<br>  - pchan_is - the *actual* channel configuration currently active.<br><br>Since we call bootstrap_bts() during the initialization, even before<br>establishing any OML/RSL connections, neither pchan_on_init nor<br>pchan_is can be used. Let's use pchan_from_config instead.<br><br>This change fixes the problem discovered by @mqng2 and reported<br>together with https://gerrit.osmocom.org/c/osmo-bsc/+/15909:<br><br>  CCCH_CONF in System Information Type 3 does not reflect the<br>  actual channel configuration, and always indicates a single<br>  CCCH combined with SDCCH. This also misleads the lchan<br>  allocation algorithm during the MO connection establishment.<br><br>Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd<br>---<br>M src/osmo-bsc/osmo_bsc_main.c<br>1 file changed, 4 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c</span><br><span>index f63a388..41e810b 100644</span><br><span>--- a/src/osmo-bsc/osmo_bsc_main.c</span><br><span>+++ b/src/osmo-bsc/osmo_bsc_main.c</span><br><span>@@ -463,7 +463,7 @@</span><br><span>       bts->si_common.chan_desc.mscr = 1;</span><br><span> </span><br><span>    /* Determine the value of CCCH_CONF. Is TS0/C0 combined? */</span><br><span style="color: hsl(0, 100%, 40%);">-     if (bts->c0->ts[0].pchan_is != GSM_PCHAN_CCCH) {</span><br><span style="color: hsl(120, 100%, 40%);">+        if (bts->c0->ts[0].pchan_from_config != GSM_PCHAN_CCCH) {</span><br><span>              bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C;</span><br><span> </span><br><span>          /* Limit reserved block to 2 on combined channel according to</span><br><span>@@ -476,9 +476,9 @@</span><br><span>          }</span><br><span>    } else { /* Non-combined TS0/C0 configuration */</span><br><span>             /* There can be additional CCCHs on even timeslot numbers */</span><br><span style="color: hsl(0, 100%, 40%);">-            n += (bts->c0->ts[2].pchan_is == GSM_PCHAN_CCCH);</span><br><span style="color: hsl(0, 100%, 40%);">-         n += (bts->c0->ts[4].pchan_is == GSM_PCHAN_CCCH);</span><br><span style="color: hsl(0, 100%, 40%);">-         n += (bts->c0->ts[6].pchan_is == GSM_PCHAN_CCCH);</span><br><span style="color: hsl(120, 100%, 40%);">+               n += (bts->c0->ts[2].pchan_from_config == GSM_PCHAN_CCCH);</span><br><span style="color: hsl(120, 100%, 40%);">+              n += (bts->c0->ts[4].pchan_from_config == GSM_PCHAN_CCCH);</span><br><span style="color: hsl(120, 100%, 40%);">+              n += (bts->c0->ts[6].pchan_from_config == GSM_PCHAN_CCCH);</span><br><span>             bts->si_common.chan_desc.ccch_conf = (n << 1);</span><br><span>      }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/15934">change 15934</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-bsc/+/15934"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd </div>
<div style="display:none"> Gerrit-Change-Number: 15934 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: mqng2 <minh-quang.nguyen@nutaq.com> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>