From 6314c57fec5bbd16bbd97a9c7ee1369c4d205777 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 30 May 2016 15:03:18 +0200 Subject: move t3212 to network level (periodic lu) Set the T3212 default value in struct gsm_network and take that value when creating a BTS. Adjust VTY accordingly. Change-Id: Ifb730f9d0106fe195adc30459a39290a07313b50 --- openbsc/include/openbsc/gsm_data.h | 3 +++ openbsc/src/libbsc/bsc_vty.c | 12 +++++------- openbsc/src/libcommon-cs/common_cs.c | 3 +++ openbsc/src/libcommon/gsm_data.c | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 5e341db76..ac8143e32 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -447,6 +447,9 @@ struct gsm_network { uint16_t gsup_server_port; struct vlr_instance *vlr; + + /* Periodic location update default value */ + uint8_t t3212; }; struct osmo_esme; diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index d8a234a03..f531dd7bf 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -591,13 +591,6 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts) (sp->penalty_time*20)+20, VTY_NEWLINE); } - /* Is periodic LU enabled or disabled? */ - if (bts->si_common.chan_desc.t3212 == 0) - vty_out(vty, " no periodic location update%s", VTY_NEWLINE); - else - vty_out(vty, " periodic location update %u%s", - bts->si_common.chan_desc.t3212 * 6, VTY_NEWLINE); - vty_out(vty, " radio-link-timeout %d%s", get_radio_link_timeout(&bts->si_common.cell_options), VTY_NEWLINE); @@ -838,6 +831,11 @@ static int config_write_net(struct vty *vty) vty_out(vty, " timezone %d %d%s", gsmnet->tz.hr, gsmnet->tz.mn, VTY_NEWLINE); } + if (gsmnet->t3212 == 0) + vty_out(vty, " no periodic location update%s", VTY_NEWLINE); + else + vty_out(vty, " periodic location update %u%s", + gsmnet->t3212 * 6, VTY_NEWLINE); return CMD_SUCCESS; } diff --git a/openbsc/src/libcommon-cs/common_cs.c b/openbsc/src/libcommon-cs/common_cs.c index 20fbab8c4..7a0530834 100644 --- a/openbsc/src/libcommon-cs/common_cs.c +++ b/openbsc/src/libcommon-cs/common_cs.c @@ -59,6 +59,9 @@ struct gsm_network *gsm_network_init(void *ctx, net->country_code = country_code; net->network_code = network_code; + /* Use 30 min periodic update interval as sane default */ + net->t3212 = 5; + INIT_LLIST_HEAD(&net->trans_list); INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c index f431e3843..511c998aa 100644 --- a/openbsc/src/libcommon/gsm_data.c +++ b/openbsc/src/libcommon/gsm_data.c @@ -340,7 +340,7 @@ struct gsm_bts *gsm_bts_alloc_register(struct gsm_network *net, enum gsm_bts_typ bts->si_common.chan_desc.att = 1; /* attachment required */ bts->si_common.chan_desc.bs_pa_mfrms = RSL_BS_PA_MFRMS_5; /* paging frames */ bts->si_common.chan_desc.bs_ag_blks_res = 1; /* reserved AGCH blocks */ - bts->si_common.chan_desc.t3212 = 5; /* Use 30 min periodic update interval as sane default */ + bts->si_common.chan_desc.t3212 = net->t3212; /* Use network's current value */ set_radio_link_timeout(&bts->si_common.cell_options, 32); /* Use RADIO LINK TIMEOUT of 32 seconds */ -- cgit v1.2.3