From 981f8b934771460354163dd148a5ecab46dd4476 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 9 Sep 2018 17:01:03 +0200 Subject: CBCH: Fix gsm_bts_get_cbch() When the timeslot FSMs were introduced, the function gsm_bts_get_cbch() was ported to use 'pchan_is'. However, the function is called very early, before pchan_is is actually initialized. Let's make sure we're using the _configured_ channel combination when resolving where the CBCH is (if any) in the BTS. Ever since merging the timeslot FSMs and before this patch, SI4 would never indicate the presence of a CBCH. Change-Id: I6251b5f3e1180ad466e9349a1845e1b91f661c0b Related: OS#3532 --- src/osmo-bsc/gsm_data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 12ab66e93..0718e91ca 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -1204,12 +1204,12 @@ struct gsm_lchan *gsm_bts_get_cbch(struct gsm_bts *bts) struct gsm_lchan *lchan = NULL; struct gsm_bts_trx *trx = bts->c0; - if (trx->ts[0].pchan_is == GSM_PCHAN_CCCH_SDCCH4_CBCH) + if (trx->ts[0].pchan_from_config == GSM_PCHAN_CCCH_SDCCH4_CBCH) lchan = &trx->ts[0].lchan[2]; else { int i; for (i = 0; i < 8; i++) { - if (trx->ts[i].pchan_is == GSM_PCHAN_SDCCH8_SACCH8C_CBCH) { + if (trx->ts[i].pchan_from_config == GSM_PCHAN_SDCCH8_SACCH8C_CBCH) { lchan = &trx->ts[i].lchan[2]; break; } -- cgit v1.2.3