diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-11-02 02:28:07 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-11-02 03:15:10 +0700 |
commit | 41eafec3f6ced5a389180629456d80d0a325d97c (patch) | |
tree | f99f621f518dfed71a7ab1179b9567136b07fa99 /src | |
parent | 6ab55074f88de97ab1e3600d272cd52182ec26ce (diff) |
osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config
As can be seen from include/osmocom/bsc/gsm_data.h:
- pchan_from_config - channel configuration from the VTY/config
(can be changed from the VTY at runtime, should not affect
the existing RSL/OML connections);
- pchan_on_init - channel configuration after the OML link is
established (pchan_from_config is copied here);
- pchan_is - the *actual* channel configuration currently active.
Since we call bootstrap_bts() during the initialization, even before
establishing any OML/RSL connections, neither pchan_on_init nor
pchan_is can be used. Let's use pchan_from_config instead.
This change fixes the problem discovered by @mqng2 and reported
together with https://gerrit.osmocom.org/c/osmo-bsc/+/15909:
CCCH_CONF in System Information Type 3 does not reflect the
actual channel configuration, and always indicates a single
CCCH combined with SDCCH. This also misleads the lchan
allocation algorithm during the MO connection establishment.
Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bsc/osmo_bsc_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index f63a38882..41e810b2e 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -463,7 +463,7 @@ static int bootstrap_bts(struct gsm_bts *bts) bts->si_common.chan_desc.mscr = 1; /* Determine the value of CCCH_CONF. Is TS0/C0 combined? */ - if (bts->c0->ts[0].pchan_is != GSM_PCHAN_CCCH) { + if (bts->c0->ts[0].pchan_from_config != GSM_PCHAN_CCCH) { bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C; /* Limit reserved block to 2 on combined channel according to @@ -476,9 +476,9 @@ static int bootstrap_bts(struct gsm_bts *bts) } } else { /* Non-combined TS0/C0 configuration */ /* There can be additional CCCHs on even timeslot numbers */ - n += (bts->c0->ts[2].pchan_is == GSM_PCHAN_CCCH); - n += (bts->c0->ts[4].pchan_is == GSM_PCHAN_CCCH); - n += (bts->c0->ts[6].pchan_is == GSM_PCHAN_CCCH); + n += (bts->c0->ts[2].pchan_from_config == GSM_PCHAN_CCCH); + n += (bts->c0->ts[4].pchan_from_config == GSM_PCHAN_CCCH); + n += (bts->c0->ts[6].pchan_from_config == GSM_PCHAN_CCCH); bts->si_common.chan_desc.ccch_conf = (n << 1); } |