aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/sysmobts_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-10-28 10:58:41 +0100
committerHarald Welte <laforge@gnumonks.org>2012-10-28 10:58:41 +0100
commitd1335d878b34eb67d75a6f7ff22e305a573c827f (patch)
tree5f07825dbc56dda26db9c054143672d8c9c96115 /src/osmo-bts-sysmo/sysmobts_vty.c
parent98a440427968d60163ccace88aa11763649eefa5 (diff)
sysmobts: Add support for reading calibration tables0.1.0
'trx-calibration-path' is the new VTY command indicating the path name where the calibration files can be found. Calibration is only implemented for SUPERFEMTO API version 2.4.0 or later.
Diffstat (limited to 'src/osmo-bts-sysmo/sysmobts_vty.c')
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index 139f0fae..6c454bf0 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -146,6 +146,21 @@ DEFUN(cfg_trx_clksrc, cfg_trx_clksrc_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_trx_cal_path, cfg_trx_cal_path_cmd,
+ "trx-calibration-path PATH",
+ "Set the path name to TRX calibration data\n" "Path name\n")
+{
+ struct gsm_bts_trx *trx = vty->index;
+ struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx);
+
+ if (fl1h->calib_path)
+ talloc_free(fl1h->calib_path);
+
+ fl1h->calib_path = talloc_strdup(fl1h, argv[0]);
+
+ return CMD_SUCCESS;
+}
+
/* runtime */
DEFUN(show_trx_clksrc, show_trx_clksrc_cmd,
@@ -394,6 +409,8 @@ void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
vty_out(vty, " clock-calibration %d%s", fl1h->clk_cal,
VTY_NEWLINE);
+ vty_out(vty, " trx-calibration-path %s%s", fl1h->calib_path,
+ VTY_NEWLINE);
vty_out(vty, " clock-source %s%s",
get_value_string(femtobts_clksrc_names, fl1h->clk_src),
VTY_NEWLINE);
@@ -455,6 +472,7 @@ int bts_model_vty_init(struct gsm_bts *bts)
install_element(TRX_NODE, &cfg_trx_clkcal_cmd);
install_element(TRX_NODE, &cfg_trx_clkcal_def_cmd);
install_element(TRX_NODE, &cfg_trx_clksrc_cmd);
+ install_element(TRX_NODE, &cfg_trx_cal_path_cmd);
install_element(TRX_NODE, &cfg_trx_gsmtap_sapi_cmd);
install_element(TRX_NODE, &cfg_trx_no_gsmtap_sapi_cmd);