diff options
Diffstat (limited to 'src/osmo-bts-sysmo')
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 1 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.h | 2 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/main.c | 8 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/sysmobts_vty.c | 36 |
4 files changed, 39 insertions, 8 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 8d07422f..55453ef6 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1463,6 +1463,7 @@ struct femtol1_hdl *l1if_open(struct phy_instance *pinst) fl1h->clk_use_eeprom = 1; fl1h->min_qual_rach = MIN_QUAL_RACH; fl1h->min_qual_norm = MIN_QUAL_NORM; + fl1h->dsp_trace_f = pinst->u.sysmobts.dsp_trace_f; get_hwinfo_eeprom(fl1h); #if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(2,1,0) if (fl1h->hw_info.model_nr == 2050) { diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index de4f2a32..f69ee9cc 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -45,7 +45,7 @@ enum { struct femtol1_hdl { struct gsm_time gsm_time; uint32_t hLayer1; /* handle to the L1 instance in the DSP */ - uint32_t dsp_trace_f; + uint32_t dsp_trace_f; /* currently operational DSP trace flags */ uint8_t clk_use_eeprom; int clk_cal; uint8_t clk_src; diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index 88981eef..68143bb4 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -55,7 +55,6 @@ #include "oml_router.h" extern int pcu_direct; -static unsigned int dsp_trace = 0x00000000; /* Set the clock calibration to the value * read from the eeprom. @@ -168,22 +167,17 @@ int bts_model_handle_options(int argc, char **argv) int option_idx = 0, c; static const struct option long_options[] = { /* specific to this hardware */ - { "dsp-trace", 1, 0, 'p' }, { "hw-version", 0, 0, 'w' }, { "pcu-direct", 0, 0, 'M' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "p:w:M", + c = getopt_long(argc, argv, "wM", long_options, &option_idx); if (c == -1) break; switch (c) { - case 'p': - dsp_trace = strtoul(optarg, NULL, 16); -#warning use dsp_trace!!! - break; case 'M': pcu_direct = 1; break; 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); |