aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-03-10 11:49:35 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2013-07-29 12:39:28 +0200
commitc88d4177e968ba70a484faba7726a5cf27fdb57e (patch)
treeb07667c586b97f925f06c593cfe725be80cedb46
parent762a6237f121976c83a714be3036f3e92a5d3b4b (diff)
Add option to set RADIO LINK TIMEOUT value via VTY
-rw-r--r--openbsc/src/libbsc/bsc_init.c3
-rw-r--r--openbsc/src/libbsc/bsc_vty.c17
-rw-r--r--openbsc/src/libcommon/gsm_data.c1
3 files changed, 18 insertions, 3 deletions
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 8fd72cf46..55b577b54 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -434,9 +434,6 @@ static int bootstrap_bts(struct gsm_bts *bts)
return -EINVAL;
}
- /* some defaults for our system information */
- bts->si_common.cell_options.radio_link_timeout = 7; /* 12 */
-
/* allow/disallow DTXu */
if (bts->network->dtx_enabled)
bts->si_common.cell_options.dtx = 0;
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 75e95cbde..ad1911bd6 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -513,6 +513,9 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
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",
+ (bts->si_common.cell_options.radio_link_timeout + 1) << 2,
+ VTY_NEWLINE);
vty_out(vty, " channel allocator %s%s",
bts->chan_alloc_reverse ? "descending" : "ascending",
VTY_NEWLINE);
@@ -2062,6 +2065,19 @@ DEFUN(cfg_bts_no_per_loc_upd, cfg_bts_no_per_loc_upd_cmd,
struct gsm_bts *bts = vty->index;
bts->si_common.chan_desc.t3212 = 0;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_radio_link_timeout, cfg_bts_radio_link_timeout_cmd,
+ "radio-link-timeout <4-64>",
+ "Radio link timeout criterion (BTS side)\n"
+ "Radio link timeout value (lost SACCH block)\n")
+{
+ struct gsm_bts *bts = vty->index;
+
+ bts->si_common.cell_options.radio_link_timeout = (atoi(argv[0])>>2) - 1;
+
return CMD_SUCCESS;
}
@@ -3254,6 +3270,7 @@ int bsc_vty_init(const struct log_info *cat)
install_element(BTS_NODE, &cfg_bts_temp_ofs_inf_cmd);
install_element(BTS_NODE, &cfg_bts_penalty_time_cmd);
install_element(BTS_NODE, &cfg_bts_penalty_time_rsvd_cmd);
+ install_element(BTS_NODE, &cfg_bts_radio_link_timeout_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_mode_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_ns_timer_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_rac_cmd);
diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c
index 5f7e32e73..79a514d14 100644
--- a/openbsc/src/libcommon/gsm_data.c
+++ b/openbsc/src/libcommon/gsm_data.c
@@ -407,6 +407,7 @@ struct gsm_bts *gsm_bts_alloc_register(struct gsm_network *net, enum gsm_bts_typ
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.cell_options.radio_link_timeout = 7; /* Use RADIO LINK TIMEOUT of 32 */
llist_add_tail(&bts->list, &net->bts_list);