aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-08-07 16:00:56 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-08-07 16:00:56 +0200
commit07e97cf8a551b05d7f5f3f9583b68b2eff0f1c23 (patch)
tree2e5663d0d7d23aa4153b079894f20b94515fbd7c /src/pcu_vty.c
parentcbcd124588abf91be129aee3f37505ca60706de9 (diff)
Adding single block allocation
It is mandatory to support it because MS may request a single block. In this case the network must assign a single block. It is possible to force single block allocation for all uplink requests on RACH. (VTY option)
Diffstat (limited to 'src/pcu_vty.c')
-rw-r--r--src/pcu_vty.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index e5d37658..39a1b722 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -90,6 +90,8 @@ static int config_write_pcu(struct vty *vty)
vty_out(vty, " alloc-algorithm a%s", VTY_NEWLINE);
if (bts->alloc_algorithm == alloc_algorithm_b)
vty_out(vty, " alloc-algorithm b%s", VTY_NEWLINE);
+ if (bts->force_two_phase)
+ vty_out(vty, " two-phase-access%s", VTY_NEWLINE);
}
@@ -193,6 +195,30 @@ DEFUN(cfg_pcu_alloc,
return CMD_SUCCESS;
}
+DEFUN(cfg_pcu_two_phase,
+ cfg_pcu_two_phase_cmd,
+ "two-phase-access",
+ "Force two phase access when MS requests single phase access\n")
+{
+ struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts;
+
+ bts->force_two_phase = 1;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_pcu_no_two_phase,
+ cfg_pcu_no_two_phase_cmd,
+ "no two-phase-access",
+ NO_STR "Only use two phase access when requested my MS\n")
+{
+ struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts;
+
+ bts->force_two_phase = 0;
+
+ return CMD_SUCCESS;
+}
+
static const char pcu_copyright[] =
"Copyright (C) 2012 by ...\r\n"
"License GNU GPL version 2 or later\r\n"
@@ -222,6 +248,8 @@ int pcu_vty_init(const struct log_info *cat)
install_element(PCU_NODE, &cfg_pcu_queue_lifetime_inf_cmd);
install_element(PCU_NODE, &cfg_pcu_no_queue_lifetime_cmd);
install_element(PCU_NODE, &cfg_pcu_alloc_cmd);
+ install_element(PCU_NODE, &cfg_pcu_two_phase_cmd);
+ install_element(PCU_NODE, &cfg_pcu_no_two_phase_cmd);
install_element(PCU_NODE, &ournode_end_cmd);
return 0;