aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs/trx_vty.c
diff options
context:
space:
mode:
authorEric <ewild@sysmocom.de>2021-05-05 17:33:18 +0200
committerEric <ewild@sysmocom.de>2021-05-05 17:34:28 +0200
commitc27fe60a25467f9f034b9ce4422d88cd7861ab3c (patch)
tree0aeaca8c47dbd257c9b4d10f0f4dd822ded35d01 /CommonLibs/trx_vty.c
parenta1ea63f777a41235d8cb1668a9e6cb1d0d51bba3 (diff)
add hidden fn adjustment command
This is only useful if the rf path delays the signal by at least one frame, and therefore a fairly experimental command that might be removed or reworked in the future and should not be relied upon. Change-Id: I29964acffad5bad4f5bcad7f631e435a72979c46
Diffstat (limited to 'CommonLibs/trx_vty.c')
-rw-r--r--CommonLibs/trx_vty.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index d1da450..30f55c8 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -271,6 +271,20 @@ DEFUN(cfg_rssi_offset, cfg_rssi_offset_cmd,
return CMD_SUCCESS;
}
+
+DEFUN_ATTR(cfg_ul_fn_offset, cfg_ul_fn_offset_cmd,
+ "ul-fn-offset <-10-10>",
+ "Adjusts the uplink frame FN by the specified amount\n"
+ "Frame Number offset\n",
+ CMD_ATTR_HIDDEN)
+{
+ struct trx_ctx *trx = trx_from_vty(vty);
+
+ trx->cfg.ul_fn_offset = atoi(argv[0]);
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_swap_channels, cfg_swap_channels_cmd,
"swap-channels (disable|enable)",
"Swap primary and secondary channels of the PHY (if any)\n"
@@ -624,6 +638,8 @@ static int config_write_trx(struct vty *vty)
vty_out(vty, " filler access-burst-delay %u%s", trx->cfg.rach_delay, VTY_NEWLINE);
if (trx->cfg.stack_size != 0)
vty_out(vty, " stack-size %u%s", trx->cfg.stack_size, VTY_NEWLINE);
+ if (trx->cfg.ul_fn_offset != 0)
+ vty_out(vty, " ul-fn-offset %u%s", trx->cfg.ul_fn_offset, VTY_NEWLINE);
trx_rate_ctr_threshold_write_config(vty, " ");
for (i = 0; i < trx->cfg.num_chans; i++) {
@@ -787,6 +803,7 @@ int trx_vty_init(struct trx_ctx* trx)
install_element(TRX_NODE, &cfg_stack_size_cmd);
install_element(TRX_NODE, &cfg_chan_cmd);
+ install_element(TRX_NODE, &cfg_ul_fn_offset_cmd);
install_node(&chan_node, dummy_config_write);
install_element(CHAN_NODE, &cfg_chan_rx_path_cmd);
install_element(CHAN_NODE, &cfg_chan_tx_path_cmd);