aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-07-20 10:27:31 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-01-28 15:41:26 +0100
commite30d40de0e0b9b55c551d87015a791d4a9bc418b (patch)
tree6c377ffc41bc26eec21d52a16fbecea061172c02 /openbsc/src/libbsc/bsc_vty.c
parente7ea08379e1b8aa13e6db52558fbdd17002d0e3e (diff)
bts: Allow to exclude a BTS from the global RF lock handling
Some BTS might be in locations where they can run all the time, allow to exclude them from the global lock handling.
Diffstat (limited to 'openbsc/src/libbsc/bsc_vty.c')
-rw-r--r--openbsc/src/libbsc/bsc_vty.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index e89317ddd..ec92c1875 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -580,6 +580,9 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
config_write_bts_gprs(vty, bts);
+ if (bts->excl_from_rf_lock)
+ vty_out(vty, " rf-lock-exclude%s", VTY_NEWLINE);
+
if (bts->model->config_write_bts)
bts->model->config_write_bts(vty, bts);
@@ -2443,6 +2446,28 @@ DEFUN(cfg_bts_si5_neigh, cfg_bts_si5_neigh_cmd,
return CMD_SUCCESS;
}
+#define EXCL_RFLOCK_STR "Exclude this BTS from the global RF Lock\n"
+
+DEFUN(cfg_bts_excl_rf_lock,
+ cfg_bts_excl_rf_lock_cmd,
+ "rf-lock-exclude",
+ EXCL_RFLOCK_STR)
+{
+ struct gsm_bts *bts = vty->index;
+ bts->excl_from_rf_lock = 1;
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_no_excl_rf_lock,
+ cfg_bts_no_excl_rf_lock_cmd,
+ "no rf-lock-exclude",
+ NO_STR EXCL_RFLOCK_STR)
+{
+ struct gsm_bts *bts = vty->index;
+ bts->excl_from_rf_lock = 0;
+ return CMD_SUCCESS;
+}
+
#define TRX_TEXT "Radio Transceiver\n"
/* per TRX configuration */
@@ -3037,6 +3062,8 @@ int bsc_vty_init(const struct log_info *cat)
install_element(BTS_NODE, &cfg_bts_neigh_mode_cmd);
install_element(BTS_NODE, &cfg_bts_neigh_cmd);
install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd);
+ install_element(BTS_NODE, &cfg_bts_excl_rf_lock_cmd);
+ install_element(BTS_NODE, &cfg_bts_no_excl_rf_lock_cmd);
install_element(BTS_NODE, &cfg_trx_cmd);
install_node(&trx_node, dummy_config_write);