diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-05-04 23:49:59 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-05-05 20:11:03 +0200 |
commit | 94b093bffdc1fdf6f682897b263252e101871fcc (patch) | |
tree | 6aa939104df493f3535d5c334734bc5b0049ed2a | |
parent | ac5e2bc3298e3efc202ce5b174726f6b470dec66 (diff) |
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
-rw-r--r-- | src/common/rsl.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c index cfdb19fd..1dc200d0 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -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); |