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
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 @@
 	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 @@
 	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 @@
 	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);