aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-02 16:02:16 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-02 17:06:40 +0100
commit2219336dd5c88bd2c0dadf59f85fa99869d5ddbe (patch)
tree0fd5b14ab1a7cb8a35348af4c5b315e6b669a5bc
parenta697c18053e0b9dc11aee6097afe2132a65e0af6 (diff)
edge/vty: Set initial MCS
This adds the following VTY command (config-pcu node): - mcs <1-9> sets initial DL and UL MCS to the same value - mcs <1-9> <1-9> sets initial DL and UL MCS separately - no mcs sets the default values Sponsored-by: On-Waves ehf
-rw-r--r--src/pcu_vty.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index b5ee1b5..58fea99 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -109,6 +109,14 @@ static int config_write_pcu(struct vty *vty)
bts->cs_lqual_ranges[3].low,
VTY_NEWLINE);
+ if (bts->initial_mcs_dl != 1 && bts->initial_mcs_ul != 1) {
+ if (bts->initial_mcs_ul == bts->initial_mcs_dl)
+ vty_out(vty, " mcs %d%s", bts->initial_mcs_dl,
+ VTY_NEWLINE);
+ else
+ vty_out(vty, " mcs %d %d%s", bts->initial_mcs_dl,
+ bts->initial_mcs_ul, VTY_NEWLINE);
+ }
if (bts->max_mcs_dl && bts->max_mcs_ul) {
if (bts->max_mcs_ul == bts->max_mcs_dl)
vty_out(vty, " mcs max %d%s", bts->max_mcs_dl,
@@ -407,6 +415,38 @@ DEFUN(cfg_pcu_no_cs_max,
#define MCS_STR "Modulation and Coding Scheme configuration (EGPRS)\n"
+DEFUN(cfg_pcu_mcs,
+ cfg_pcu_mcs_cmd,
+ "mcs <1-9> [<1-9>]",
+ MCS_STR
+ "Initial MCS value to be used (default 1)\n"
+ "Use a different initial MCS value for the uplink")
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+ uint8_t cs = atoi(argv[0]);
+
+ bts->initial_mcs_dl = cs;
+ if (argc > 1)
+ bts->initial_mcs_ul = atoi(argv[1]);
+ else
+ bts->initial_mcs_ul = cs;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_pcu_no_mcs,
+ cfg_pcu_no_mcs_cmd,
+ "no mcs",
+ NO_STR MCS_STR)
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+
+ bts->initial_mcs_dl = 1;
+ bts->initial_mcs_ul = 1;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_pcu_mcs_max,
cfg_pcu_mcs_max_cmd,
"mcs max <1-9> [<1-9>]",
@@ -913,6 +953,8 @@ int pcu_vty_init(const struct log_info *cat)
install_element(PCU_NODE, &cfg_pcu_cs_downgrade_thrsh_cmd);
install_element(PCU_NODE, &cfg_pcu_no_cs_downgrade_thrsh_cmd);
install_element(PCU_NODE, &cfg_pcu_cs_lqual_ranges_cmd);
+ install_element(PCU_NODE, &cfg_pcu_mcs_cmd);
+ install_element(PCU_NODE, &cfg_pcu_no_mcs_cmd);
install_element(PCU_NODE, &cfg_pcu_mcs_max_cmd);
install_element(PCU_NODE, &cfg_pcu_no_mcs_max_cmd);
install_element(PCU_NODE, &cfg_pcu_window_size_cmd);