From 2a896070a744327968770d3f9c23e6e5410f6f57 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 16 Aug 2011 19:47:39 +0200 Subject: bsc: Auto RF Off in case of missing MSC connection For short IP failures we want the RF to stay up and wait for the re-connect but in case the A-link is gone too long it is good to switch off the RF and wait for commands to enable it again. --- openbsc/src/osmo-bsc/osmo_bsc_vty.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'openbsc/src/osmo-bsc/osmo_bsc_vty.c') diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c index f50268314..8cd80f99c 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c @@ -168,6 +168,10 @@ static int config_write_bsc(struct vty *vty) vty_out(vty, " bsc-rf-socket %s%s", bsc->rf_ctrl_name, VTY_NEWLINE); + if (bsc->auto_off_timeout != -1) + vty_out(vty, " bsc-auto-rf-off %d%s", + bsc->auto_off_timeout, VTY_NEWLINE); + return CMD_SUCCESS; } @@ -462,6 +466,26 @@ DEFUN(cfg_net_rf_socket, return CMD_SUCCESS; } +DEFUN(cfg_net_rf_off_time, + cfg_net_rf_off_time_cmd, + "bsc-auto-rf-off <1-65000>", + "Disable RF on MSC Connection\n" "Timeout\n") +{ + struct osmo_bsc_data *data = osmo_bsc_data(vty); + data->auto_off_timeout = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_net_no_rf_off_time, + cfg_net_no_rf_off_time_cmd, + "no bsc-auto-rf-off", + NO_STR "Disable RF on MSC Connection\n") +{ + struct osmo_bsc_data *data = osmo_bsc_data(vty); + data->auto_off_timeout = -1; + return CMD_SUCCESS; +} + DEFUN(show_statistics, show_statistics_cmd, "show statistics", @@ -498,8 +522,8 @@ int bsc_vty_init_extra(void) install_element(BSC_NODE, &cfg_net_bsc_mid_call_text_cmd); install_element(BSC_NODE, &cfg_net_bsc_mid_call_timeout_cmd); install_element(BSC_NODE, &cfg_net_rf_socket_cmd); - - + install_element(BSC_NODE, &cfg_net_rf_off_time_cmd); + install_element(BSC_NODE, &cfg_net_no_rf_off_time_cmd); install_node(&msc_node, config_write_msc); install_default(MSC_NODE); -- cgit v1.2.3