aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcu_vty.c')
-rw-r--r--src/pcu_vty.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 3ab6865..454b31c 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -88,6 +88,10 @@ static int config_write_pcu(struct vty *vty)
else
vty_out(vty, " cs %d %d%s", bts->initial_cs_dl,
bts->initial_cs_ul, VTY_NEWLINE);
+ if (bts->cs_link_adaptation)
+ vty_out(vty, " cs ci level %f %f %f %f%s", bts->cs1_ci_level,
+ bts->cs2_ci_level, bts->cs3_ci_level, bts->cs4_ci_level,
+ VTY_NEWLINE);
if (bts->force_llc_lifetime == 0xffff)
vty_out(vty, " queue lifetime infinite%s", VTY_NEWLINE);
else if (bts->force_llc_lifetime)
@@ -159,6 +163,45 @@ DEFUN(cfg_pcu_no_cs,
return CMD_SUCCESS;
}
+DEFUN(cfg_pcu_cs_link_adaptation,
+ cfg_pcu_cs_link_adaptation_cmd,
+ "cs link adaptation",
+ NO_STR "Turn on CS link adaptation\n")
+{
+ struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts;
+
+ bts->cs_link_adaptation = 1;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_pcu_no_cs_link_adaptation,
+ cfg_pcu_no_cs_link_adaptation_cmd,
+ "no cs link adaptation",
+ NO_STR "Turn off CS link adaptation\n")
+{
+ struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts;
+
+ bts->cs_link_adaptation = 0;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_pcu_cs_ci_level,
+ cfg_pcu_cs_ci_level_cmd,
+ "cs ci level <0-30> <0-30> <0-30> <0-30>",
+ NO_STR "Set maximum C/I level for CS1 CS2 CS3 CS4\n")
+{
+ struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts;
+
+ bts->cs1_ci_level = atoi(argv[0]);
+ bts->cs2_ci_level = atoi(argv[1]);
+ bts->cs3_ci_level = atoi(argv[2]);
+ bts->cs4_ci_level = atoi(argv[3]);
+
+ return CMD_SUCCESS;
+}
+
#define QUEUE_STR "Packet queue options\n"
#define LIFETIME_STR "Set lifetime limit of LLC frame in centi-seconds " \
"(overrides the value given by SGSN)\n"
@@ -300,6 +343,9 @@ int pcu_vty_init(const struct log_info *cat)
install_element(PCU_NODE, &cfg_pcu_no_two_phase_cmd);
install_element(PCU_NODE, &cfg_pcu_cs_cmd);
install_element(PCU_NODE, &cfg_pcu_no_cs_cmd);
+ install_element(PCU_NODE, &cfg_pcu_cs_link_adaptation_cmd);
+ install_element(PCU_NODE, &cfg_pcu_no_cs_link_adaptation_cmd);
+ install_element(PCU_NODE, &cfg_pcu_cs_ci_level_cmd);
install_element(PCU_NODE, &cfg_pcu_queue_lifetime_cmd);
install_element(PCU_NODE, &cfg_pcu_queue_lifetime_inf_cmd);
install_element(PCU_NODE, &cfg_pcu_no_queue_lifetime_cmd);