aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/sysmobts_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-01-20 21:56:47 +0100
committerHarald Welte <laforge@gnumonks.org>2016-02-15 14:27:20 +0100
commit9684099ae905e6e61cbc326035d0b37c480f6172 (patch)
treefb429faa3fd123db634b5613316f89f6c7cf2f13 /src/osmo-bts-sysmo/sysmobts_vty.c
parent38933afdd95f9e809c2e3a15ff860d22b22f27c4 (diff)
sysmobts/LC15: Fix startup-time DSP trace flage configuration
Due to the changes introduced by the phy_link API, it's not easy to set the default DSP trace flags via a command line argument anymore. We now rather introduce a persitent VTY configuration command, by which the default DSP tracing configuration can be set (for each PHY). The persistent trace flags are stored in the phy_instance, while the current operational run-time flags are in fl1h->phy_instance.
Diffstat (limited to 'src/osmo-bts-sysmo/sysmobts_vty.c')
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index ced8f8e0..d620b4a1 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -227,6 +227,30 @@ DEFUN(cfg_trx_nominal_power, cfg_trx_nominal_power_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_phy_dsp_trace_f, cfg_phy_dsp_trace_f_cmd,
+ "HIDDEN", TRX_STR)
+{
+ struct phy_instance *pinst = vty->index;
+ unsigned int flag;
+
+ flag = get_string_value(femtobts_tracef_names, argv[1]);
+ pinst->u.sysmobts.dsp_trace_f |= ~flag;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_phy_no_dsp_trace_f, cfg_phy_no_dsp_trace_f_cmd,
+ "HIDDEN", NO_STR TRX_STR)
+{
+ struct phy_instance *pinst = vty->index;
+ unsigned int flag;
+
+ flag = get_string_value(femtobts_tracef_names, argv[1]);
+ pinst->u.sysmobts.dsp_trace_f &= ~flag;
+
+ return CMD_SUCCESS;
+}
+
/* runtime */
DEFUN(show_trx_clksrc, show_trx_clksrc_cmd,
@@ -484,6 +508,16 @@ void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
static void write_phy_inst(struct vty *vty, struct phy_instance *pinst)
{
struct femtol1_hdl *fl1h = pinst->u.sysmobts.hdl;
+ int i;
+
+ for (i = 0; i < 32; i++) {
+ if (pinst->u.sysmobts.dsp_trace_f & (1 << i)) {
+ const char *name;
+ name = get_value_string(femtobts_tracef_names, (1 << i));
+ vty_out(vty, " dsp-trace-flag %s%s", name,
+ VTY_NEWLINE);
+ }
+ }
if (fl1h->clk_use_eeprom)
vty_out(vty, " clock-calibration eeprom%s", VTY_NEWLINE);
@@ -549,6 +583,8 @@ int bts_model_vty_init(struct gsm_bts *bts)
install_element(TRX_NODE, &cfg_trx_ul_power_target_cmd);
install_element(TRX_NODE, &cfg_trx_nominal_power_cmd);
+ install_element(PHY_INST_NODE, &cfg_phy_dsp_trace_f_cmd);
+ install_element(PHY_INST_NODE, &cfg_phy_no_dsp_trace_f_cmd);
install_element(PHY_INST_NODE, &cfg_phy_clkcal_cmd);
install_element(PHY_INST_NODE, &cfg_phy_clkcal_eeprom_cmd);
install_element(PHY_INST_NODE, &cfg_phy_clkcal_def_cmd);