dyn TS: rx_rf_chan_rel: properly mark PDCH rel when no PCU, clarify

When the PCU is not connected, we immediately call rsl_tx_rf_rel_ack() because
we don't need to wait for a PDCH deactivation. Fix: properly mark rel_act_kind
= LCHAN_REL_ACT_PCU to invoke identical behavior as when the PCU were involved.

(When the PCU is connected, a PDCH release on an Osmocom style dyn TS causes an
actual release of the PDCH TS, and then triggers an rsl_tx_rf_rel_ack() with
rel_act_kind == LCHAN_REL_ACT_PCU.)

Clarify the code flow: rc == 1 is the special case of no PCU being connected,
so have that in a separate if{}.

Change-Id: I654b963815b32fcbce050c2e15f3190c97bc259f
This commit is contained in:
Neels Hofmeyr 2018-05-04 23:49:59 +02:00
parent ac5e2bc329
commit 94b093bffd
1 changed files with 7 additions and 4 deletions

View File

@ -1182,10 +1182,13 @@ static int rsl_rx_rf_chan_rel(struct gsm_lchan *lchan, uint8_t chan_nr)
if (lchan->ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH
&& lchan->ts->dyn.pchan_is == GSM_PCHAN_PDCH) {
rc = dyn_ts_pdch_release(lchan);
if (rc != 1)
return rc;
/* If the PCU is not connected, continue right away. */
return rsl_tx_rf_rel_ack(lchan);
if (rc == 1) {
/* If the PCU is not connected, continue to rel ack right away. */
lchan->rel_act_kind = LCHAN_REL_ACT_PCU;
return rsl_tx_rf_rel_ack(lchan);
}
/* Waiting for PDCH release */
return rc;
}
l1sap_chan_rel(lchan->ts->trx, chan_nr);