<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/25527">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bts-trx: Avoid race condition configuring TS-specific TSC values<br><br>In OML, if Set Attributes comes first for Channel object and then for<br>BTS object, BSIC will still not be set. Hence, when applying Channel<br>(TS) specific TSC, the code would compare against an unset value,<br>enabling use of TRXC extensions (which osmo-trx doesn't support)<br>without need for it, since actually the TSC of the TS matches the BSIC<br>of the BTS once both are set.<br><br>In order to fix it, don't check for the BSIC when receiving the OML<br>messages, but rather later when we apply the settings to the the lower<br>layers once trx_provision_fsm allows for it.<br><br>Fixes: 3c1151f9456bdf0d7348c27c0cabbb41e84fcbbc<br>Change-Id: I49fc7e35acb44ecc4f37ae71acd4c684248548e7<br>---<br>M src/osmo-bts-trx/l1_if.c<br>M src/osmo-bts-trx/trx_if.c<br>2 files changed, 4 insertions(+), 2 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/27/25527/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c</span><br><span>index 0b96017..97c140e 100644</span><br><span>--- a/src/osmo-bts-trx/l1_if.c</span><br><span>+++ b/src/osmo-bts-trx/l1_if.c</span><br><span>@@ -292,7 +292,7 @@</span><br><span> </span><br><span> </span><br><span>       struct trx_prov_ev_cfg_ts_data data = { .tn = tn, .slottype = slottype };</span><br><span style="color: hsl(0, 100%, 40%);">-       if (ts->tsc_set != 0 || ts->tsc != BTS_TSC(ts->trx->bts)) {</span><br><span style="color: hsl(120, 100%, 40%);">+       if (ts->tsc_set != 0) {</span><br><span>           /* On TRXC we use 3GPP compliant numbering, so +1 */</span><br><span>                 data.tsc_set = ts->tsc_set + 1;</span><br><span>           data.tsc_val = ts->tsc;</span><br><span>diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c</span><br><span>index 22e912d..29a3663 100644</span><br><span>--- a/src/osmo-bts-trx/trx_if.c</span><br><span>+++ b/src/osmo-bts-trx/trx_if.c</span><br><span>@@ -332,8 +332,10 @@</span><br><span>                  trx_if_cmd_setslot_cb *cb)</span><br><span> {</span><br><span>       const struct trx_config *cfg = &l1h->config;</span><br><span style="color: hsl(120, 100%, 40%);">+   const struct phy_instance *pinst = l1h->phy_inst;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-        if (cfg->setslot[tn].tsc_valid) { /* PHY is instructed to use a custom TSC */</span><br><span style="color: hsl(120, 100%, 40%);">+      if (cfg->setslot[tn].tsc_valid && cfg->setslot[tn].tsc_val != BTS_TSC(pinst->trx->bts)) {</span><br><span style="color: hsl(120, 100%, 40%);">+         /* PHY is instructed to use a custom TSC */</span><br><span>          return trx_ctrl_cmd_cb(l1h, 1, cb, "SETSLOT", "%u %u C%u/S%u",</span><br><span>                                  tn, cfg->setslot[tn].slottype,</span><br><span>                                    cfg->setslot[tn].tsc_val,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/25527">change 25527</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/+/25527"/><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: I49fc7e35acb44ecc4f37ae71acd4c684248548e7 </div>
<div style="display:none"> Gerrit-Change-Number: 25527 </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>