aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/oml.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-06-08 01:46:50 +0200
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-06-08 02:04:53 +0200
commitfc8c9880d97636a4bec3b50feb1b8c0c05a49ef8 (patch)
tree2726c0132f172b16f71f008cc86abedc99c4f6c3 /src/common/oml.c
parent628853de747d4b4e2797cc1af85bd9697aeecdcc (diff)
conf_lchans_as_pchan(): initialize all lchans with GSM_LCHAN_NONE
This function is called during the OML bootstrapping, and also when a dynamic timeslot switches between PDCH and TCH/{F,H}. In the later case, after switching from TCH/{F,H} to PDCH, some lchans might still have the old type assigned. Let's ensure that all logical channels are properly updated. Change-Id: I44726f2bfb979c2fa2f5f30c5b11700cf4b3399d Related: SYS#5313, OS#1569
Diffstat (limited to 'src/common/oml.c')
-rw-r--r--src/common/oml.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 6acc6b1d..8b84f859 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -826,6 +826,9 @@ static inline void lchans_type_set(struct gsm_bts_trx_ts *ts,
int conf_lchans_as_pchan(struct gsm_bts_trx_ts *ts,
enum gsm_phys_chan_config pchan)
{
+ /* Initialize all lchans with GSM_LCHAN_NONE first */
+ lchans_type_set(ts, GSM_LCHAN_NONE, ARRAY_SIZE(ts->lchan));
+
switch (pchan) {
case GSM_PCHAN_CCCH_SDCCH4_CBCH:
case GSM_PCHAN_CCCH_SDCCH4: