aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_vty.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-07-28 11:55:37 +0200
committerHarald Welte <laforge@gnumonks.org>2016-09-17 10:00:58 +0000
commit292ec58e6730c013026f20578a40e1ff48b35688 (patch)
tree8643d479b752e190a7a27212c0507cfbc399b58b /openbsc/src/libbsc/bsc_vty.c
parent2867f883a11388bb04c1a5177b279c1cc74eafe4 (diff)
Modify SI 13 field for control_ack_type
Add vty function to explicitly set use of 4xRACH type of ack message for PACKET CONTROL ACKNOWLEDGMENT. Previous hardcoded value (use RLC/MAC control block) is used as a default. This is handy for debugging issues related to Timing Advance in context of GPRS. Change-Id: Ie869ac0a82055110f1e3b875e246750c4e113336 Related: OS#1526
Diffstat (limited to 'openbsc/src/libbsc/bsc_vty.c')
-rw-r--r--openbsc/src/libbsc/bsc_vty.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 8116af1ab..f856e30e6 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -455,6 +455,8 @@ static void config_write_bts_gprs(struct vty *vty, struct gsm_bts *bts)
VTY_NEWLINE);
vty_out(vty, " gprs network-control-order nc%u%s",
bts->gprs.net_ctrl_ord, VTY_NEWLINE);
+ if (!bts->gprs.ctrl_ack_type_use_block)
+ vty_out(vty, " gprs control-ack-type-rach%s", VTY_NEWLINE);
vty_out(vty, " gprs cell bvci %u%s", bts->gprs.cell.bvci,
VTY_NEWLINE);
for (i = 0; i < ARRAY_SIZE(bts->gprs.cell.timer); i++)
@@ -2685,6 +2687,40 @@ DEFUN(cfg_bts_gprs_rac, cfg_bts_gprs_rac_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_bts_gprs_ctrl_ack, cfg_bts_gprs_ctrl_ack_cmd,
+ "gprs control-ack-type-rach", GPRS_TEXT
+ "Set GPRS Control Ack Type for PACKET CONTROL ACKNOWLEDGMENT message to "
+ "four access bursts format instead of default RLC/MAC control block\n")
+{
+ struct gsm_bts *bts = vty->index;
+
+ if (bts->gprs.mode == BTS_GPRS_NONE) {
+ vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ bts->gprs.ctrl_ack_type_use_block = false;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_no_bts_gprs_ctrl_ack, cfg_no_bts_gprs_ctrl_ack_cmd,
+ "no gprs control-ack-type-rach", NO_STR GPRS_TEXT
+ "Set GPRS Control Ack Type for PACKET CONTROL ACKNOWLEDGMENT message to "
+ "four access bursts format instead of default RLC/MAC control block\n")
+{
+ struct gsm_bts *bts = vty->index;
+
+ if (bts->gprs.mode == BTS_GPRS_NONE) {
+ vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ bts->gprs.ctrl_ack_type_use_block = true;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_bts_gprs_net_ctrl_ord, cfg_bts_gprs_net_ctrl_ord_cmd,
"gprs network-control-order (nc0|nc1|nc2)",
GPRS_TEXT
@@ -4122,6 +4158,8 @@ int bsc_vty_init(const struct log_info *cat)
install_element(BTS_NODE, &cfg_bts_gprs_ns_timer_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_rac_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_net_ctrl_ord_cmd);
+ install_element(BTS_NODE, &cfg_bts_gprs_ctrl_ack_cmd);
+ install_element(BTS_NODE, &cfg_no_bts_gprs_ctrl_ack_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_bvci_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_cell_timer_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_nsei_cmd);