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
This commit is contained in:
Jacob Erlbeck 2015-09-28 18:12:57 +02:00
parent c3c58046c7
commit 953c78987a
2 changed files with 37 additions and 0 deletions

View File

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

View File

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