This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15933 ) Change subject: osmo_bsc_main.c: simplify computation of CCCH_CONFIG ...................................................................... osmo_bsc_main.c: simplify computation of CCCH_CONFIG Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 10 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/33/15933/1 diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index bf9358f..abfb1bb 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -402,7 +402,7 @@ static int bootstrap_bts(struct gsm_bts *bts) { struct gsm_bts_trx *trx; - int i, n; + unsigned int n = 0; if (!bts->model) return -EFAULT; @@ -458,16 +458,13 @@ /* Control Channel Description is set from vty/config */ - /* Set ccch config by looking at ts config */ - for (n=0, i=0; i<8; i++) - n += bts->c0->ts[i].pchan_is == GSM_PCHAN_CCCH ? 1 : 0; - /* Indicate R99 MSC in SI3 */ bts->si_common.chan_desc.mscr = 1; - switch (n) { - case 0: + /* Determine the value of CCCH_CONF. Is TS0/C0 combined? */ + if (bts->c0->ts[0].pchan_is != 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 3GPP TS 44.018 Table 10.5.2.11.1 */ if (bts->si_common.chan_desc.bs_ag_blks_res > 2) { @@ -476,22 +473,12 @@ bts->si_common.chan_desc.bs_ag_blks_res); bts->si_common.chan_desc.bs_ag_blks_res = 2; } - break; - case 1: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_NC; - break; - case 2: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_2_NC; - break; - case 3: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_3_NC; - break; - case 4: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_4_NC; - break; - default: - LOGP(DNM, LOGL_ERROR, "Unsupported CCCH timeslot configuration\n"); - return -EINVAL; + } 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); + bts->si_common.chan_desc.ccch_conf = (n << 1); } bts->si_common.cell_options.pwrc = 0; /* PWRC not set */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 Gerrit-Change-Number: 15933 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <axilirator at gmail.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191101/acddae50/attachment.htm>