<p>Pau Espin Pedrol <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/11954">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bsc: timeslot_fsm: Fix ts_is_lchan_waiting_for_pchan<br><br>If ts_is_lchan_waiting_for_pchan() wasn't accounting for TCH lchans<br>waiting for TS to deactive PDCH in order to setup the TS as TCH.<br><br>Since now TCH lchan is catched by ts_is_lchan_waiting_for_pchan() when<br>TS state is TS_ST_WAIT_PDCH_DEACT, there's no need to check for that<br>case in caller ts_is_pchan_switching(), since it will never hit because<br>the callee returns true in that case now.<br><br>See osmo-bsc I9cedb77d6578597f1febab36c54b2ee427c7a4a2 for similar<br>extensive explanation.<br><br>Change-Id: Ib03e5a91438a5b74a04e69f81fab565842b02b66<br>---<br>M src/osmo-bsc/timeslot_fsm.c<br>1 file changed, 5 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c</span><br><span>index 1450491..269fcd5 100644</span><br><span>--- a/src/osmo-bsc/timeslot_fsm.c</span><br><span>+++ b/src/osmo-bsc/timeslot_fsm.c</span><br><span>@@ -857,7 +857,7 @@</span><br><span> bool ts_is_lchan_waiting_for_pchan(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config *target_pchan)</span><br><span> {</span><br><span>  struct gsm_lchan *lchan;</span><br><span style="color: hsl(0, 100%, 40%);">-        ts_for_each_lchan(lchan, ts) {</span><br><span style="color: hsl(120, 100%, 40%);">+        ts_for_each_potential_lchan(lchan, ts) {</span><br><span>             if (lchan->fi->state == LCHAN_ST_WAIT_TS_READY) {</span><br><span>                      if (target_pchan)</span><br><span>                            *target_pchan = gsm_pchan_by_lchan_type(lchan->type);</span><br><span>@@ -887,13 +887,15 @@</span><br><span> </span><br><span>         switch (ts->fi->state) {</span><br><span>       case TS_ST_WAIT_PDCH_ACT:</span><br><span style="color: hsl(120, 100%, 40%);">+             /* When switching to PDCH, there are no lchans and we are</span><br><span style="color: hsl(120, 100%, 40%);">+              * telling the PCU to take over the timeslot. */</span><br><span>             if (target_pchan)</span><br><span>                    *target_pchan = GSM_PCHAN_PDCH;</span><br><span>              return true;</span><br><span> </span><br><span>     case TS_ST_WAIT_PDCH_DEACT:</span><br><span style="color: hsl(0, 100%, 40%);">-             /* If we were switching to a specific pchan kind, an lchan would be waiting. So this must</span><br><span style="color: hsl(0, 100%, 40%);">-                * be NONE then. */</span><br><span style="color: hsl(120, 100%, 40%);">+           /* If lchan started a PDCH deact but got somehow released while</span><br><span style="color: hsl(120, 100%, 40%);">+                * waiting for PDCH DEACT (N)ACK */</span><br><span>          if (target_pchan)</span><br><span>                    *target_pchan = GSM_PCHAN_NONE;</span><br><span>              return true;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11954">change 11954</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/11954"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ib03e5a91438a5b74a04e69f81fab565842b02b66 </div>
<div style="display:none"> Gerrit-Change-Number: 11954 </div>
<div style="display:none"> Gerrit-PatchSet: 9 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Assignee: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-CC: Vadim Yanitskiy <axilirator@gmail.com> </div>