From df17af689f56ac2608f091fd9b813cc4084d42ed Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 16 Sep 2020 17:29:18 +0200 Subject: pcu_sock: Only announce dyn TS already configured by lower layers Avoid announcing to PCU as available a dyn TS not yet fully configured in the phy. Otherwise when we receive the Chan Activation over the PCU sock while pchan_is still is not PDCH, and we fail to fully activate the channel at that time. See previous commit description for more information on the issue. We still want to check for pchan_want because we actually want to stop announcing the TS when it is in progress of being changed to TCH. This configuration change is continued/finished once we receive the resulting Release from PCU. Change-Id: I8e2b170c1f94e7dfe2576a1fc899bf9c8a826a44 --- src/common/pcu_sock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 34489b78..94643111 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -104,9 +104,12 @@ static bool ts_should_be_pdch(const struct gsm_bts_trx_ts *ts) /* * When we're busy de-/activating the PDCH, we first set * ts->dyn.pchan_want, tell the PCU about it and wait for a - * response. So only care about dyn.pchan_want here. + * response. To make it available to PCU, we want to make sure + * it's already configured by phy (pchan_is==PDCH) and that we + * are not in progress of removing it (pchan_want=None). */ - return ts->dyn.pchan_want == GSM_PCHAN_PDCH; + + return ts->dyn.pchan_is == GSM_PCHAN_PDCH && ts->dyn.pchan_want == GSM_PCHAN_PDCH; default: return false; } -- cgit v1.2.3