aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-09-16 17:29:18 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-09-16 19:35:52 +0200
commitdf17af689f56ac2608f091fd9b813cc4084d42ed (patch)
tree218b60ea301ef0e90862d71299a4ecb29a8ac3ad
parent03e9972695df47ecc42f89e7cd4e157a95909133 (diff)
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
-rw-r--r--src/common/pcu_sock.c7
1 files changed, 5 insertions, 2 deletions
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;
}