mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 04:53:24 +00:00
bsc_init: Fix ccch description in SI messages
The previous code just hardcoded RSL_BCCH_CCCH_CONF_1_C, but we need to inspect the timeslot config to know what to use. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
committed by
Holger Hans Peter Freyther
parent
0777fb2d32
commit
1884f89d9b
@@ -975,6 +975,8 @@ void input_event(int event, enum e1inp_sign_type type, struct gsm_bts_trx *trx)
|
|||||||
|
|
||||||
static int bootstrap_bts(struct gsm_bts *bts)
|
static int bootstrap_bts(struct gsm_bts *bts)
|
||||||
{
|
{
|
||||||
|
int i, n;
|
||||||
|
|
||||||
switch (bts->band) {
|
switch (bts->band) {
|
||||||
case GSM_BAND_1800:
|
case GSM_BAND_1800:
|
||||||
if (bts->c0->arfcn < 512 || bts->c0->arfcn > 885) {
|
if (bts->c0->arfcn < 512 || bts->c0->arfcn > 885) {
|
||||||
@@ -1011,9 +1013,33 @@ static int bootstrap_bts(struct gsm_bts *bts)
|
|||||||
|
|
||||||
/* Control Channel Description */
|
/* Control Channel Description */
|
||||||
bts->si_common.chan_desc.att = 1;
|
bts->si_common.chan_desc.att = 1;
|
||||||
bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C;
|
|
||||||
bts->si_common.chan_desc.bs_pa_mfrms = RSL_BS_PA_MFRMS_5;
|
bts->si_common.chan_desc.bs_pa_mfrms = RSL_BS_PA_MFRMS_5;
|
||||||
/* T3212 is set from vty/config */
|
/* T3212 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 == GSM_PCHAN_CCCH ? 1 : 0;
|
||||||
|
|
||||||
|
switch (n) {
|
||||||
|
case 0:
|
||||||
|
bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/* some defaults for our system information */
|
/* some defaults for our system information */
|
||||||
bts->si_common.cell_options.radio_link_timeout = 2; /* 12 */
|
bts->si_common.cell_options.radio_link_timeout = 2; /* 12 */
|
||||||
|
|||||||
Reference in New Issue
Block a user