aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-09-28 18:12:57 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-11-30 12:20:36 +0100
commit953c78987a2dc99d4afcd3752507fcedabc9830f (patch)
treeaeb7b36c2841c17cbd5a1288a91f312d791b4b0c
parentc3c58046c7223d48c61eb7126f33dca300254485 (diff)
edge: Add egprs config command
Add a global config flag to enable the use EDGE/EGPRS. The following VTY commands are added to node config-pcu: - egprs Enables EGPRS - no egprs Disable EGPRS Note that enabling EGPRS is experimental and will most likely break packet transmission until a minimal required set of EGPRS functionality is implemented. Sponsored-by: On-Waves ehf
-rw-r--r--src/bts.h1
-rw-r--r--src/pcu_vty.c36
2 files changed, 37 insertions, 0 deletions
diff --git a/src/bts.h b/src/bts.h
index 329f399..002d450 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -173,6 +173,7 @@ struct gprs_rlcmac_bts {
uint32_t alloc_algorithm_curst; /* options to customize algorithm */
uint8_t force_two_phase;
uint8_t alpha, gamma;
+ uint8_t egprs_enabled;
uint32_t dl_tbf_idle_msec; /* hold time for idle DL TBFs */
uint32_t ms_idle_sec;
uint8_t cs_adj_enabled;
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 695a464..5196ae2 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -54,6 +54,11 @@ static int config_write_pcu(struct vty *vty)
struct gprs_rlcmac_bts *bts = bts_main_data();
vty_out(vty, "pcu%s", VTY_NEWLINE);
+ if (bts->egprs_enabled)
+ vty_out(vty, " egprs%s", VTY_NEWLINE);
+ else
+ vty_out(vty, " no egprs%s", VTY_NEWLINE);
+
vty_out(vty, " flow-control-interval %d%s", bts->fc_interval,
VTY_NEWLINE);
if (bts->fc_bvc_bucket_size)
@@ -153,6 +158,35 @@ DEFUN(cfg_pcu,
return CMD_SUCCESS;
}
+#define EGPRS_STR "EGPRS configuration\n"
+
+DEFUN(cfg_pcu_egprs,
+ cfg_pcu_egprs_cmd,
+ "egprs",
+ EGPRS_STR)
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+
+ bts->egprs_enabled = 1;
+
+ vty_out(vty, "%%Note that EGPRS support is in an experimental state. "
+ "Do not use this in production!%s", VTY_NEWLINE);
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_pcu_no_egprs,
+ cfg_pcu_no_egprs_cmd,
+ "no egprs",
+ NO_STR EGPRS_STR)
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+
+ bts->egprs_enabled = 0;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_pcu_fc_interval,
cfg_pcu_fc_interval_cmd,
"flow-control-interval <1-10>",
@@ -811,6 +845,8 @@ int pcu_vty_init(const struct log_info *cat)
install_node(&pcu_node, config_write_pcu);
install_element(CONFIG_NODE, &cfg_pcu_cmd);
vty_install_default(PCU_NODE);
+ install_element(PCU_NODE, &cfg_pcu_egprs_cmd);
+ install_element(PCU_NODE, &cfg_pcu_no_egprs_cmd);
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);