aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-01-20 22:50:06 +0100
committerHarald Welte <laforge@gnumonks.org>2016-02-15 14:27:29 +0100
commite9a17292e8545d5f651e9614c43bc1626e10ac5f (patch)
tree6e2cf1ae92d8c4cd6de786eb4f0f3aab18f9ef91 /src/common/vty.c
parent9b5cff87ecc4b76f9f8a0a86aa64e9394e2a8374 (diff)
LC15/sysmobts: Don't try to refer to fl1h from PHY config
At the time the phy link / phy instance level VTY configuration commands are parsed, we did not yet call l1if_open() and thus pinst->u.{lc15,sysmobts}.hdl == NULL. PHY or PHY instance specific configuration must thus be stored inside the phy_link or phy_instance itself, and not inside the (not yet existing) handle. We solve this by moving around some parameters: * clk_use_eeprom/clk_cal/clk_src/calib_path get replicated in phy_instance * min_qual_{rach,norm} are moved into the generic part (which means that osmo-bts-octphy and osmo-bts-trx should also implement them)
Diffstat (limited to 'src/common/vty.c')
-rw-r--r--src/common/vty.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/common/vty.c b/src/common/vty.c
index 7488fbba..62751772 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -270,6 +270,10 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
const char *name = get_value_string(gsmtap_sapi_names, GSMTAP_CHANNEL_ACCH);
vty_out(vty, " gsmtap-sapi %s%s", osmo_str_tolower(name), VTY_NEWLINE);
}
+ vty_out(vty, " min-qual-rach %.0f%s", btsb->min_qual_rach * 10.0f,
+ VTY_NEWLINE);
+ vty_out(vty, " min-qual-norm %.0f%s", btsb->min_qual_norm * 10.0f,
+ VTY_NEWLINE);
bts_model_config_write_bts(vty, bts);
@@ -532,6 +536,33 @@ DEFUN(cfg_bts_ul_power_target, cfg_bts_ul_power_target_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_bts_min_qual_rach, cfg_bts_min_qual_rach_cmd,
+ "min-qual-rach <-100-100>",
+ "Set the minimum quality level of RACH burst to be accpeted\n"
+ "C/I level in tenth of dB\n")
+{
+ struct gsm_bts *bts = vty->index;
+ struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
+
+ btsb->min_qual_rach = strtof(argv[0], NULL) / 10.0f;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_min_qual_norm, cfg_bts_min_qual_norm_cmd,
+ "min-qual-norm <-100-100>",
+ "Set the minimum quality level of normal burst to be accpeted\n"
+ "C/I level in tenth of dB\n")
+{
+ struct gsm_bts *bts = vty->index;
+ struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
+
+ btsb->min_qual_norm = strtof(argv[0], NULL) / 10.0f;
+
+ return CMD_SUCCESS;
+}
+
+
#define DB_DBM_STR \
"Unit is dB (decibels)\n" \
"Unit is mdB (milli-decibels, or rather 1/10000 bel)\n"
@@ -1001,6 +1032,8 @@ int bts_vty_init(struct gsm_bts *bts, const struct log_info *cat)
install_element(BTS_NODE, &cfg_bts_agch_queue_mgmt_default_cmd);
install_element(BTS_NODE, &cfg_bts_agch_queue_mgmt_params_cmd);
install_element(BTS_NODE, &cfg_bts_ul_power_target_cmd);
+ install_element(BTS_NODE, &cfg_bts_min_qual_rach_cmd);
+ install_element(BTS_NODE, &cfg_bts_min_qual_norm_cmd);
install_element(BTS_NODE, &cfg_trx_gsmtap_sapi_cmd);
install_element(BTS_NODE, &cfg_trx_no_gsmtap_sapi_cmd);