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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( 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
Do not count the number of additional CCCHs if TS0 is using combined
channel configuration (CCCH+SDCCH4), because they are only allowed
if TS0 is not combined with SDCCH.
Get rid of the 'switch' statement using the following formula:
CCCH_CONFIG = (N << 1)
where N is the number of additional CCCHs.
Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957
---
M src/osmo-bsc/osmo_bsc_main.c
1 file changed, 10 insertions(+), 23 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 3acdf30..f63a388 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;
@@ -459,16 +459,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) {
@@ -477,22 +474,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: 2
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191105/bb733a68/attachment.htm>