<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmocom-bb/+/18095">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">l1ctl: preserve TS configuration for HR channels<br><br>When L1CTL_DM_EST_REQ is received, the respective timeslot is<br>reconfigured to the requested channel type (TCH/H or TCH/F). The<br>reconfiguration is done every time, an existing timeslot configuration<br>including the lchans is overwritten. This works fine with all channel<br>types that exclusively use the timeslot. But in the case of a TCH/H a<br>single timeslot is shared by two independed channels, so if we see that<br>the timeslot we intend to configure as TCH/H is already configured as<br>TCH/H, we must leave the the configuration as it is in order not to<br>disturb the other TCH/H<br><br>Change-Id: I3ac0ae22c40e3cb99c44f1156000c6909f739ad4<br>Related: OS#4365<br>---<br>M src/host/trxcon/l1ctl.c<br>1 file changed, 16 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/18095/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c</span><br><span>index 04325bc..17bd698 100644</span><br><span>--- a/src/host/trxcon/l1ctl.c</span><br><span>+++ b/src/host/trxcon/l1ctl.c</span><br><span>@@ -658,11 +658,23 @@</span><br><span> l1l->trx->tsc = est_req->tsc;</span><br><span> </span><br><span> /* Configure requested TS */</span><br><span style="color: hsl(0, 100%, 40%);">- rc = sched_trx_configure_ts(l1l->trx, tn, config);</span><br><span style="color: hsl(120, 100%, 40%);">+ /* NOTE: When (re)configuring a timeslot for TCH/H we need to be</span><br><span style="color: hsl(120, 100%, 40%);">+ * careful not to disturb an already existing HR channel.</span><br><span style="color: hsl(120, 100%, 40%);">+ * sched_trx_configure_ts() resets the TS configuration, including</span><br><span style="color: hsl(120, 100%, 40%);">+ * all lchans completely. This is safe for all types uses, except</span><br><span style="color: hsl(120, 100%, 40%);">+ * for HR, where two independed channels share one timeslot. So</span><br><span style="color: hsl(120, 100%, 40%);">+ * if we see that the TS is already set up for HR and the channel</span><br><span style="color: hsl(120, 100%, 40%);">+ * we intend to set up is HR too, we leave the TS configuration</span><br><span style="color: hsl(120, 100%, 40%);">+ * as it is. */</span><br><span> ts = l1l->trx->ts_list[tn];</span><br><span style="color: hsl(0, 100%, 40%);">- if (rc) {</span><br><span style="color: hsl(0, 100%, 40%);">- rc = -EINVAL;</span><br><span style="color: hsl(0, 100%, 40%);">- goto exit;</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ts == NULL || config != GSM_PCHAN_TCH_H</span><br><span style="color: hsl(120, 100%, 40%);">+ || ts->mf_layout->chan_config != GSM_PCHAN_TCH_H) {</span><br><span style="color: hsl(120, 100%, 40%);">+ rc = sched_trx_configure_ts(l1l->trx, tn, config);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (rc) {</span><br><span style="color: hsl(120, 100%, 40%);">+ rc = -EINVAL;</span><br><span style="color: hsl(120, 100%, 40%);">+ goto exit;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ ts = l1l->trx->ts_list[tn];</span><br><span> }</span><br><span> </span><br><span> /* Activate only requested lchans */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmocom-bb/+/18095">change 18095</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/osmocom-bb/+/18095"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3ac0ae22c40e3cb99c44f1156000c6909f739ad4 </div>
<div style="display:none"> Gerrit-Change-Number: 18095 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>